Analysis updated 2026-05-18
Load a pre-trained model and play a game of Gomoku against it
Train your own AI from scratch on a small 6 by 6 board in about two hours
Study how Monte Carlo Tree Search combines with self-play to learn a game
Compare training speed across the Theano, PyTorch, and TensorFlow backends
| junxiaosong/alphazero_gomoku | bchao1/bullet | markfzp/act-plus-plus | |
|---|---|---|---|
| Stars | 3,616 | 3,616 | 3,615 |
| Language | Python | Python | Python |
| Setup difficulty | easy | easy | hard |
| Complexity | 3/5 | 2/5 | 5/5 |
| Audience | researcher | developer | researcher |
Figures from each repo's GitHub metadata at analysis time.
Playing only needs Python and NumPy, training from scratch needs one of three deep learning libraries and hours of compute.
This project is a Python implementation of AlphaZero, the AI training approach that Google DeepMind used for games like chess and Go, applied to a simpler board game called Gomoku. Gomoku is a two-player game played on a grid where the goal is to be the first to get five pieces in a row, horizontally, vertically, or diagonally. Because Gomoku is much simpler than chess or Go, this version can train a capable AI on an ordinary personal computer in a matter of hours rather than requiring thousands of machines. The training process is entirely self-play: the AI starts with no prior knowledge of good moves and improves purely by playing games against itself, using a search algorithm called Monte Carlo Tree Search to evaluate positions. Over time, the AI gets better at predicting which moves lead to wins, and the stored model files capture that learned knowledge. Once you have a trained model, you can load it and play against it directly by running a single script. The repository comes with four pre-trained model files for different board sizes, so you can start playing immediately without running the training yourself. The training supports three different deep learning backends (Theano with Lasagne, PyTorch, and TensorFlow), and switching between them requires only a small change to one line in a configuration file. For training, the README recommends starting on a small 6-by-6 board with four-in-a-row as the win condition, which can produce a decent model in about two hours. A full 8-by-8 board with five-in-a-row takes roughly two days of continuous training on a single machine. The only requirement to play against an existing model is Python and NumPy, the deep learning libraries are only needed if you want to train from scratch.
A self-play AI, similar in method to AlphaZero, that learns to play the board game Gomoku and comes with pre-trained models to play against right away.
Mainly Python. The stack also includes Python, PyTorch, TensorFlow.
No license terms are stated in the explanation provided.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
Verify against the repo before relying on details.