A gobang robot based on reinforcement learning
- Network structure
ConvBlock
× 1ResidueBlock
× 4PolicyHead
× 1ValueHead
× 1
- Network visualization
-
Create virtual environment:
conda create -n Alpha_Gobang_Zero python=3.8 conda activate Alpha_Gobang_Zero pip install -r requirements.txt
-
Install
PyTorch
,refer to the blog for details; -
Start game:
conda activate Alpha_Gobang_Zero python game.py
conda activate Alpha_Gobang_Zero
python train.py
《如何使用自对弈强化学习训练一个五子棋机器人Alpha Gobang Zero》
- 《Mastering the game of Go without human knowledge》
- 《Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm》
-
Why does the window get stuck when it is dragged?
Because the interface background uses acrylic effect, this problem will occur for some versions of win10. There are three solutions:
- Upgrade win10 to the latest version.
- Uncheck the check box of Advanced system settings --> Performance --> Show window contents when dragging.
- Turn off the option to enable acrylic background in the setting interface.
-
Why does the configuration I modified in the settings interface not take effect immediately?
The modified configuration will take effect at the beginning of the next game.
Alpha-Gobang-Zero is licensed under GPLv3.
Copyright © 2021 by zhiyiYo.