diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2023-06-12 19:43:40 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2023-06-12 19:43:40 +0200 |
commit | 65ac3a6b050dcb88688cdc2654b1ed6693e9a160 (patch) | |
tree | 19797a3d1a2f897628d0413482117c27c9cfe6b9 /doc | |
parent | a005228a986b17732ae7cccbedde450533cfe1f1 (diff) | |
download | imago-65ac3a6b050dcb88688cdc2654b1ed6693e9a160.tar.gz imago-65ac3a6b050dcb88688cdc2654b1ed6693e9a160.zip |
Submitted version.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Makefile | 2 | ||||
-rw-r--r-- | doc/listings/testOutput.txt | 53 | ||||
-rw-r--r-- | doc/tex/appendixes.tex | 48 | ||||
-rw-r--r-- | doc/tex/imago.tex | 25 | ||||
-rw-r--r-- | doc/tex/implementation.tex | 83 |
5 files changed, 149 insertions, 62 deletions
diff --git a/doc/Makefile b/doc/Makefile index cf6c166..472de8e 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -9,7 +9,7 @@ diagramImgs = diagrams/planningWorkPlanEngine.png diagrams/planningWorkPlanGame. imgs = img/imago.jpg img/models/denseModel.png img/models/convModel.png -listings = listings/denseModel.txt listings/convModel.txt listings/denseTraining.txt listings/convTraining.txt listings/trainCommand.sh +listings = listings/denseModel.txt listings/convModel.txt listings/denseTraining.txt listings/convTraining.txt listings/trainCommand.sh listings/testOutput.txt all: $(docName).pdf diff --git a/doc/listings/testOutput.txt b/doc/listings/testOutput.txt index 7d1cfda..e6fb2d6 100644 --- a/doc/listings/testOutput.txt +++ b/doc/listings/testOutput.txt @@ -1,29 +1,24 @@ -Invalid Move! Move outside board bounds. -Name Stmts Miss Cover Missing -------------------------------------------------------------------------------- -imago/data/enums.py 17 0 100% -imago/engine/core.py 39 8 79% 43, 50-52, 60-62, 68 -imago/engine/createDecisionAlgorithm.py 11 5 55% 13-21 -imago/engine/decisionAlgorithm.py 9 4 56% 6, 10, 14, 18 -imago/engine/imagoIO.py 103 10 90% 75-76, 190-198, 205 -imago/engine/keras/convNeuralNetwork.py 12 12 0% 3-54 -imago/engine/keras/denseNeuralNetwork.py 12 12 0% 3-40 -imago/engine/keras/initialDenseNeuralNetwork.py 11 11 0% 3-28 -imago/engine/keras/keras.py 28 15 46% 16-27, 34-37, 41, 48-49 -imago/engine/keras/neuralNetwork.py 137 112 18% 23-31, 34, 37-46, 58-61, 66-69, 72-80, 85-95, 100-112, 117-139, 142-145, 151-186, 195-203, 206 -imago/engine/monteCarlo.py 110 8 93% 128, 181-190, 194-195 -imago/engine/parseHelpers.py 48 0 100% -imago/gameLogic/gameBoard.py 199 26 87% 115, 177, 202, 269, 278-303, 311 -imago/gameLogic/gameData.py 24 24 0% 3-51 -imago/gameLogic/gameMove.py 95 13 86% 21, 27, 34, 131-134, 138-142, 146 -imago/gameLogic/gameState.py 42 0 100% -imago/scripts/monteCarloSimulation.py 17 17 0% 3-25 -imago/sgfParser/astNode.py 125 125 0% 1-156 -imago/sgfParser/parsetab.py 18 18 0% 5-28 -imago/sgfParser/sgf.py 6 6 0% 3-13 -imago/sgfParser/sgflex.py 31 31 0% 5-71 -imago/sgfParser/sgfyacc.py 41 41 0% 5-71 -------------------------------------------------------------------------------- -TOTAL 1135 498 56% - -8 empty files skipped. +Name Stmts Miss Cover Missing +------------------------------------------------------------------------ +imago/data/enums.py 17 0 100% +imago/engine/core.py 39 7 82% 43, 50-52, 60-62 +imago/engine/createDecisionAlgorithm.py 11 5 55% 13-21 +imago/engine/decisionAlgorithm.py 9 4 56% 6, 10, 14, 18 +imago/engine/imagoIO.py 107 9 92% 76-77, 189-196, 208 +imago/engine/keras/convNeuralNetwork.py 11 0 100% +imago/engine/keras/denseNeuralNetwork.py 11 0 100% +imago/engine/keras/keras.py 30 3 90% 48-49, 53 +imago/engine/keras/neuralNetwork.py 137 1 99% 141 +imago/engine/monteCarlo.py 110 7 94% 128, 181-188, 194-195 +imago/engine/parseHelpers.py 48 0 100% +imago/gameLogic/gameBoard.py 205 7 97% 116, 180, 205, 272, 284, 306, 312 +imago/gameLogic/gameMove.py 95 9 91% 21, 27, 34, 138-142, 146 +imago/gameLogic/gameState.py 41 0 100% +imago/scripts/monteCarloSimulation.py 17 17 0% 3-25 +imago/sgfParser/astNode.py 70 7 90% 10, 14, 22, 45, 59, 67, 157 +imago/sgfParser/parsetab.py 18 0 100% +imago/sgfParser/sgf.py 6 0 100% +imago/sgfParser/sgflex.py 31 9 71% 37-38, 42-43, 47-48, 64-65, 71 +imago/sgfParser/sgfyacc.py 41 14 66% 35-36, 51, 59-68, 71 +------------------------------------------------------------------------ +TOTAL 1054 99 91% diff --git a/doc/tex/appendixes.tex b/doc/tex/appendixes.tex index f9f189e..b4533d6 100644 --- a/doc/tex/appendixes.tex +++ b/doc/tex/appendixes.tex @@ -76,7 +76,7 @@ input or because of the \gls{ko} rule. \subsubsection{The engine: the \texttt{imagocli.py} interface} -\texttt{imagocli.py} is a text interface which follows the \acrshort{gtp} +\texttt{imagocli.py} is a text interface which follows the \acrfull{gtp} specification. It can be executed in a shell as: { @@ -87,8 +87,8 @@ specification. It can be executed in a shell as: \par } -The \acrshort{ai} to be run can be passes as an argument to the \texttt{-e} -option. The available arguments are: +If desired, the \acrshort{ai} to be run can be passed as an argument to the +\texttt{-e} option, but it is not necessary. The available arguments are: \begin{itemize} @@ -111,11 +111,11 @@ be executed as: \par } -If no arguments are provided, the default configuration is to use the Monte -Carlo Tree Search algorithm. +If no arguments are provided the default configuration is to use the Monte Carlo +Tree Search algorithm. When executed interactively and before any input is provided it just waits for -input, with no prompt whatsoever. This is in compliance with the \acrshort{gtp} +input with no prompt whatsoever. This is in compliance with the \acrshort{gtp} specification. These are the commands that the program knows and a short description of what @@ -125,8 +125,8 @@ each does: \item \texttt{list\_commands}: Shows a list of the commands the engine knows. - \item \texttt{known\_command}: Receives an argument and tells wether it is a - known command or not. + \item \texttt{known\_command}: Receives an argument and tells whether it is + a known command or not. \item \texttt{name}: Shows the name of the program. \item \texttt{version}: Shows the version of the program. \item \texttt{protocol\_version}: Shows the implemented \acrshort{gtp} @@ -320,13 +320,23 @@ The costs are calculated based on a programmer salary of 20€/hour. \midrule Game preliminary research & 15 & 300 \\ \midrule - Game implementation & 55 & 1100 \\ + Game implementation & 95 & 1900 \\ \midrule - Game unit testing & 50 & 1000 \\ + Game unit testing & 90 & 1800 \\ \midrule - Game system testing & 5 & 100 \\ + Game system testing & 15 & 300 \\ \midrule - \textbf{Total} & \textbf{125} & \textbf{2500} \\ + Engine preliminary research & 15 & 300 \\ + \midrule + Engine implementation & 75 & 1500 \\ + \midrule + Algorithms implementations & 135 & 2700 \\ + \midrule + Engine testing & 75 & 1500 \\ + \midrule + Results analysis & 30 & 600 \\ + \midrule + \textbf{Total} & \textbf{545} & \textbf{10900} \\ \bottomrule \end{tabular} } @@ -354,11 +364,11 @@ The costs are calculated based on a programmer salary of 20€/hour. \toprule \textbf{Category} & \textbf{Cost (€)} \\ \midrule - Work & 2500 \\ + Work & 10900 \\ \midrule Materials & 600 \\ \midrule - \textbf{Total} & \textbf{3100} \\ + \textbf{Total} & \textbf{11500} \\ \bottomrule \end{tabular} } @@ -372,17 +382,17 @@ The costs are calculated based on a programmer salary of 20€/hour. \toprule \textbf{Task} & \textbf{Cost (€)} \\ \midrule - Game preliminary research & 300 \\ + Game system development & 2200 \\ \midrule - Game implementation & 1100 \\ + Engine development & 4500 \\ \midrule - Game unit testing & 1000 \\ + Testing & 3600 \\ \midrule - Game system testing & 100 \\ + Result analysis & 600 \\ \midrule Materials & 600 \\ \midrule - \textbf{Total} & \textbf{3100} \\ + \textbf{Total} & \textbf{11500} \\ \bottomrule \end{tabular} } diff --git a/doc/tex/imago.tex b/doc/tex/imago.tex index 4287330..ca72c7a 100644 --- a/doc/tex/imago.tex +++ b/doc/tex/imago.tex @@ -51,12 +51,13 @@ \includegraphics[width=0.3\textwidth]{img/logoEII.png} \end{center}~\\[10pt] \program\\ - \large An AI player of the game of Go + \large An AI player of the game of Go\\ + \large (Juego Go basado en inteligencia artificial)\\ } \author{Íñigo Gutiérrez Fernández} -\date{} +\date{Oviedo, June 2023} \maketitle @@ -71,12 +72,20 @@ \clearpage \begin{abstract} - The game of Go presents a complex problem for machine learning by virtue of - containing a very wide and deep decision tree. This project has tried to - tackle the problem by using different decision algorithms and also provides - a full implementation of the game. These tools could be used by players and - developers as a foundation for other machine learning projects or to simply - keep studying the game. + With a history of more than 3000 years, the game of Go presents a complex + problem for machine learning by virtue of containing a very wide and deep + decision tree. Finally, in 2016, computer scientists from DeepMind were able + to create an artificial intelligence capable of defeating profesional + players of the game with a combination of old and new strategies. This + project has tried to follow their steps and tackle the problem by using + different decision algorithms, such as Monte Carlo Tree Search and neural + networks, and also provides a full implementation of the game, playable on + its own or available as a library for the engine developed for this project + and potentially others to come. The resulting strength of the developed + algorithms is no match to that of a profesional player, but it shows the + possibilities achievable just with the limited resources employed on this + project. These tools could be used by players and developers as a foundation + for other machine learning projects or to simply keep studying the game. \end{abstract} \clearpage diff --git a/doc/tex/implementation.tex b/doc/tex/implementation.tex index 4970c14..d3cd0c3 100644 --- a/doc/tex/implementation.tex +++ b/doc/tex/implementation.tex @@ -98,6 +98,9 @@ A version control tool widely used in software development environments allows to store and manage snapshots of a project, navigate through them and diverge into different development branches, among other useful features. +The source code of this document and of the rest of the project is publicly +available at \url{https://git.taamas.xyz/Taamas/imago}. + \subsubsection{Documentation Tools} \paragraph{\LaTeX} @@ -260,11 +263,13 @@ The script used to run the tests is shown on \lref{lst:test} and its output on \subsubsection{Usability Testing} -A human user was asked to interact with the interfaces of \program{} and -presented with a questionary. The profile of this user is of someone who has -played some Go matches and knows the fundamentals of the game but is a beginner, -and who has little experience with computers outside of their usage as office -tools and internet browsers. Here are their answers. +Two human users were asked to interact with the interfaces of \program{} and +presented with a questionary. + +The profile of the first user is of someone who has played some Go matches and +knows the fundamentals of the game but is a beginner, and who has little +experience with computers outside of their usage as office tools and internet +browsers. Here are their answers. \vspace{\interclassSpace} @@ -330,3 +335,71 @@ tools and internet browsers. Here are their answers. Yes.\\ \bottomrule \end{tabular} + +The profile of the second user is of someone who has experience with computers +and works as a software developer, but who has just the bare minimum knowledge +of the game of Go. Here are their answers. + +\vspace{\interclassSpace} + +\begin{tabular}{p{0.4\linewidth}p{0.6\linewidth}} + \toprule + \multicolumn{2}{c}{\textbf{Playing against a human}} \\ + \midrule + \textbf{Question} & \textbf{Answer} \\ + \midrule + Were you able to start the interface? & + Yes, I was able to. \\ + \midrule + How hard was the interface of the game to understand? & + I think six out of ten. Some people won't understand what a command is and + without a visual interface they could feel confused about it.\\ + \bottomrule +\end{tabular} + +\vspace{\interclassSpace} + +\begin{tabular}{p{0.4\linewidth}p{0.6\linewidth}} + \toprule + \multicolumn{2}{c}{\textbf{Playing against the engine}} \\ + \midrule + \textbf{Question} & \textbf{Answer} \\ + \midrule + Were you able to start the interface? & + Yes, I was. \\ + \midrule + How hard was the interface of the game to understand? & + I think seven out of ten. I was expecting to follow some steps so I could + execute it at the same time I was reading the manual, but in the end the + most practical thing was read everything before execute commands.\\ + \midrule + How strong did you find the engine? & + It followed good paths to win the game, I didn't feel random moves during + the game by its side.\\ + \bottomrule +\end{tabular} + +\vspace{\interclassSpace} + +\begin{tabular}{p{0.4\linewidth}p{0.6\linewidth}} + \toprule + \multicolumn{2}{c}{\textbf{Playing against the interface through a + third-party}} \\ + \midrule + \textbf{Question} & \textbf{Answer} \\ + \midrule + Were you able to start the interface? & + Yes, I was. \\ + \midrule + Did you find any problems when setting up the engine? & + No, I didn't.\\ + \midrule + Do you think this tool has value for studying Go? & + I think it is a good tool for a group of players, so they can practise and + even train the AI if they want to.\\ + \bottomrule +\end{tabular} + +The results of these usability tests were useful mostly to update the manual and +make it easier to understand and follow and also to address some problems with +the interfaces that raised up during the testing. |