zero to checkmate is a chess-playing repository that leverages reinforcement learning and Monte Carlo methods to make strategic decisions. The repository provides various features that simulate self-play, evaluate positions, and make intelligent moves based on a neural network model trained through various techniques, including AlphaZero with Stockfish reinforcement, basic AlphaZero, Leela architecture, Monte Carlo Tree Search (MCTS), Q-learning on MCTS, and a CNN architecture for self-play.
- Chess Games from https://www.pgnmentor.com/files.html#players
- Stockfish 17 Used (https://stockfishchess.org/download/)
- Reinforcement Learning - Implements Reinforcement Algorithms like QLearning and Self Learning using Stockfish
- Minimax Algorithm: Implements a minimax algorithm with alpha-beta pruning for optimal move selection.
- Value Estimation: Utilizes a neural network for board state evaluation, alongside classic heuristic evaluations.
- Self-Play: Capable of playing against itself for training and testing purposes.
- PGN Export: Saves the game in PGN format for analysis and record-keeping.
- Transfer Learning: Implemented Transfer Learning on different models.
-
Python 3.x: Ensure you have Python 3 installed on your machine.
-
PyTorch: Install PyTorch following the instructions from the official website.
-
python-chess: Install the
python-chess
library.pip install python-chess
-
alpha_stockfish: Implements RL based Alpha Zero architecture with self learning using Stockfish (https://nikcheerla.github.io/deeplearningschool/2018/01/01/AlphaZero-Explained/)
-
MCTS: Monte Carlo Tree Search (https://en.wikipedia.org/wiki/Monte_Carlo_tree_search)
-
Leela: Implements the LEELA architecture (https://lczero.org/dev/backend/nn/)
-
Alpha Zero: Implements the base AlphaZero architecture (https://nikcheerla.github.io/deeplearningschool/2018/01/01/AlphaZero-Explained/)
-
Q-Learning based MCTS: Added Q Learning to improve MCTS (https://en.wikipedia.org/wiki/Q-learning)
-
CNN.py: Implements a CNN architecture for self-play. (https://geohot.com/)