在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:junxiaosong/AlphaZero_Gomoku开源软件地址:https://github.com/junxiaosong/AlphaZero_Gomoku开源编程语言:Python 100.0%开源软件介绍:AlphaZero-GomokuThis 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. References:
Update 2018.2.24: supports training with TensorFlow!Update 2018.1.17: supports training with PyTorch!Example Games Between Trained ModelsRequirementsTo play with the trained AI models, only need:
To train the AI model from scratch, further need, either:
PS: if your Theano's version > 0.7, please follow this issue to install Lasagne, If you would like to train the model using other DL frameworks, you only need to rewrite policy_value_net.py. Getting StartedTo play with provided models, run the following script from the directory:
You may modify human_play.py to try different provided models or the pure MCTS. To train the AI model from scratch, with Theano and Lasagne, directly run:
With PyTorch or TensorFlow, first modify the file train.py, i.e., comment the line
and uncomment the line
and then execute: The models (best_policy.model and current_policy.model) will be saved every a few updates (default 50). Note: the 4 provided models were trained using Theano/Lasagne, to use them with PyTorch, please refer to issue 5. Tips for training:
Further readingMy article describing some details about the implementation in Chinese: https://zhuanlan.zhihu.com/p/32089487 |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论