For this course, your project is to write an AI program that can play the game Upthrust. Your program will have up to 15 seconds to make its move. At the end of class there will be a tournament among the AI programs, and the team with the winning programs wins extra credit points.
If you wish to purchase the game, one place you may do so is from Madison Avenue Games (now defunct!). However, you do not need to purchase the game, as the rules will be described here (and you can easily make your own) along with a computer version that you can play:
upthrust.tar.gz - Gzip, tar'd source code in C that implements the game and rules (C source code).
The game manager is a program designed to act as an interface between two AI programs. Rather than manually input moves to the AI programs, I ask that your program conforms to the I/O specs of the game manager. This allows programs to directly communicate and greatly speeds up the time it takes to run the tournament. View the README file for more information.
manager.tar.gz - Gzip, tar'd source code in C for a game manager that will automate gameplay between AI programs. The latest modification to this code on 11/13/98 prints out the move if an invalid move is received.
My upthrust code: aicode.tar.gz is my AI playing program if you want to take a look and see how I implemented it. It is designed to run with the game manager.
The game consists of a playing board with four columns and 11 rows that form a grid. The top six rows of the grid are scoring rows. Pieces are played in the spaces within the grid. There are four pieces of four colors (Green, Red, Blue, Yellow) that are initially placed on the board in prespecified locations.
In the two player game, each player each player initially picks two random colors and one player is selected to move first. Players alternate turns, and on each turn that player may move any piece that is one of the selected colors.
The initial state of the board is shown below.
60 . . . . 40 . . . . 30 . . . . 20 . . . . 10 . . . . . . . . . . . . G R B Y R B Y G B Y G R Y G R BRules of Play
On a turn, a player moves one of his/her pieces straight up the board -- always staying in its column. The movement is governed by the following rules:
The game ends when: