From 2d895e4abb26eccefe6b4bc201fd60eb79600e3e Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Sat, 13 May 2023 19:44:54 +0200 Subject: Added visualization of SGF example. --- doc/tex/systemAnalysis.tex | 58 +++++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 26 deletions(-) (limited to 'doc/tex/systemAnalysis.tex') diff --git a/doc/tex/systemAnalysis.tex b/doc/tex/systemAnalysis.tex index ba5fbf1..5263d1f 100644 --- a/doc/tex/systemAnalysis.tex +++ b/doc/tex/systemAnalysis.tex @@ -7,7 +7,7 @@ These are the main goals the final product must reach. \begin{enumerate} \item The implementation, analysis and comparison of different decision - algorithms for genarating moves. This is the main goal and the following + algorithms for generating moves. This is the main goal and the following ones are derived from the need of reaching it. \item A library for representing the game of Go. It can be used for the @@ -278,13 +278,14 @@ then be imported by the engine and be used to generate moves. \subsubsection{Interface Between Subsystems} -The Training System depends on the NeuralNetwork interface of the Engine System -and uses it to train and store the neural network models. +The Training System depends on the \texttt{NeuralNetwork} interface of the +Engine System and uses it to train and store the neural network models. -Both the Engine and Training systems depend on the GameMove class of the Game -System. The Engine System uses it to store the state of a game and provide it -to the decision algorithms. The Training System uses it to create the internal -representation of a game resulting from the processing of an \acrshort{sgf} file. +Both the Engine and Training systems depend on the \texttt{GameMove} class of +the Game System. The Engine System uses it to store the state of a game and +provide it to the decision algorithms. The Training System uses it to create the +internal representation of a game resulting from the processing of an +\acrshort{sgf} file. \subsection{Class Analysis} @@ -415,7 +416,7 @@ The classes resulting from the analysis phase are shown in \tabitem{\textbf{visits}: How many times the node has been visited.} \\ \tabitem{\textbf{score}: The number of explorations of the node resulting in victory.} \\ - \tabitem{\textbf{move}: A GameMove for accessing game state and logic.} \\ + \tabitem{\textbf{move}: A \texttt{GameMove} for accessing game state and logic.} \\ \tabitem{\textbf{parent}: This node's parent in the tree.} \\ \tabitem{\textbf{children}: The nodes following from this node in the tree.} \\ @@ -430,7 +431,7 @@ The classes resulting from the analysis phase are shown in Selects the most promising node which still has some unexplored children.} \\ \tabitem{\textbf{expansion()}: Monte Carlo Tree Search expansion step. Picks - an unexplored vertex from the node and adds it as a new MCTSNode.} \\ + an unexplored vertex from the node and adds it as a new \texttt{MCTSNode}.} \\ \tabitem{\textbf{expansionForCoords()}: Performs an expansion for the given coordinates. This represents forcing a move on the algorithm.} \\ \tabitem{\textbf{simulation()}: Play random matches to accumulate reward @@ -445,17 +446,17 @@ The classes resulting from the analysis phase are shown in \textbf{Keras} \\ \midrule \textbf{Description} \\ - Implements the DecisionAlgorithm interface to give access to a neural - network. \\ + Implements the \texttt{DecisionAlgorithm} interface to give access to a + neural network. \\ \midrule \textbf{Responsibilities} \\ \tabitem{Analyzing game states and generating moves.} \\ \midrule \textbf{Proposed attributes} \\ - \tabitem{\textbf{currentMove}: A GameMove for accessing game state and + \tabitem{\textbf{currentMove}: A \texttt{GameMove} for accessing game state and logic.} \\ - \tabitem{\textbf{neuralNetwork}: A NeuralNetwork instance for generating - moves.} \\ + \tabitem{\textbf{neuralNetwork}: A \texttt{NeuralNetwork} instance for + generating moves.} \\ \midrule \textbf{Proposed methods} \\ \decisionAlgorithmMethods @@ -477,10 +478,10 @@ The classes resulting from the analysis phase are shown in \tabitem{Loading a model file to use an existing trained neural network.} \\ \midrule \textbf{Proposed attributes} \\ - \tabitem{\textbf{currentMove}: A GameMove for accessing game state and + \tabitem{\textbf{currentMove}: A \texttt{GameMove} for accessing game state and logic.} \\ - \tabitem{\textbf{neuralNetwork}: A NeuralNetwork instance for generating - moves.} \\ + \tabitem{\textbf{neuralNetwork}: A \texttt{NeuralNetwork} instance for + generating moves.} \\ \midrule \textbf{Proposed methods} \\ \tabitem{\textbf{pickMove()}: Uses the current internal model to pick a move @@ -653,8 +654,8 @@ The classes resulting from the analysis phase are shown in %TODO: Explain why this is empty \midrule \textbf{Proposed methods} \\ - \tabitem{\textbf{loadGameTree()}: Reads a file and generates a GameMove tree - from its contents.} \\ + \tabitem{\textbf{loadGameTree()}: Reads a file and generates a + \texttt{GameMove} tree from its contents.} \\ \bottomrule \end{tabular} @@ -665,12 +666,13 @@ The classes resulting from the analysis phase are shown in \textbf{Parser} \\ \midrule \textbf{Description} \\ - Reads \acrshort{sgf} files and converts them to a tree of GameMove from the Game - System. \\ + Reads \acrshort{sgf} files and converts them to a tree of \texttt{GameMove} + from the Game System. \\ \midrule \textbf{Responsibilities} \\ \tabitem{Read \acrshort{sgf} files.} \\ - \tabitem{Convert the content of the \acrshort{sgf} files to a tree of GameMove.} \\ + \tabitem{Convert the content of the \acrshort{sgf} files to a tree of + \texttt{GameMove}.} \\ \midrule \textbf{Proposed attributes} \\ %TODO: Explain why this is empty @@ -690,7 +692,7 @@ The classes resulting from the analysis phase are shown in Makes up the tree resulting from the parsing of an \acrshort{sgf} file.\\ \midrule \textbf{Responsibilities} \\ - \tabitem{Obtain a GameMove tree from itself and its children.} \\ + \tabitem{Obtain a \texttt{GameMove} tree from itself and its children.} \\ \midrule \textbf{Proposed attributes} \\ \tabitem{\textbf{children}: The nodes following from itself.} \\ @@ -698,8 +700,8 @@ The classes resulting from the analysis phase are shown in \\ \midrule \textbf{Proposed methods} \\ - \tabitem{\textbf{toGameTree()}: Returns a GameMove tree corresponding to the - tree following from this node.} \\ + \tabitem{\textbf{toGameTree()}: Returns a \texttt{GameMove} tree + corresponding to the tree following from this node.} \\ \bottomrule \end{tabular} @@ -905,7 +907,7 @@ The script used to run the tests is shown on \lref{lst:test} and its output on % Maybe put an example report here? \begin{listing}[h] \inputminted{bash}{listings/test.sh} - \caption{Dense neural network model.} + \caption{Script to run the tests.} \label{lst:test} \end{listing} @@ -920,3 +922,7 @@ The script used to run the tests is shown on \lref{lst:test} and its output on \subsubsection{System Testing} \subsubsection{Usability Testing} + +% Game playing + +% Using the engine with an existing GUI -- cgit v1.2.1