Creating 2D perfect information board games, and playing them with machine learning systems.
- Implementations for a bunch of board games including Chess, Checkers, Connect 4, Othello (Reversi), and The Game of the Amazons
- Implementations of various algorithms for selecting moves including Minimax (with alpha-beta pruning), Monte Carlo tree search using randomized rollouts, iterative deepening, and policy-value driven Monte Carlo tree search
- Code for generating endgame tablebases for Chess using retrograde analysis
- Code for training neural networks from scratch using self-play reinforcement learning
- Over 4500 lines of Python code and counting
- Some cool chess puzzles that I discovered along the way
- Ensure Python is installed
- Install requirements:
pip install -r requirements.txt
- Play a game of Connect 4 against the ai:
python perfect_information_game/scripts/play_vs_ai.py
- View games files that were generated during training:
python perfect_informationn_game/scripts/view_game_file.py
- For games with multiple versions, select the desired version by opening the corresponding file under
src/games/
and uncommenting the corresponding line that starts withCONFIG =
- How to Keep Improving When You're Better Than Any Teacher - Iterated Distillation and Amplification
- Multiple Policy Value Monte Carlo Tree Search
- Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm
- Introduction to Reinforcement Learning (course by David Silver)
- Parallel Monte-Carlo Tree Search
- A Lock-free Multithreaded Monte-Carlo Tree Search Algorithm
- Time Management for Monte Carlo Tree Search
- Lessons From Alpha Zero (part 5): Performance Optimization
- How much training data do you need?
- Working with Numpy in Cython
- Chess Piece Images
- Chess test cases and more chess test cases
- Chess Position Encoding Scheme