Skip to main content

Robocode goes Open Source

Posted by johnreynolds on March 21, 2005 at 7:01 AM PST

I came across
Robocode a few years ago and was instantly delighted. On first glance, Robocode is an arcade game. Robot tanks roam a virtual battlefield in search of combat and blasting away at any opponent that they encounter. Unlike traditional arcade games, the "player" is not in direct control of his weapons; the tanks are autonomous, controlled only by the event-driven algorithms written (in Java) by their creators.

The creation of autonomous robots transforms Robocode from a mindless shoot-em-up video game to an excellent tool for teaching programming and deductive reasoning... it's particularly effective for grabbing the attention of teenage boys.

My wife teaches computer skills to elementary and middle-school kids, so I had an opportunity to introduce Robocode to a group of 8th grade boys. The results were somewhat mixed; most of the boys just wanted to know how to "cheat", but it did give them a good introduction to the cause-and-effect of programming.

I think it would be great to combine Robocode and Lego Mindstorms together into a curriculum for middle and high schoolers. Robocode could be easily enhanced to include maze navigation and obstacle avoidance, and it would be very instructive for the kids to transfer their algorithms from the virtual landscape of Robocode to a Lego robot in the "real" world. What better way to learn that simulations sometimes miss the obvious?