From 3b78e9f3751dfc7c77a7d137d0dbab04afcb23f5 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Fri, 28 Oct 2022 19:09:24 +0200 Subject: Adding glossary. --- doc/tex/conclusions.tex | 4 +-- doc/tex/glossary.tex | 36 +++++++++++++++++++++++++++ doc/tex/imago.tex | 25 ++++++++++++------- doc/tex/introduction.tex | 4 +-- doc/tex/planning.tex | 61 ++++++++++++++++++++++++++-------------------- doc/tex/systemAnalysis.tex | 2 +- doc/tex/systemDesign.tex | 2 +- 7 files changed, 91 insertions(+), 43 deletions(-) create mode 100644 doc/tex/glossary.tex (limited to 'doc/tex') diff --git a/doc/tex/conclusions.tex b/doc/tex/conclusions.tex index 9b6fd00..16118e0 100644 --- a/doc/tex/conclusions.tex +++ b/doc/tex/conclusions.tex @@ -6,14 +6,14 @@ could be done in the future to improve the system are discussed here. \subsection{Problems with the Implementation of the Game} While Go has a simple set of rules, they lead to many borderline cases which -must be specifically addressed. For example, the ko rule obliges to check the +must be specifically addressed. For example, the \gls{ko} rule obliges to check the previous board positions after each move so no boards are repeated. These problems have been solved by designing the tree of moves of a match so each move stores the full board layout after it has been played. This of course increases the memory needed to run the application, but has been chosen over the alternative of having to recreate the board parsing the tree backwards for each -move to check if ko is occurring, if a move makes a capture and which stones +move to check if \gls{ko} is occurring, if a move makes a capture and which stones have already been captured, etc. It is the old problem of memory versus processing, which in this case has been answered with memory. Which one would be the best solution would require a deep analysis out of the scope of the project. diff --git a/doc/tex/glossary.tex b/doc/tex/glossary.tex new file mode 100644 index 0000000..8b43e94 --- /dev/null +++ b/doc/tex/glossary.tex @@ -0,0 +1,36 @@ +\newglossaryentry{ko} +{ + name=ko, + description={A rule which prevents plays that would repeat the previous + board position} +} + +\newglossaryentry{superko} +{ + name=superko, + description={An extension to the ko rule to prevent any previous board + position and not just the last one} +} + +\newglossaryentry{komi} +{ + name=komi, + description={Points given to the white player to compensate for playing + second} +} + +\newglossaryentry{suicide} +{ + name=suicide move, + description={A typically prohibited move which would cause the player's + group to have zero liberties} +} + +\newglossaryentry{tsumego} +{ + name=tsumego, + description={A Go problem} +} + +\newacronym{sgf}{SGF}{Smart Game Format} +\newacronym{gtp}{GTP}{Go Text Protocol} diff --git a/doc/tex/imago.tex b/doc/tex/imago.tex index fbf0291..4b292f1 100644 --- a/doc/tex/imago.tex +++ b/doc/tex/imago.tex @@ -28,21 +28,25 @@ \usepackage{minted} % Code importing and formatting \setminted{linenos, breaklines} +\usepackage[acronym, toc]{glossaries} +\makeglossaries +\input{tex/glossary.tex} + \newcommand{\program}{Imago} \newcommand{\fref}[1]{Fig.~\ref{#1}} \newcommand{\lref}[1]{Listing~\ref{#1}} %\newcommand{\uurl}[1]{\underline{\url{#1}}} -\newcommand{\acronim}[2] -{ - \iftoggle{#1} - {#1} - {#1 (#2)\toggletrue{#1}} -} - -\newtoggle{SGF} -\newcommand{\acrSGF}[0]{\acronim{SGF}{Smart Game Format}} +%\newcommand{\acronim}[2] +%{ +% \iftoggle{#1} +% {#1} +% {#1 (#2)\toggletrue{#1}} +%} +% +%\newtoggle{SGF} +%\newcommand{\acrSGF}[0]{\acronim{SGF}{Smart Game Format}} \newcommand{\tabitem}{~~\llap{\textbullet}~~} @@ -178,6 +182,9 @@ inclusion to use this template is included here. \input{tex/conclusions.tex} \clearpage +\printglossaries +\clearpage + % References (bibliography) \setcounter{secnumdepth}{0} diff --git a/doc/tex/introduction.tex b/doc/tex/introduction.tex index 099f412..5528bd5 100644 --- a/doc/tex/introduction.tex +++ b/doc/tex/introduction.tex @@ -43,9 +43,7 @@ Presented here are the ideal targets of the project. game's rules. \item An engine capable of analyzing board positions and generating strong moves via various decision algorithms. - \item Either a GUI specifically developed for the project or an - implementation of an existing protocol so the engine can be used with - existing tools and GUIs. + \item Compatibility with existing GUIs. \item A way for processing existing records of games, which are usually recorded in the SGF format. \end{itemize} diff --git a/doc/tex/planning.tex b/doc/tex/planning.tex index 1450e8a..2caace3 100644 --- a/doc/tex/planning.tex +++ b/doc/tex/planning.tex @@ -12,7 +12,7 @@ components and needs. The rules of the game must be implemented, ideally in a way they can be tested by direct human play. This system will at its bare minimum represent the -Japanese Go rules (area scoring, no superko rule, no suicide moves). +Japanese Go rules (area scoring, no \gls{superko} rule, no \gls{suicide} moves). \subsubsection{Engine Implementation} @@ -125,29 +125,35 @@ presents a great resource for this project. The logo of the project is shown on A software capable of playing Go part of the GNU project. Although not a strong engine anymore, it is interesting for historic reasons as the free software -engine for which the GTP protocol was first defined. The logo of the project is shown on -\fref{fig:gnuGoLogo}. +engine for which the \acrshort{gtp} protocol was first defined. The logo of the +project is shown on \fref{fig:gnuGoLogo}. \subsubsection{Existing Standards} -\paragraph{GTP \cite{gtp}} +\paragraph{\acrshort{gtp} \cite{gtp}} -GTP (\textit{Go Text Protocol}) is a text based protocol for +\acrshort{gtp} (\textit{\acrlong{gtp}}) is a text based protocol for communication with computer Go programs. It is the protocol used by GNU Go and -the more modern and powerful KataGo. By supporting GTP the engine developed for -this project can be used with existing GUIs and other programs, making it easier -to use it with the tools users are already familiar with. - -\paragraph{SGF \cite{sgf}} - -SGF (\textit{Smart Go Format} or, in a more general context, \textit{Smart Game -Format}) is a text format widely used for storing records of Go matches which -allows for variants, comments and other metadata. It was devised for Go but it -supports other games with similar turn-based structure. Many popular playing -tools use it. By supporting SGF vast existing collections of games, such as -those played on online Go servers, can be used to train the decision algorithms -based on neural networks. An example of a SGF file can be seen on -\lref{lst:sgfExample}. +the more modern and powerful KataGo. By supporting \acrshort{gtp} the engine +developed for this project can be used with existing GUIs and other programs, +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.} +% \label{lst:gtpExample} +%\end{listing} + +\paragraph{\acrshort{sgf} \cite{sgf}} + +\acrshort{sgf} (\textit{\acrlong{sgf}}) is a text format widely used for storing +records of Go matches which allows for variants, comments and other metadata. It +was devised for Go but it supports other games with similar turn-based +structure. Many popular playing tools use it. By supporting \acrshort{sgf} vast +existing collections of games, such as those played on online Go servers, can be +used to train the decision algorithms based on neural networks. An example of a +\acrshort{sgf} file can be seen on \lref{lst:sgfExample}. \begin{listing}[h] \inputminted[breakafter=\]]{text}{listings/sgfExample.sgf} @@ -167,10 +173,10 @@ based on neural networks. An example of a SGF file can be seen on \subsubsection{Sabaki \cite{sabaki}} -Sabaki is a Go board software compatible with GTP engines. It can serve as a GUI -for the engine developed in this project and as an example of the advantages of -following a standardized protocol. Part of its graphical interface is shown on -\fref{fig:sabaki}. +Sabaki is a Go board software compatible with \acrshort{gtp} engines. It can +serve as a GUI for the engine developed in this project and as an example of the +advantages of following a standardized protocol. Part of its graphical interface +is shown on \fref{fig:sabaki}. \begin{figure}[h] \begin{center} @@ -210,11 +216,12 @@ choice is Python \cite{python}, for various reasons: Both the game and the engine will offer a text interface. For the game this allows for quick human testing. For the engine it is mandated by the protocol, -since GTP is a text based protocol for programs using text interfaces. -Independent programs compatible with this interface can be used as a GUI. +since \acrshort{gtp} is a text based protocol for programs using text +interfaces. Independent programs compatible with this interface can be used as a +GUI. -There is also the need of an interface with SGF files so existing games can be -processed by the trainer. +There is also the need of an interface with \acrshort{sgf} files so existing +games can be processed by the trainer. Both the engine and the trainer will need to interface with the files storing the neural network models. diff --git a/doc/tex/systemAnalysis.tex b/doc/tex/systemAnalysis.tex index c84f95f..3668f4e 100644 --- a/doc/tex/systemAnalysis.tex +++ b/doc/tex/systemAnalysis.tex @@ -92,7 +92,7 @@ requisites needed for the system. \item There exist commands to set up the conditions of the match. \begin{enumerate} \item The size of the board can be set. - \item The komi can be set. + \item The \gls{komi} can be set. \end{enumerate} \item There exist commands to manipulate the internal representation of the match. diff --git a/doc/tex/systemDesign.tex b/doc/tex/systemDesign.tex index f54032f..3e82698 100644 --- a/doc/tex/systemDesign.tex +++ b/doc/tex/systemDesign.tex @@ -279,7 +279,7 @@ 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 properties only usable in the root node, like those which specify general game -information and properties such as rank of players or komi. +information and properties such as rank of players or \gls{komi}. Here follows an explanation of the role and motivation before each component of the Training module to show how these previous concerns have been addressed and -- cgit v1.2.1