Open source chess AI engine
Project description
beth
Experimenting with Game AI applied to chess
Idea
In this repo will be experiments around AI & chess. In particular Machine Learning applied to the chess game.
The goal is to create:
- Algorithms to play chess using Machine Learning, Reinforcement Learning & NLP
- Auto-guide to help human learn and improve at playing chess
- Adaptive AI to match the player ELO and make him improve
This repo is under active development
Features
Environment
- Experimenting with the python chess library
- Implementing
Game
framework -
HumanPlayer
to play chess in Jupyter notebook -
RandomPlayer
the most simple bot to easily test out new ideas and debug - Read PGN files and load into ML algorithms
- Measure ELO of an algorithm/AI, or any consistant metric of performance
- Saving game as gif or video
Model utils
- Monitor algorithm performance using Comet.ml / tensorboard
- Saving algorithm weights to be reused
- Visualize probabilities to see best moves and if training worked
- Transform game object into 3D tensor (2D dimension + one hot encoding of pieces positions)
- Install, test, and integrate CodeCarbon
- Train on Google Colab
Algorithms & approaches
- AlphaGo approach: value function and policy function evaluation using Reinforcement Learning & MCTS
- AlphaZero approach: self play competition
- NLP approach: predicting next move using NLP techniques (LSTM, Transformers)
- LSTM / RNN / GRU
- Transformers
- Directly using Hugging Face
transformers
library
- Hybrid techniques with both NLP-like + modeling the game as 3D tensor
- GameAI techniques (minimax, rules-based)
- Super simple approach where at each step Random Play from a PGN file or list of moves.
- Test connection to Game engines like stockfish
References
Sequential Deep Learning
Game Databases
State of the art approaches
Libraries
- Deep Learning
jax, trax, rlax, haiku and pytorch-lightning
- Monitoring (comet.ml, livelossplot, tensorboard)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
beth-0.1.1.tar.gz
(8.4 kB
view hashes)
Built Distribution
beth-0.1.1-py3-none-any.whl
(10.2 kB
view hashes)