Done the TeammyTurner's way.
This is our entry for the Tablut Competition, hosted by the Artificial Intelligence MSc at the University of Bologna. We first started to fiddle around with RL and Gym, but it clearly wasn't the right path. Then, our research led us to try and reimplement something similar to AlphaZero, which is based on a Monte Carlo Tree Search aided by a Neural Network. Sadly, our time management is awful. In the end, we simply implemented a Monte Carlo Tree Search with no neural network, which should still perform kind of good.
The project is actually composed of 3 repos:
- tablutpy, our re-implementation of the Tablut game (Ashton rules) in python. This contains the
Boardobject, which is the core of it all. - tablut-mcts, the module in charge of handling the Monte Carlo Tree Search, mainly through the
MCTSclass - tablutAI, this repo, which handles the interaction between our code and the TablutCompetition server
You can just clone this repository, then install the requirements:
$ git clone https://github.com/TeammyTurner/TablutAI.git
$ cd TablutAI
$ pip3 install -r requirements.txt
This will install the two other modules too.
We created a bash script to start the player. You can find it in the main directory, named launch.sh. Launch it with the parameters that were specified in the PDF:
$ ./launch.sh White 50 localhost
Otherwise, you can directly launch the script in src/client.py with these arguments:
The -p argument can either be white or black, and it contains the player that we'll impersonate.
There's other args you can change. The most important is -t: this states the timeout for a move. It defaults to 50 seconds, but if you decide to shorten the time this should be changed accordingly.
Then, -d states the tree's maximum depth, and -C changes the C factor for the MCTS. These should be left as default.
Distributed under the GPL License. See LICENSE for more information.
This project was proudly made with ❤️ by TeammyTurner.
Project Link: https://github.com/TeammyTurner/TablutAI
