Iceberg Races

Posted on 2010-04-12 22:03 in Blog • Tagged with competition, programming

On Friday night (April 9th), I held my second programming competition at NDSU. This year’s turnout was much better than last year.

The Game

Iceberg Races is you’re run of the mill racing game. Players control a car which they try to navigate through the race to complete laps. When the game starts, the players are sent a copy of the map, and during each turn, they are provided location and velocity details for all the vehicles on the track. The competitor’s goal was to write an AI to find the best path through the map to win the race.

Iceberg Races Screenshot


This year 22 people participated, including students from NDSU, MSUM, and Concordia. I believe all of the participants were undergraduates. All competitors came in blind. The only details that were released about the game ahead of time were clients were being provided in both Java and Python.


I was in contact with the NDSU ACM which arranged all the logistics of the actual event. They reserved rooms, provided advertising, and setup the competition computers. I had told them I needed Python and Pygame installed on the server machine. Upon launching the game, it was immediately discovered that I needed Python 2.6 and the server had 2.5.7. We spent the better part of half an hour trying to get 2.6 to install (it was not in the repositories for the distro). We eventually gave up and my laptop became the game server.

There were problems distributing the client source files. I had packaged Python and Mercurial binary libraries for use with Windows machine development (which I neglected to remove after learning the competition was being held in a Linux computer lab), this pushed the size of the source zip file from 500 Kb to 54MB. SimpleHTTPServer (Python library server) immediately crashed handling the sudden load from the downloads.


After five hours of development, all coding work came to a stop and the competition bracket was drawn up and the fierce battles began. Several clients performed excellently, some drove randomly, and a few simple spun in place. Overall, everyone had a great time watching the matches.


Place or Achievement Winner’s Name Prize Notes
1st Nick Laney $75 Best buy card
2nd Kevin Schroeder $50 Best buy card
3rd Ben Bechtold $25 Best buy card
Most Code Tom Gardiner Box of 20 Candy Bars >400 Lines
Least Code Sam Sussman RC Car 8 lines
Crash test dummy
(most wall impacts)
Andrew Dahl Text Book 408
Speed demon
(most time at full speed)
Ben Bechtold Text Book 638

Source Code

Full source code for the server and clients, as well as all game artwork can be found in the mercurial repository hosted on Assembla.

hg pull

I’ve also included the source for the first and second place clients (both part of the Java client).



java Main <name> <server IP> <server port> [ai, first, second]
python <name> <server IP> <server port>


python <port>


Person Reason
Nick Laney (NDSU ACM Chair) Event running advertising and reserving the room.
Bethany Schlenvogt Vehicle graphics
All participants For showing up, the competition would not have been successfully without you.

Continue reading

T-minus two days

Posted on 2010-04-07 19:48 in Blog • Tagged with programming, competition

Two short days until competition day. I've spent the last several months developing an idea for a programming competition game, implementing the game, documenting, and organizing participants/ sponsors. It all comes to a head on Friday (April 9th).

I just got word from the chair of the NDSU ACM (organization that I'm hosting the competition through) that we have 16 registered competitors from two different local colleges. Quite a step up from last year where only 8 competitors arrived. I'm beginning to worry that my game is not going to be complex enough for the people who arrive.

Last year, the number one complaint was the game was too complex. They said five hours was not enough time to learn how to play the game to build a functional AI. So, for this year, I drastically simplified the exposed surface area of the game (details to be announced after the competition).

Continue reading


Posted on 2010-03-31 22:54 in Blog • Tagged with programming, competition, version control

For the last three weeks, development on my news program, Iceberg Races, has been in high gear. Each night before bed, I simply zipped up my work and archived it away. This approach was fine at first, as I was hammering out the design as I coded, which meant I took a lot of dead end paths. Large chunks of code and entire files were created and then deleted the next day (as I discovered better implementation methods.) It’s true that the best way to learn a language is to dive right in by writing ‘useful’ program.

On Wednesday, I realized that my code structure had stabilized a week prior and I was overdue for tracking my code in a source revision tool. Luckily, I ran across an amazing Mercurial tutorial and decided to give it a try.

So far I’m loving it. The commands are all straight forward. It was extremely quick to setup, and has perform admirably for the past two three days that I’ve been using it. I’ve summarized the most useful commands below (this is not an exhaustive list):

Command Description
hg * All commands start with hg followed by…
init Create a new repository in current directory.
add Add new files to repository
remove Remove file from repository
status View the status of the files in the repository.
diff View the differences between two different versions of a file.
commit Save the current state of the files to the repository.
rollback Undo the last one commit.
merge Resolve conflicts in a file.
log View the revision history.
update Check out files to a specified revision
push Copy changes in local repository to a remote repository.
pull Copy changes in a remote repository and bring them into your local repository.

I’ve bolded the commands that come in the handiest. This includes the operations to save the current state of the repository and how to restore a past state.

Continue reading