suragnair/alpha-zero-general
A clean implementation based on AlphaZero for any game in any framework + tutorial + Othello/Gobang/TicTacToe/Connect4 and more
Implements self-play reinforcement learning via Monte Carlo Tree Search (MCTS) combined with neural network training in a modular architecture where games and frameworks are pluggable through subclassing `Game.py` and `NeuralNet.py`. The core training loop (`Coach.py`) alternates between self-play episodes guided by MCTS and neural network optimization, supporting PyTorch and Keras backends with configurable hyperparameters for simulation depth, batch size, and learning rates. Includes pretrained models and enables direct evaluation against baseline opponents through the pit interface.
4,388 stars. No commits in the last 6 months.
Stars
4,388
Forks
1,147
Language
Jupyter Notebook
License
MIT
Category
Last pushed
Jan 01, 2025
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/ml-frameworks/suragnair/alpha-zero-general"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Compare
Related frameworks
werner-duvaud/muzero-general
MuZero
jonathan-laurent/AlphaZero.jl
A generic, simple and fast implementation of Deepmind's AlphaZero algorithm.
mokemokechicken/reversi-alpha-zero
Reversi reinforcement learning by AlphaGo Zero methods.
NeymarL/ChineseChess-AlphaZero
Implement AlphaZero/AlphaGo Zero methods on Chinese chess.
bhansconnect/alphazero-pybind11
A modified Alphazero implementation with C++ where performance matters.