Jun 01 2009
CodeRally
[Meta-note: Yes, I realize this is a bit dated and definitely out of chronological order; So sue me.]
Earlier this quarter, I, in partnership with Nick, participated in a programming contest put on by the CSE Department. It used a Java framework called “CodeRally” and involved programming an AI for a car on a virtual track. The cars start out at random locations and score points by doing various things, such as going through the track flags in order, throwing and hitting other cars with spare tires, etc. until time runs out. We named our AI “King Regicide” (all credit to my Desmondian counterpart for the name).
Our initial strategy we dubbed “tirespamming”; that is, just try and hit people with tires constantly and ignore trying to go around the track circuit. We got it partially working, but then decided that due to the point spread we should focus on writing logic to go around the track circuit. After fixing a particularly nasty bug that sometimes surfaced when turning from say 5° to 355°, we tuned the tire-firing logic and did decently in simulated contests. We also wrote some smart logic for when to activate our emergency shields. We had dreams of writing some code to evade tires, but we never got around to it.
We ended up finishing 19th in the second qualifying round, one short of the top 18 who got to advance to the final round. However, a couple instructors and TAs, who were ineligible to win any titles/prizes, finished ahead of us, and due to the aforementioned random starting locations there was a large random factor involved and not enough rounds were done, in my opinion, to mitigate this, so we got slightly screwed over. Oh well. Se la vie.
This was almost made up for by the hilarity of “Disappointer”, Prof. Dana Dahlstrom’s entry in the contest. I forget the exact details, but I believe that after a set amount of time stuck in a pileup (see next paragraph), it would extricate itself, tirespam the car who caused the pile-up and throw all available tires at it, and then go back to being stuck. All assembled got a grand laugh out of it.
On an interesting note, the biggest problem in the contests ended up being “pileups”. These are when one car runs out of fuel while going around the circuit, and another car hits it and is too stupid to go around it. Yet more cars would then also pile-up behind these cars, blocking the inner cars from moving at all. This would usually cascade until all the cars were motionless and part of the pile-up. Only one or two cars had AIs which were smart enough to deal with this situation, and interestingly they weren’t even the top finishers. We tried to add such a feature near the end of the contest, but completely ran out of time.
In the end, those who actually won the contest admitted that their AIs didn’t do anything particularly fancy compared to the average entrant: just go around the circuit, throw tires occasionally, and activate shields when necessary; I believe this further supports my assertion about the large, unaddressed random factors involved.
All in all, it was grand fun even though we were robbed of our chance to advance to the finals, and I look forward to next year’s contests. Props to the Dini Group for sponsoring the contest and providing caffeine and food!
Popularity: 1% [?]
No responses yet
In the Quest of the Fragrant Harbour
Lacey Thoughts
League of Desmond