A custom bot I wrote for my final project in COMPSCI 383: Artificial Intellegence. It is based off the python3 starter bot provided by rbtcs on The AI Games Website.
This is a hueristic based agent that makes classifications based off all possible board configuration two Trominoes in advance. Feature weights are learned via a genetic algorithm.
- Download the server code from The AI Games Github page
- Download my bot's source code
- Move the bash script run, found in Extras/, to the root directory of the server code downloaded in 1
- Edit the bash script run, changing the to the full path of BotRun.py, found in the root directory of my bot's source code downloaded in 2
- Exectute the run command. Game data will be printed to a file named out.txt in the root folder of the server code
- Move the Botvelution, found in Extras/, to the root directory of the server code
- Call the class using python3
- Data will be displayed printed on generation data and performance. Additionally, the top 5 couples and their features will be pickled every generation.
CTStrategy looks one Tromino in advance to make decisions. Features and weights are derived from Yiyuan Lee's Near Perfect Tetris AI.
CTStrategyTwoBlock looks two Trominoes in advance to make decisions. Features are similar but modified from Yiyuan Lee's, and weights are learned using a genetic algorithm.
CTStrategyTwoBlock also takes advantage of more optimized piece projection and can recognize covered positions and other Tromino positions that cannot be dropped into. This is done using TetrisGraph, which is a best first search algorihtm that finds valid moves for Trominos.
A detailed report of my bot and experience can be found in my Final Report in the Documentation/ directory.