This is a 10-day project from Le Wagon's ML course.
We use the PettingZoo library for our agent's reinforcement learning process: https://github.com/Farama-Foundation/PettingZoo
We also introduce the possibility to calculate move-by-move rewards using the Stockfish chess engine (instead of game-by-game rewards from PettingZoo Classic): https://github.com/official-stockfish/Stockfish
With pyenv:
git clone [email protected]:marina-kb/drl-chess.git && cd "$(basename "$_" .git)"
pyenv virtualenv drl-chess
pyenv local drl-chess
pip install --upgrade pip
pip install -r requirements.txtWith Homebrew:
brew install stockfishOtherwise:
sudo apt-get -y install stockfishSee the Makefile to execute basic commands from main.py.
With the main() function, you can choose two agents in the agt key and modify various game parameters inside CFG.init().
You can also generate multiple batches of games to be saved as .pkl with the gen_data() function. Then, train and evaluate your model with this pre-generated data using the load_agent() function.
- Optimize batch size and improve experience replay.
- Evaluate positions and implement Monte Carlo tree search (MCTS),
also see Silver et al. (DeepMind).