You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/AlphaDeepChess/Capitulos/AnalysisOfImprovements.tex
+6-7Lines changed: 6 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -109,11 +109,11 @@ \subsection*{Github actions and workflows}
109
109
110
110
\vspace{1em}
111
111
112
-
\parbox{\textwidth}{\noindent In this project, since it is public in a GitHub repository, we used GitHub Actions to automate the testing and evaluation of the chess engine with \textit{Stockfish} and \textit{CuteChess}. A workflow was configured (located at \texttt{.github\textbackslash{}workflows\textbackslash{}manual-workflow.yml}) to compile the engine and run automated games using \textit{CuteChess} between different versions of the engine or against \textit{Stockfish}.}
112
+
\parbox{\textwidth}{\noindent In this project, since it is public in a GitHub repository, we used GitHub Actions to automate the testing and evaluation of the chess engine with \textit{Stockfish} and \textit{Cutechess}. A workflow was configured (located at \texttt{.github\textbackslash{}workflows\textbackslash{}manual-workflow.yml}) to compile the engine and run automated games using \textit{Cutechess} between different versions of the engine or against \textit{Stockfish}.}
113
113
114
114
\section{Evaluation of improvements}
115
115
116
-
\noindent In this section we provide the results of a 100-game match between improved engine versions and a baseline version. The purpose of these matches is to measure the improvement in playing strength introduced by each new implementation. All matches are conducted using the tournament manager CuteChess with the following configuration:
116
+
\noindent In this section we provide the results of a 100-game match between improved engine versions and a baseline version. The purpose of these matches is to measure the improvement in playing strength introduced by each new implementation. All matches are conducted using the tournament manager \textit{Cutechess} with the following configuration:
117
117
118
118
\begin{enumerate}
119
119
\item 50 unique random starting positions, each played twice with alternating colors.
@@ -294,20 +294,19 @@ \section{Evaluation versus \textit{Stockfish}}
294
294
295
295
\newpage
296
296
297
-
\section{Engine Elo rating in Lichess}
297
+
\section{Engine elo rating in \textit{Lichess}}
298
298
299
299
\noindent We deployed the engine on \textit{Lichess}, the platform that allows engines to compete against both human players and other bots (see~\cref{sec:lichess}).
300
300
301
301
\vspace{1em}
302
302
303
-
\noindent Figure~\ref{fig:eloDistribution} illustrates the Elo rating distribution of players on Lichess, where the median rating is approximately 1500.
303
+
\noindent~\cref{fig:eloDistribution} illustrates the Elo rating distribution of players on \textit{Lichess}, where the median rating is approximately 1500.
304
304
\vspace{1em}
305
305
306
-
\noindent After playing more than 500 games, \textit{AlphaDeepChess} achieved an Elo rating of 1900 on Lichess~\cite{AlphaDeepChessElo}. This places the engine significantly above the platform's median and within the top percentiles of the player base. For reference, the highest-rated human player on the platform has reached an Elo of 3000 as of 2025~\cite{LichessBestPlayer}.
306
+
\noindent After playing more than 500 games, \textit{AlphaDeepChess} achieved an Elo rating of 1900 on \textit{Lichess}~\cite{AlphaDeepChessElo}. This places the engine significantly above the platform's median and within the top percentiles of the player base. For reference, the highest-rated human player on the platform has reached an Elo of 3000 as of 2025~\cite{LichessBestPlayer}.
Copy file name to clipboardExpand all lines: docs/AlphaDeepChess/Capitulos/ConclusionesTrabajoFuturo.tex
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -15,11 +15,11 @@ \chapter{Conclusions and future work}
15
15
\item\textit{Search with Late Move Reductions}: did not improve performance, as our current move-ordering heuristic is not strong enough to support such aggressive pruning.
16
16
\end{itemize}
17
17
18
-
\noindent The engine achieved an ELO rating of 1900 on Lichess while running on a Raspberry Pi 5 with a 2GB transposition table, demonstrating its efficiency even on resource-constrained hardware.
18
+
\noindent The engine achieved an ELO rating of 1900 on \textit{Lichess} while running on a Raspberry Pi 5 with a 2GB transposition table, demonstrating its efficiency even on resource-constrained hardware.
19
19
20
20
\vspace{1em}
21
21
22
-
\noindent The engine's Lichess profile can be found at:\\
22
+
\noindent The engine's \textit{Lichess} profile can be found at:\\
Copy file name to clipboardExpand all lines: docs/AlphaDeepChess/Capitulos/ContribucionesPersonales.tex
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -30,15 +30,15 @@ \section*{Juan Girón Herranz}
30
30
31
31
\item Implemented part of the UCI command parsing and communication for engine integration.
32
32
33
-
\item Conducted multiple 100-game matches using CuteChess between engine versions to measure the impact of each optimization.
33
+
\item Conducted multiple 100-game matches using \textit{Cutechess} between engine versions to measure the impact of each optimization.
34
34
35
35
\item Created hundreds of unit tests, which have been a fundamental part of finding bugs and ensuring code quality. This includes Perft testing of the move generator, a standard technique that counts all possible legal positions up to a certain depth to ensure the correctness of move generation in the chess engine.
36
36
37
37
\item Contributed to the development of a helper GUI in Python to facilitate interactive testing of the engine, with support for the UCI protocol.
38
38
39
39
\item Used Linux's \texttt{perf} tool, analyzed the CPU overhead of the different parts of the chess engine.
40
40
41
-
\item Compiled and deployed the engine on a Raspberry Pi 5, configuring it as a Lichess.org bot. Running under limited hardware resources, the engine achieved competitive ELO ratings while demonstrating our code's efficiency and portability.
41
+
\item Compiled and deployed the engine on a Raspberry Pi 5, configuring it as a \textit{Lichess} bot. Running under limited hardware resources, the engine achieved competitive ELO ratings while demonstrating our code's efficiency and portability.
\par It is based on the minimax search algorithm, enhanced with alpha-beta pruning. In addition, it incorporates several of the techniques described in later chapters (see Chapter~\ref{cap:descripcionTrabajo}).
469
+
\par It is based on the minimax search algorithm, enhanced with alpha-beta pruning. In addition, it incorporates several of the techniques described in later chapters (see Chapter~\cref{cap:descripcionTrabajo}).
470
470
471
471
\vspace{1em}
472
472
473
-
\par The key component of \textit{Stockfish}'s strength is its use of machine learning algorithms to evaluate chess positions more accurately, in particular, \textit{Stockfish} uses NNUE (Efficiently Updatable Neural Network), a neural network architecture originally developed for shogi engines and later adapted for chess~\cite{NNUE}. NNUE efficiently evaluates positions by finding and learning complex piece patterns. It is optimized to run quickly even on CPUs and significantly improves move ordering (see Chapter~\ref{cap:moveOrdering}), allowing the engine to explore the most promising lines first and prune large parts of the search tree.
473
+
\par The key component of \textit{Stockfish}'s strength is its use of machine learning algorithms to evaluate chess positions more accurately, in particular, \textit{Stockfish} uses NNUE (Efficiently Updatable Neural Network), a neural network architecture originally developed for shogi engines and later adapted for chess~\cite{NNUE}. NNUE efficiently evaluates positions by finding and learning complex piece patterns. It is optimized to run quickly even on CPUs and significantly improves move ordering (see Chapter~\cref{cap:moveOrdering}), allowing the engine to explore the most promising lines first and prune large parts of the search tree.
\textit{Lichess} is a free and open-source online chess platform that offers a wide range of features for both casual and competitive players. It was created by Thibault Duplessis in 2010 and has since grown into one of the most popular chess websites in the world, hosting millions of games each day~\cite{Lichess}.
482
+
\textit{Lichess} is a free and open-source online chess platform that offers a wide range of features for both casual and competitive players. It was created by Thibault Duplessis in 2010 and has since grown into one of the most popular chess websites in the world, hosting millions of games each day~\cite{Lichess}.
483
483
484
484
\vspace{1em}
485
485
486
-
\noindent Lichess provides a clean, ad-free user interface. It also features training tools such as puzzles, opening trainers, endgame practice, and access to a large game database.
486
+
\noindent\textit{Lichess} provides a clean, ad-free user interface. It also features training tools such as puzzles, opening trainers, endgame practice, and access to a large game database.
487
487
488
488
\vspace{1em}
489
489
490
-
\noindent One of Lichess's notable features is its use of an Elo based rating system to measure player strength in different game modes. Each player has a separate rating for different time controls and variants.
490
+
\noindent One of \textit{Lichess}'s notable features is its use of an Elo based rating system to measure player strength in different game modes. Each player has a separate rating for different time controls and variants.
491
491
492
492
\vspace{1em}
493
493
494
-
\noindent Lichess also supports chess engines and bots through the Lichess Bot API, enabling integration with engines like \textit{Stockfish}. It is often used for engine testing, AI competitions, and research purposes. Many developers and researchers use the Lichess platform as a benchmark or interface for evaluating engine performance.
494
+
\noindent\textit{Lichess} also supports chess engines and bots through the \textit{Lichess} Bot API, enabling integration with engines like \textit{Stockfish}. It is often used for engine testing, AI competitions, and research purposes. Many developers and researchers use the \textit{Lichess} platform as a benchmark or interface for evaluating engine performance.
Copy file name to clipboardExpand all lines: docs/AlphaDeepChess/Capitulos/ImprovementTechniques.tex
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -142,7 +142,7 @@ \subsection*{Collisions}
142
142
143
143
\section{Move generator with magic bitboards and pext instructions}
144
144
145
-
As previously discussed (see~\cref{sec:moveGenerator}), computing the legal moves for sliding pieces is computationally expensive, as it requires identifying which pieces block their paths within their attack patterns. In this section, we present a technique that enables the precomputation of all possible moves for rooks and bishops, while queen moves can be derived as the union of rook and bishop moves, allowing constant-time O(1) access.
145
+
As previously discussed (see~\cref{sec:moveGenerator}), computing the legal moves for sliding pieces is computationally expensive, as it requires identifying which pieces block their paths within their attack patterns. In this section, we present a technique that enables the precomputation of all possible moves for rooks and bishops, while queen moves can be derived as the union of rook and bishop moves, allowing constant-time O(1) access.
Only the nearest blockers along a sliding piece's movement direction are important. For example, in~\cref{fig:magics_position}, the pawn on d6 is a relevant blocker because it directly restricts the rook's movement. In contrast, the pawn on d7 is irrelevant, as it lies beyond the first blocker and does not influence the final set of legal moves.
161
+
Only the nearest blockers along a sliding piece's movement direction are important. For example, in~\cref{fig:magics_position}, the pawn on d6 is a relevant blocker because it directly restricts the rook's movement. In contrast, the pawn on d7 is irrelevant, as it lies beyond the first blocker and does not influence the final set of legal moves.
162
162
163
163
\item Compresses the blocker bitboard, pushing the important bits near the most significant bit.
164
164
\item The final multiplication must produce a unique index for each possible blocker configuration. The way to ensure the uniqueness is by brute force testing.
165
165
\end{itemize}
166
166
167
-
\noindent As illustrated in~\ref{fig:magics_position}, we aim to compute the legal moves of the white rook in the given position. In practice, the only pieces that truly block the rook's path are those marked with a red circle.
167
+
\noindent As illustrated in~\cref{fig:magics_position}, we aim to compute the legal moves of the white rook in the given position. In practice, the only pieces that truly block the rook's path are those marked with a red circle.
168
168
169
169
\vspace{1em}
170
170
@@ -189,7 +189,7 @@ \subsection*{Magic number generation}
189
189
190
190
\subsection*{Index calculation}
191
191
192
-
\noindent First, we mask out all pieces outside the rook's attack pattern or on the board borders, as shown in~\ref{fig:magic_preprocessing}.
192
+
\noindent First, we mask out all pieces outside the rook's attack pattern or on the board borders, as shown in~\cref{fig:magic_preprocessing}.
\caption{Pre-processing of the blockers bitboard}\label{fig:magic_preprocessing}
215
215
\end{figure}
216
216
217
-
\noindent As illustrated in~\ref{fig:magic_multiplication}, the masked blockers bitboard is then multiplied by the magic number. The result retains only the three relevant pawns that obstruct the rook's movement, pushing them toward the most significant bits.
217
+
\noindent As illustrated in~\cref{fig:magic_multiplication}, the masked blockers bitboard is then multiplied by the magic number. The result retains only the three relevant pawns that obstruct the rook's movement, pushing them toward the most significant bits.
\caption{Multiplication by magic number to produce an index}\label{fig:magic_multiplication}
242
242
\end{figure}
243
243
244
-
\noindent Next, we compress the index toward the least significant bits by shifting right by \(\,64-\)\texttt{relevant\_squares}. The number of relevant squares varies per board square; ~\ref{fig:rook_relevant_squares} shows this for the rook:
244
+
\noindent Next, we compress the index toward the least significant bits by shifting right by \(\,64-\)\texttt{relevant\_squares}. The number of relevant squares varies per board square;~\cref{fig:rook_relevant_squares} shows this for the rook:
In our implementation, a reduction of one ply is applied to non-capturing moves when the side to move is not in check, the remaining search depth is at least three plies, and the move index is beyond a threshold of the 10th move. The reduction condition is formally defined in Equation~\ref{eq:lmr}:
470
+
In our implementation, a reduction of one ply is applied to non-capturing moves when the side to move is not in check, the remaining search depth is at least three plies, and the move index is beyond a threshold of the 10th move. The reduction condition is formally defined in Equation~\cref{eq:lmr}:
Copy file name to clipboardExpand all lines: docs/AlphaDeepChess/Cascaras/abstract.tex
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ \section*{\tituloPortadaEngVal}
10
10
11
11
\vspace{1em}
12
12
13
-
The chess engine has been uploaded to the Lichess platform, where \textit{AlphaDeepChess} achieved an ELO rating of 1900 while running on a Raspberry Pi 5 equipped with a 2GB transposition table.
13
+
The chess engine has been uploaded to the \textit{Lichess} platform, where \textit{AlphaDeepChess} achieved an ELO rating of 1900 while running on a Raspberry Pi 5 equipped with a 2GB transposition table.
Copy file name to clipboardExpand all lines: docs/AlphaDeepChess/Cascaras/resumen.tex
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ \section*{\tituloPortadaVal}
10
10
11
11
\vspace{1em}
12
12
13
-
El motor ha sido subido a la plataforma Lichess, donde \textit{AlphaDeepChess} ha alcanzado una puntuación ELO de 1900, ejecutándose en una Raspberry Pi 5 con una tabla de transposiciones de 2GB.
13
+
El motor ha sido subido a la plataforma \textit{Lichess}, donde \textit{AlphaDeepChess} ha alcanzado una puntuación ELO de 1900, ejecutándose en una Raspberry Pi 5 con una tabla de transposiciones de 2GB.
0 commit comments