For some reason, in their psyche, many programmers love to pit their code against others. I’m not talking about programming reviews, but rather virtual arenas where programmable entities like bots, worms, etc. battle it out against each other. The oldest battleground is probably the venerable RobotWar created in the 1970s.
Though not exactly mainstream, competitive programming games like CRobots, RoboWar, Core War and RoboCode are excellent ways to improve your programming skills by trashing your opponent’s code to the ground.
CRobots Seek and Destroy
On the PC, there’s CRobots written by developer Tom Poindexter and released in December 1985.
CRobots uses programmable bots in a subset of the C programming language. Your robot, armed with a radar, scans for enemy Robots, tracks their movements and then fires shells until just one is left.
RoboWar Dead Meat
Core War Gone Cold
Core War dates back to the 1960s and is possibly an inspiration for the film “Tron.” It uses a simple version of Assembly Language called RedCode, which runs in a virtual processor called MARS (Memory Array Redcode Simulator). Programmers write RedCode programs to battle it out.
Although Core War was very popular about ten years ago, it’s fallen out of popularity. There’s still a lot of material about it, however, on web sites like Koth.org and Corewar.co.uk.
This is probably the most advanced and certainly the most popular current programming game out on the Web. There’s even an Irish games festival that includes RoboCode. If you want to join the battle, a good place to learn about it is the RoboWiki.
A RoboCode robot has a gun that rotates at a fixed rate and a body that can accelerate and turn. There’s also a radar that lets it detect other Robots.
RoboCode is a powerful system that allows you to code bots in either Java or C#. I’d guess that of the 187 robots currently listed in the RoboWiki, most are written in Java.
It’s worth reading the Robowiki to learn about the various robot descriptions, considering there’s a high-level of sophistication built into the scanning and evasive bullet-avoiding maneuvers. Take a look at Tomcat, which is the best Russian robot for working out the best shots. It uses histograms for bearing offsets, otherwise known as providing the angle of the enemy Robot relative to yours.
After creating your RoboCode robot, why keep it at home? RoboRumble is an online repository for storing robots and letting developers automatically download and run them against each other. Details on entering a robot into RoboRumble is on Everything Robocode.
Let the games begin.