1. Home
  2. Computing & Technology
  3. Java

Robocode

By , About.com Guide

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 April '09 is 1.7.1.1)

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 J2SE 5.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).

Explore Java
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Java
  4. Java Community
  5. Learning Aids
  6. Robocode - Learn Java by Building Robots With Robocode>

©2009 About.com, a part of The New York Times Company.

All rights reserved.