C++ library for AI bot programming.
- Specify game rules by subclassing
StateandMove. - Choose AI algorithm (
Minimax,MonteCarloTreeSearch), play by yourself (Human) or against external program (Executable). - Read the game state, pass it to the algorithm and output the move. For local, statistically significant tests, use
Tester.
- Tic Tac Toe - game rules, code example.
- Isola - game rules, code example.
- Connect Four - game rules, code example.
- Go - game rules, code example.
- NegaScout with iterative deepening and transposition table.
- Monte Carlo tree search with UCT and virtual visits.
Both handle sequential, multiplayer games:
MCTS also handles simultaneous games using SUCT.
Execute below commands in the cpp directory.
makebuilds everything.make testruns unit tests.make valgrindruns valgrind's memory leak tests.make play_isolaplays as many games as needed to determine which Isola bot is better.
For all the commands check Makefile file.
- To build and run unit tests,
g++andlibboost-all-devpackages are needed. - To run valgrind,
valgrindpackage is needed. - To make GIFs,
imagemagickpackage is needed.
You can install all of them with sudo apt-get install g++ libboost-all-dev valgrind imagemagick.
- Correctness.
- Compliance with environment typical for competitions. One process. One file submission, compiled with one invocation of
g++. - Performance.
Suggestions welcome on Issues. Pull requests too.
If you use code or ideas from this repository, please cite it as follows:
@misc{stelmaszczyk2015gtsa,
author = {Stelmaszczyk, Adam},
title = {Game Tree Search Algorithms},
year = {2015},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/AdamStelmaszczyk/gtsa}},
}




