Skip to content

Repository for the student research project: "Development of an AI for the chess endgame".

Notifications You must be signed in to change notification settings

silas-pohl/chess-endgame

Repository files navigation

Development of an AI for the chess endgame

This repository is being created as part of a student research project entitled Development of an AI for the chess endgame. In chess, it is possible to compute an optimal strategy for positions where only a few pieces are left on the board using a so-called retrograde analysis. The main goal is the implementation of this retrograde analysis in Python, in order to obtain a program that can handle the different endgames. For support and visualization the library python-chess is used and the program is implemented using Jupyter notebooks.

Access and run the notebooks (Recommended: Use a virtualenv)

git clone https://github.com/silas-pohl/chess-endgame.git
cd chess-endgame
pip install notebook
pip install -r requirements.txt
jupyter notebook

Notebooks and project structure

The jupyter notebooks are described below in the order of the intended execution sequence:

  1. Introduction.ipynb This notebook is the introduction to playing chess games using the python-chess library and endgame databases.
  2. ChessEndgame.ipynb The ChessEndgame class is created with which you can play/import different endgames with the help of the so-called Gaviota tablebases. Played games are exported and stored in a file in the /games folder.
  3. PlayChessEndgame.ipynb This notebook is used for actual playing with the ChessEndgame class, which was implemented in the previous notebook.
  4. RetrogradeAnalysis.ipynb This notebook contains the actual Retrograde Analysis algorithm with the help of which we can create our own tablebases. These tablebases are serialized and stored as binaries in the /tables folder.
  5. ExtendedChessEndgame.ipynb This notebook extends the first notebook and thus the ChessEndgame class. It implements the class CustomTablebases, which imports the previously created tablebases and the ChessEndgame class is adapted to the extent that playing with these custom tablebases is now possible. The actual playing with custom tablebases can take place directly in this notebook.
  6. Conclusion.ipynb This notebook is the conclusion for the student research project and contains the testing of the generated tablebases.

About

Repository for the student research project: "Development of an AI for the chess endgame".

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published