Skip to content

Gomoku-AI is an implementation of the AlphaZero algorithm for Gomoku.

License

Notifications You must be signed in to change notification settings

m-star18/Gomoku-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gomoku-AI

Github issues Github stars Github top language Github license

playout400

This is an implementation of the AlphaZero algorithm for playing the simple board game Gomoku (also called Gobang or Five in a Row) from pure self-play training. The game Gomoku is much simpler than Go or chess, so that we can focus on the training scheme of AlphaZero and obtain a pretty good AI model on a single PC in a few hours.

Prerequisites

  • Python 3.9
  • Numpy 1.21.1
  • Pytorch 1.9.0

Getting Started

To play with provided models, run the following script from the directory:

python src/env/human_play.py  

You may modify human_play.py to try different provided models or the pure MCTS.

To train the AI model from scratch, directly run:

python src/train.py

License

This program is released under Apache License 2.0.