suragnair/alpha-zero-general

A clean implementation based on AlphaZero for any game in any framework + tutorial + Othello/Gobang/TicTacToe/Connect4 and more

51
/ 100
Established

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.

Stale 6m No Package No Dependents
Maintenance 0 / 25
Adoption 10 / 25
Maturity 16 / 25
Community 25 / 25

How are scores calculated?

Stars

4,388

Forks

1,147

Language

Jupyter Notebook

License

MIT

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.