AI bot utilizing Monte Carlo tree search to play m,n,k-games (Tic-tac-toe, Gomoku...) with simple Pygame GUI for Player vs. Bot.
- Monte Carlo tree search (MCTS) with Single-run parallelization:
@inproceedings{cazenave2007parallelization,
title={On the parallelization of UCT},
author={Cazenave, Tristan and Jouandeau, Nicolas},
booktitle={Computer games workshop},
year={2007}
}
- Tic-tac-toe
- Gomoku 7x7
- Gomoku 9x9
- Gomoku 15x15 (MCTS seems not to be effective yet because of speed problem)
- MCTS:
For end-game board checking
For getting possible moves on board
For MnkBoard and MnkState classes
For calculating UCB + score (not so big improvement)
First git clone https://github.com/realphongha/mnk-game-bot.git
to clone this repo.
Go inside the repo: cd mnk-game-bot
Run:
pip install -r requirements.txt
Run:
python setup.py build_ext --inplace
python play.py --cfg path/to/config_file.yaml
For example:
python play.py --cfg configs/tic_tac_toe.yaml