1. Technology

Robocode

By

Learn Java by Building Robots:

Robocode is designed to make learning Java fun whilst giving you the opportunity for some wholesale carnage. Simply build a robot and then unleash it in a battle against other robots!

Released:

2001 (current build as of October 2013 is 1.8.3.0)

Creator:

Robocode was started by Matthew Nelson at IBM before becoming an open source project in 2005.

Website:

robocode.sourceforge.net

Background:

Robocode robots battle it out in an arena where the last one still trundling along takes the glory. Each robot is equipped with a canon, a radar and six-wheels. How it survives depends on how well you teach it to shoot, spot other robots, and drive in the right direction. Once the robot is in a battle, it's on its own and will act according to how it has been programmed.

Requirements:

Robocode needs Java SE 6.0 or newer installed on your computer. Follow the instructions in the Getting Started section of the Robocode Wiki to get up and running.

The Competition:

When you download Robocode you will find that there are plenty of robots to battle with. Some are smarter than others and if you want to beat them all, you'll need to do plenty of tinkering to your robot. A robot can start with just a few lines of Java code and could conceivably grow to thousands.

It's best to start with a simple robot and gradually increase its efficiency by reading some strategy articles. They cover everything from avoiding walls and dodging bullets to analyzing the enemy to see where they might move next!

Once you're happy with your robot you can always take it on the road to participate in a league or tournament. You'll find that the individual robots will fall into three classifications based on their code size: NanoBots (under 250 bytes) Microbots (under 750 bytes), and MiniBots (under 1500 bytes).

  1. About.com
  2. Technology
  3. Java
  4. Java Community
  5. Learning Aids
  6. Robocode

©2014 About.com. All rights reserved.