I spent a few hours cooking up an entry for this Tron Bot AI Competition. The starter packages they provided made it really easy to enter. I created an entry in python. The competition page is: //csclub.uwaterloo.ca/contest/
The strategy for my bot:
- I tried to implement painter’s flood fill per Wikipedia. This worked okay and I got to around ~300.
- Then I implemented A*. The strategy was to get within 5 squares of the enemy, and then flood fill. My reasoning was that if I had a better fill algorithm, I would win at that point.
- Next, I tried to implement minimax with alpha-beta pruning. It’s not tested, but it should be fairly close. All I am missing is a utility function (well, that is probably the most impt piece!). For the utility function, I wanted to bisect the playing field by finding the perpendicular bisector between the players, then flood-filling to determine the number of blank spaces in each player’s respective region. I have the bisection algorithm done, but got bored once I started implementing the flood fill.
The project page is, it contains the source as well: https://github.com/jamiely/tron-bot-waterloo