Posts Tagged ‘ai’

Tron Bot

Posted in Programming on February 12th, 2010 by Jamie – Be the first to comment

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: http://csclub.uwaterloo.ca/contest/

The strategy for my bot:

  1. I tried to implement painter’s flood fill per Wikipedia. This worked okay and I got to around ~300.
  2. 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.
  3. 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: http://code.google.com/p/tron-bot-waterloo/

Bot runs:

Facebook Thirteen Application

Posted in Software on June 12th, 2009 by Jamie – Be the first to comment

This application was written primarily as an exercise in creating Facebook Applications. It was very instructive! Here is the project blog if you’d like more details http://thirteengame.blogspot.com/.

It is an adaptation of a web app I originally wrote in 2007. You may play either by logging into Facebook and trying it out, or logging in here http://www.angelforge.org/thirteen/LoginPage.php. To login outside of Facebook, you may either use the user name and password guest or login with your Facebook credentials using Facebook Connect.


Switch to our mobile site