diff options
Diffstat (limited to 'doc/tex/implementation.tex')
-rw-r--r-- | doc/tex/implementation.tex | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/doc/tex/implementation.tex b/doc/tex/implementation.tex index 9e42313..28fd0ec 100644 --- a/doc/tex/implementation.tex +++ b/doc/tex/implementation.tex @@ -2,9 +2,23 @@ \subsection{Engine} -An engine implementing GTP.\@ It is designed to be used by a software controller +An implementation of GTP, that is, the piece of software which offers the 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} +in \fref{fig:engine}. The core of the engine is related with three components, +each with a separate responsibility: + +\begin{itemize} + \item The IO component is the one called from other applications and offers + the text interface. It reads and processes input and calls corresponding + commands from the core of the engine. + \item The EngineBoard component stores the state of the match, recording + information such as the history of boards positions and whose turn goes + next. The engine core uses it for these state-storing purposes. + \item The EngineAI component is responsible of analyzing the match and + generate moves. The engine core uses it when a decision has to be made + by the AI, such as when a move needs to be generated by the engine. +\end{itemize} \begin{figure}[h] \begin{center} @@ -28,14 +42,16 @@ moves. One module to read and write SGF files. Modules are shown in \subsection{Representation of a match} -Strictly said, a match is composed of a series of moves. But since game review -and variants exploration is an important part of Go learing, \program{} allows -for navigation back and forth through the board states of a match and for new +A regular Go match is composed of a list of moves. But since game review and +variants exploration is an important part of Go learning, \program{} allows for +navigation back and forth through the board states of a match and for new variants to be created from each of these board states. Therefore, a match is -represented as a tree of moves. The state of the game must also be present so -liberties, captures and legality of moves can be addressed, so it is represented -with its own class, which holds a reference both to the game tree and the -current move. This classes and their relationship can be seen in +represented as a tree of moves. The state of the board at any given move must +also be stored so liberties, captures count and legality of moves can be +addressed, so it is represented with its own class, which holds a reference both +to the game tree and the current move. Moves depend on a representation of the +game board to have access to its current layout and count of captured stones. +These classes and their relationships can be seen in \fref{fig:gameRepresentation}. \begin{figure}[h] |