aboutsummaryrefslogtreecommitdiff
path: root/doc/tex/implementation.tex
blob: f88d57f8d7a5f9c50a7ada46f730c6f05f585678 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
\section{Implementation}

\subsection{Development environment}

\subsubsection{Language}

The programming language of choice is Python\cite{python}. The rationale behind
this decision has been stated on Section \ref{sec:programmingLanguage}. It also
allows easy use of the Keras library for implementing neural networks.

Various python libraries have been used to easy the development process or
assist in the analysis of results. These are:

\paragraph{Keras/Tensorflow\cite{keras}}

Tensorflow is a platform for machine learning which provides a diverse range of
tools, one of which is a python library for machine learning.

Keras is a high-level API for Tensorflow allowing for the easy definition of
neural networks. It permits easily testing and comparing different network
layouts.

\paragraph{NumPy\cite{numpy}}

A scientific package for python providing a lot of mathematical tools. The most
interesting for this project are its capabilities to create and transform
matrices.

\paragraph{Matplotlib\cite{matplotlib}}

A python library for creating graphs and other visualizations. It is used to
show the likelihood of moves the neural networks of the project create from a
board configuration.

\paragraph{PLY\cite{ply}}

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
representations of Go matches.

\paragraph{Other utility libraries}

These are some utility libraries commonly used for frequent programming tasks:

\begin{itemize}
	\item \textbf{sys}: to stop the execution of the program or access system info such
		as primitives maximum values.
	\item \textbf{os}: to interact with files.
	\item \textbf{re}: to check strings with regular expressions.
	\item \textbf{random}: to get random values, for example to obtain a random
		item from a list.
	\item \textbf{copy}: to obtain deep copies of multidimensional arrays.
\end{itemize}

\subsubsection{Development tools}

\paragraph{Neovim\cite{neovim}}

A text editor based on Vim\cite{vim}, providing its same functionality with
useful additions and defaults for modern computers and terminal emulators. With
some extensions and configuration it can become a powerful development
environment with a very fluid usage experience. That, and the fact that the
developer considers Vim's modal editing the best writing experience possible on
a computer, have made Neovim the editor of choice.

\begin{itemize}
		%TODO: Write about neovim extensions
	\item FZF
	\item Extensions

\end{itemize}

\subsubsection{Documentation tools}

\paragraph{\LaTeX\cite{latex}}

A typesetting system widely used in the investigation field, among others. It
allows for documentation like this text to be written in plain text and then
compiled to PDF or other formats, which permits keeping the source files of the
documentation small and organized plus other benefits of plain text such as
being able to use version control.

\paragraph{PlantUML\cite{puml}}

A program which creates diagrams from plain text files. PlantUML supports syntax
for many different sorts of diagrams, mainly but not only UML. It has been used
to generate the diagrams used in this text.

\paragraph{Make}

A tool for specifying and handling dependencies on a build system. It reads a
file, typically named ``Makefile'', containing which files are needed and on
which other files each of them depends, and then generates those files or
updates them if they already exist but their source files are newer than them.

It has been used to generate this text from \LaTeX{} and PlantUML source files.
The contents of the Makefile with which this document has been compiled are
shown in \flist{code:makefile}.

\begin{listing}[h]
	\inputminted{make}{Makefile}
	\caption{Documentation Makefile}\label{code:makefile}
\end{listing}