diff --git a/.gitignore b/.gitignore index 751f7905487787258192acb64ce31b29ce81e959..eb2abe7cb7babeca790e3ec28744912c41eca85d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ GUI/.project GUI/.settings GUI/out GUI/.idea -GUI/gui.iml +GUI/GUI.iml #Latex generated files *.log *.out @@ -16,4 +16,7 @@ GUI/gui.iml *.tox *.toc *.dvi - +*.bbl +*.blg +*.nav +*.snm diff --git a/AI/src/mcts/MCTS_SETTINGS.hpp b/AI/src/mcts/MCTS_SETTINGS.hpp new file mode 100644 index 0000000000000000000000000000000000000000..597aa83dafe089833f0f2e7f6c1318c0fe4edf96 --- /dev/null +++ b/AI/src/mcts/MCTS_SETTINGS.hpp @@ -0,0 +1,8 @@ +#ifndef __MCTS_SETTINGS_HPP__ +#define __MCTS_SETTINGS_HPP__ +// Allocated memory for the mcts. If not enough the program may crash +#define MCTS_ALLOCATOR_SIZE 1000000U +// Reflection time for every turn of the mcts (in ms) +#define MCTS_TURN_TIME 5000 + +#endif diff --git a/AI/src/mcts/allocator.hpp b/AI/src/mcts/allocator.hpp index 73e64d86542929d420909ad188d81c2ef0c48101..628912ed2d3e3ec726f617bdcdba2e11639ce32f 100644 --- a/AI/src/mcts/allocator.hpp +++ b/AI/src/mcts/allocator.hpp @@ -2,6 +2,7 @@ #define __ALLOCATOR_HPP__ #include "node.hpp" +#include "MCTS_SETTINGS.hpp" namespace mcts { @@ -15,7 +16,7 @@ namespace mcts void copy(node* n1, node* n2, unsigned int prunning = 0); public: - allocator(unsigned int size = 40000000U); + allocator(unsigned int size = MCTS_ALLOCATOR_SIZE); ~allocator(); node* allocate(unsigned int size); void clear(); diff --git a/AI/src/mcts/test_mcts_two_players.hpp b/AI/src/mcts/test_mcts_two_players.hpp index 11b345f2ff10040bf79bfd55e9a259168b6538d5..faaf0b373dde8b3daa1182a1c604a22d09bdb67b 100644 --- a/AI/src/mcts/test_mcts_two_players.hpp +++ b/AI/src/mcts/test_mcts_two_players.hpp @@ -3,6 +3,7 @@ #include "openings.hpp" #include "mcts_two_players.hpp" +#include "MCTS_SETTINGS.hpp" #include <string> #include <iostream> #include <map> @@ -21,10 +22,10 @@ namespace mcts void self_play(Game g); void self_play(Game g, int n, bool with_openings = false); void self_play_learn_openings(Game g, int n); - void test_openings(Game g, int nb_learning, int nb_testing); + void test_openings(Game g, int nb_learning, int nb_testing); int select_move(Game& game); public: - test_mcts_two_players(const Game& g); + test_mcts_two_players(const Game& g); }; template <typename Game> @@ -69,7 +70,7 @@ namespace mcts void test_mcts_two_players<Game>::play(Game g) { // ProfilerStart("theturk.prof"); - auto the_turk = make_mcts_two_players(g, 5000, 0.4, 8); + auto the_turk = make_mcts_two_players(g, MCTS_TURN_TIME, 0.4, 8); std::cout << "play one game" << std::endl; std::cout << "who's first? (h)uman/(c)omputer "; std::string ans; @@ -155,7 +156,7 @@ namespace mcts g.set_state(state); openings_.update(g, moves, v); g.set_state(state); - for (std::uint16_t m : moves) + for (std::uint16_t m : moves) { g.play(m); v = -v; @@ -174,10 +175,10 @@ namespace mcts } std::cout << "number of learning examples: " << learning_examples.size() << std::endl; std::ofstream output("learning_examples.txt"); - for (const auto& example : learning_examples) + for (const auto& example : learning_examples) { output << example.second.second; - for (int index : example.first) + for (int index : example.first) { output << " " << index << ":" << 1; } diff --git a/LaTex/EtudesPratiques_Rapport_GroupeK.pdf b/LaTex/EtudesPratiques_Rapport_GroupeK.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b2c812bd97f43e1f7deaf34d6c2e570d68129150 Binary files /dev/null and b/LaTex/EtudesPratiques_Rapport_GroupeK.pdf differ diff --git a/LaTex/Rapport Final/Rapport en LaTeX/Rapport_style.bbl b/LaTex/Rapport Final/Rapport en LaTeX/Rapport_style.bbl deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/LaTex/Rapport Final/Rapport en LaTeX/Rapport_style.blg b/LaTex/Rapport Final/Rapport en LaTeX/Rapport_style.blg deleted file mode 100644 index 2e6b1e076d89d8c164d21fc3f3c83d625c2b7416..0000000000000000000000000000000000000000 --- a/LaTex/Rapport Final/Rapport en LaTeX/Rapport_style.blg +++ /dev/null @@ -1,5 +0,0 @@ -This is BibTeX, Version 0.99dThe top-level auxiliary file: Rapport_style.aux -I found no \citation commands---while reading file Rapport_style.aux -I found no \bibdata command---while reading file Rapport_style.aux -I found no \bibstyle command---while reading file Rapport_style.aux -(There were 3 error messages) diff --git a/LaTex/Rapport Final/Rapport en LaTeX/Rapport_style.pdf b/LaTex/Rapport Final/Rapport en LaTeX/Rapport_style.pdf index 0abeb40aea039323be22561744d10e41a3116a85..b2c812bd97f43e1f7deaf34d6c2e570d68129150 100644 Binary files a/LaTex/Rapport Final/Rapport en LaTeX/Rapport_style.pdf and b/LaTex/Rapport Final/Rapport en LaTeX/Rapport_style.pdf differ diff --git a/LaTex/Soutenance/Plan b/LaTex/Soutenance/Plan new file mode 100644 index 0000000000000000000000000000000000000000..227189f11c3850b211f50a54b67cab39585a0b0b --- /dev/null +++ b/LaTex/Soutenance/Plan @@ -0,0 +1,27 @@ +1. Résumé de la soutenance de janvier - 5 min + 1.1 Notre Projet (1 diapo) + 1.2 Le Jeu du Pingouin (1 diapo) + 1.3 Objectifs (1 diapo) + 1.4 MCTS (1-2 diapos) + 1.5 Tic-Tac-Toe (1 diapo) + +2. Implémentation du MCTS pour le Jeu du Pingouin - 5 min + 2.1 Le Plateau + Image expliquant le déplacement + Bitboard des trous + 2.2 Les Pingouins + Structure + Bitboard coups possibles dans une directions des 8 pingouins => Difficulté de manipulation des données + --> 1 bitboard = 1 pingouin avec toutes les données nécessaires + Déplacement des pingouins + --> fusion des positions + Bitboard des trous = Bitboard des obstacles, mis à jour dynamiquement + +3. Interface graphique - 5 min + 3.1 Intéraction MVC + 3.2 JSON / Communication entre C++ et Java + +4. Let's get ready to rumble ! - 5 min + +5. Pingu Garcia + + diff --git a/LaTex/Soutenance/Rapport_en_LaTeX/Soutenance.pdf b/LaTex/Soutenance/Rapport_en_LaTeX/Soutenance.pdf new file mode 100644 index 0000000000000000000000000000000000000000..39b9cdb1ba9521b1791f8f52d3ff96a84885a71d Binary files /dev/null and b/LaTex/Soutenance/Rapport_en_LaTeX/Soutenance.pdf differ diff --git a/LaTex/Soutenance/Rapport_en_LaTeX/Soutenance.tex b/LaTex/Soutenance/Rapport_en_LaTeX/Soutenance.tex new file mode 100644 index 0000000000000000000000000000000000000000..14d00f835ef3c5a5b1a759d57cf2fd118c4fd451 --- /dev/null +++ b/LaTex/Soutenance/Rapport_en_LaTeX/Soutenance.tex @@ -0,0 +1,63 @@ +\documentclass[11pt]{beamer} + + +\usetheme{Darmstadt} +\usepackage[utf8]{inputenc} +%\usepackage[french]{babel} +\usepackage[T1]{fontenc} +\usepackage{graphicx} + +\author{Francesco BARIATTI \and Adrien GASTÉ \and Mikael LE \and Romain LEBOUC} +\title{Étude Pratique : Développement d’une +Intelligence Artificielle à base de l’algorithme +Monte Carlo Tree Search} + + +%\setbeamercovered{transparent} +%\setbeamertemplate{navigation symbols}{} +%\logo{} + +\institute{Encadrant : Pascal GARCIA} +\date{Année scolaire 2015/16} +%\subject{} \\ + + +\AtBeginSection[] +{ + \begin{frame} + \frametitle{Table of Contents} + \tableofcontents[currentsection] + \end{frame} +} + + +\begin{document} + + +\begin{frame} +\titlepage +\end{frame} + +%\begin{frame} +%\tableofcontents +%\end{frame} + + + +\section{Implémentation du MCTS pour le Jeu du Pingouin} +\begin{frame} +huhu +\end{frame} + +\section{Interface graphique} +\begin{frame} + +\end{frame} + +\section{Let's get ready to rumble !} +\begin{frame} + +\end{frame} + + +\end{document} \ No newline at end of file