diff options
Diffstat (limited to 'doc/tex')
-rw-r--r-- | doc/tex/implementation.tex | 2 | ||||
-rw-r--r-- | doc/tex/introduction.tex | 2 | ||||
-rw-r--r-- | doc/tex/planning.tex | 4 | ||||
-rw-r--r-- | doc/tex/results.tex | 4 | ||||
-rw-r--r-- | doc/tex/systemAnalysis.tex | 29 | ||||
-rw-r--r-- | doc/tex/systemDesign.tex | 28 |
6 files changed, 34 insertions, 35 deletions
diff --git a/doc/tex/implementation.tex b/doc/tex/implementation.tex index ffb2802..f89e54c 100644 --- a/doc/tex/implementation.tex +++ b/doc/tex/implementation.tex @@ -53,7 +53,7 @@ board configuration. A tool for generating compilers in Python. It is an implementation of the lex and yacc utilities, allowing to create lexers and parsers. It is used in the -project to create the SGF parser which transform SGF files to internal +project to create the \acrshort{sgf} parser which transform \acrshort{sgf} files to internal representations of Go matches. \paragraph{Other utility libraries} diff --git a/doc/tex/introduction.tex b/doc/tex/introduction.tex index 5528bd5..8b5430c 100644 --- a/doc/tex/introduction.tex +++ b/doc/tex/introduction.tex @@ -45,5 +45,5 @@ Presented here are the ideal targets of the project. moves via various decision algorithms. \item Compatibility with existing GUIs. \item A way for processing existing records of games, which are usually - recorded in the SGF format. + recorded in the \acrshort{sgf} format. \end{itemize} diff --git a/doc/tex/planning.tex b/doc/tex/planning.tex index 2caace3..0e8749f 100644 --- a/doc/tex/planning.tex +++ b/doc/tex/planning.tex @@ -141,7 +141,7 @@ making it easier to use it with the tools users are already familiar with. %TODO %\begin{listing}[h] % \inputminted{text}{listings/gtpExample.sgf} -% \caption{GTP session example.} +% \caption{\acrshort{gtp} session example.} % \label{lst:gtpExample} %\end{listing} @@ -157,7 +157,7 @@ used to train the decision algorithms based on neural networks. An example of a \begin{listing}[h] \inputminted[breakafter=\]]{text}{listings/sgfExample.sgf} - \caption{SGF example. Describes a tsumego (Go problem) setup and two + \caption{\acrshort{sgf} example. Describes a tsumego (Go problem) setup and two variants, one commented as "Correct" and other commented as "Incorrect".} \label{lst:sgfExample} \end{listing} diff --git a/doc/tex/results.tex b/doc/tex/results.tex index e37c0b2..5433041 100644 --- a/doc/tex/results.tex +++ b/doc/tex/results.tex @@ -102,14 +102,14 @@ so no more are shown here. \subsection{Neural Network Training} -Each network has been training by receiving batches of SGF files which are first +Each network has been training by receiving batches of \acrshort{sgf} files which are first converted to lists of moves by the Training System and then provided to the train function of the networks. This has been executed with the following command: \inputminted[fontsize=\small]{bash}{listings/trainCommand.sh} -Which lists the contents of a folder containing multiple SGF files, shuffles the +Which lists the contents of a folder containing multiple \acrshort{sgf} files, shuffles the list, takes some of them and passes them to train.py as arguments. The combined list of game positions and moves made from them in all the games selected make up the sample of the training. The number of files selected can of course be diff --git a/doc/tex/systemAnalysis.tex b/doc/tex/systemAnalysis.tex index 3668f4e..bbae66e 100644 --- a/doc/tex/systemAnalysis.tex +++ b/doc/tex/systemAnalysis.tex @@ -16,10 +16,10 @@ These are the main goals the final product must reach. code. \item An engine program as a way of presenting an interface for using these - algorithms. The engine will use the GTP so it can be used with an + algorithms. The engine will use the \acrshort{gtp} so it can be used with an existing GUI or other tools. - \item A parser for SGF files so they can be processed in the training of + \item A parser for \acrshort{sgf} files so they can be processed in the training of neural networks. \end{enumerate} @@ -84,8 +84,7 @@ requisites needed for the system. \item The engine program is interactive. - \item The engine implements the GTP (\textit{Go Text Protocol}) for its - interface. + \item The engine implements the \acrfull{gtp} for its interface. \begin{enumerate} \item Commands are read from standard input. \item Responses are provided via standard output. @@ -149,7 +148,7 @@ requisites needed for the system. \item The trainer can import existing games. \begin{enumerate} - \item Records of games stored as SGF can be imported. + \item Records of games stored as \acrshort{sgf} can be imported. \item Files containing records of games are provided as arguments to the trainer. \end{enumerate} @@ -264,16 +263,16 @@ between human players to show and test its capabilities. \subsubsection{Engine System} -The Engine System will implement the GTP interface and use the Game System to +The Engine System will implement the \acrshort{gtp} interface and use the Game System to analyse positions and generate moves via decision algorithms. This system can be directly called to manually set up game states and ask for -moves or can be called by other programs which use GTP to be used as backend for +moves or can be called by other programs which use \acrshort{gtp} to be used as backend for playing matches against a computer player. \subsubsection{Training System} -The Training System will process SGF files storing records of games, train the +The Training System will process \acrshort{sgf} files storing records of games, train the neural network models over those games and store the result. These models can then be imported by the engine and be used to generate moves. @@ -285,7 +284,7 @@ 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 SGF file. +representation of a game resulting from the processing of an \acrshort{sgf} file. \subsection{Class Analysis} @@ -666,12 +665,12 @@ The classes resulting from the analysis phase are shown in \textbf{Parser} \\ \midrule \textbf{Description} \\ - Reads SGF files and converts them to a tree of GameMove from the Game + Reads \acrshort{sgf} files and converts them to a tree of GameMove from the Game System. \\ \midrule \textbf{Responsibilities} \\ - \tabitem{Read SGF files.} \\ - \tabitem{Convert the content of the SGF files to a tree of GameMove.} \\ + \tabitem{Read \acrshort{sgf} files.} \\ + \tabitem{Convert the content of the \acrshort{sgf} files to a tree of GameMove.} \\ \midrule \textbf{Proposed attributes} \\ %TODO: Explain why this is empty @@ -688,14 +687,14 @@ The classes resulting from the analysis phase are shown in \textbf{ASTNode} \\ \midrule \textbf{Description} \\ - Makes up the tree resulting from the parsing of an SGF file.\\ + 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.} \\ \midrule \textbf{Proposed attributes} \\ \tabitem{\textbf{children}: The nodes following from itself.} \\ - \tabitem{\textbf{props}: The properties of the tree read from an SGF file.} + \tabitem{\textbf{props}: The properties of the tree read from an \acrshort{sgf} file.} \\ \midrule \textbf{Proposed methods} \\ @@ -746,7 +745,7 @@ against another machine player. \paragraph{Generate a move} The engine interface reads the input for generating a move as stated by the -GTP protocol and outputs the coordinates of the board to play. +\acrshort{gtp} protocol and outputs the coordinates of the board to play. \subsection{Use Case Analysis and Scenarios} diff --git a/doc/tex/systemDesign.tex b/doc/tex/systemDesign.tex index 3e82698..f0762e8 100644 --- a/doc/tex/systemDesign.tex +++ b/doc/tex/systemDesign.tex @@ -58,11 +58,11 @@ These classes and their relationships can be seen in \fref{fig:game}. \begin{figure}[h] \begin{center} \includegraphics[width=0.8\textwidth]{diagrams/engineModule.png} - \caption{Design of the GTP engine.}\label{fig:engine} + \caption{Design of the \acrshort{gtp} engine.}\label{fig:engine} \end{center} \end{figure} -An implementation of GTP, that is, the piece of software which offers the GTP +An implementation of \acrshort{gtp}, that is, the piece of software which offers the \acrshort{gtp} interface to other applications. It is designed to be used by a software controller but can also be directly run, mostly for debugging purposes. Its design is shown in \fref{fig:engine}. The core of the engine is related with @@ -258,7 +258,7 @@ respectively. \begin{figure}[h] \begin{center} \includegraphics[width=\textwidth]{diagrams/trainingModule.png} - \caption{Components of the SGF file parsing module.} + \caption{Components of the \acrshort{sgf} file parsing module.} \label{fig:trainingModule} Components not showing a capital C are not classes, as in they not follow the object-oriented paradigm and do not implement any classes, @@ -269,15 +269,15 @@ respectively. Neural networks can be powerful machine learning algorithms, but they have to be trained first so they can provide meaningful results. For a Go AI it makes sense to have its algorithms trained on Go games. There exists a common text format to -store Go games: SGF. If the system is able to process SGF files, it can provide +store Go games: \acrshort{sgf}. If the system is able to process \acrshort{sgf} files, it can provide the games stored on them to the neural networks for training. And so the need -for an SGF parser arises. +for an \acrshort{sgf} parser arises. -To parse SGF files a lexer and parser have been implemented using PLY.\@ The +To parse \acrshort{sgf} files a lexer and parser have been implemented using PLY.\@ The result of the parsing is an AST (Annotated Syntax Tree) reflecting the contents of the text input, each node with zero or more properties, and with the ability to convert themselves and their corresponding subtree into a GameMove tree. This -is done for the root node, since from the SGF specification there are some +is done for the root node, since from the \acrshort{sgf} specification there are some properties only usable in the root node, like those which specify general game information and properties such as rank of players or \gls{komi}. @@ -287,19 +287,19 @@ solved. These components are shown in \fref{fig:trainingModule}. \begin{itemize} - \item \textbf{SGF}: Provides a high-level method to convert a path to a SGF + \item \textbf{\acrshort{sgf}}: Provides a high-level method to convert a path to a \acrshort{sgf} file to a GameMove tree. - \item \textbf{sgfyacc}: The implementation of a SGF parser using PLY. Takes + \item \textbf{sgfyacc}: The implementation of a \acrshort{sgf} parser using PLY. Takes the tokens generated by \textbf{sgflex} and creates an ASTNode tree from them. - \item \textbf{sgflex}: The implementation of a SGF lexer using PLY.\@ Takes - text input and generates the tokens of the SGF language from them. + \item \textbf{sgflex}: The implementation of a \acrshort{sgf} lexer using PLY.\@ Takes + text input and generates the tokens of the \acrshort{sgf} language from them. - \item \textbf{ASTNode}: The AST resulting from the parsing of a SGF file. + \item \textbf{ASTNode}: The AST resulting from the parsing of a \acrshort{sgf} file. Has a method to convert it to a tree of GameMove and so obtain the - contents of the SGF in the internal representation used by the project's + contents of the \acrshort{sgf} in the internal representation used by the project's systems. \item \textbf{Property}: The representation of a property of an ASTNode @@ -313,7 +313,7 @@ The training can be started with the executable \texttt{train.py}. %\subsection{Modules} % %One module to store the state of the game and the game tree. One module to parse -%moves. One module to read and write SGF files. Modules are shown in +%moves. One module to read and write \acrshort{sgf} files. Modules are shown in %\fref{fig:modules}. % %\begin{figure}[h] |