This is a project of Reinforcement Learning KR group.
AlphaZero is a Reinforcement Learning algorithm which is effectively combine MCTS(Monte-Carlo Tree Search) with Actor-Critic. Alpha-Omok team wanted to apply AlphaZero algorithm to famous board game Omok (Gomoku). Omok is a traditional game, which uses same gameboard with Go. Therefore we thought that it is proper game to apply AlphaZero algorithm. For now, the algorithm is implemented by Pytorch. Tensorflow version will be release soon!!
All the environments are implemented by pygame, so you should install pygame to run the codes in this repository!!
There are 4 objectives to achieve in this project
- MCTS on Tic-Tac-Toe
- MCTS on Omok
- AlphaZero on Omok
- Upload AlphaZero on web
- ID-based implementation
- Description of the parameters
- How to change the environment
- How to load the saved model
- How to use eval_main
- Log file
This folder is for implementing MCTS in Tic-Tac-Toe. If you want to study MCTS only, please check the files in this folder.
The description of the files in the folder is as follows. (files with bold text are codes for implementation)
- env: Tic-Tac-Toe environment code (made with pygame)
- mcts_guide: MCTS doesn't play the game, it only recommends how to play.
- mcts_vs: User can play against MCTS algorithm.
- utils: functions for implementing algorithm.
The folder is for implementing AlphaZero algorithm in omok environment. There are two versions of omok (env_small: 9x9, env_regular: 15x15). The above image is sample image of 9x9 omok game
The description of the files in the folder is as follows. (files with bold text are codes for implementation)
- eval_main: code for evaluating the algorithm on both local PC and web
- main: main training code of Alpha Zero
- model: Network model (PyTorch)
- agents: Agent and MCTS algorithm
- utils: functions for implementing algorithm
- WebAPI: Implementation of web API
- Apply parallel computation to improve computation speed
- Make Tensorflow version of the code
- Train the agent to solve 15x15 size Omok game
- Apply Renju Rule
- Mastering the Game of Go with Deep Neural Networks and Tree Search
- Mastering the Game of Go without Human Knowledge