Robocode
From Wikipedia, the free encyclopedia
Robocode is an Open Source educational game started by Matthew Nelson (originally R was provided by IBM). Presently contributions are being made by various people. Officially Flemming N. Larsen is working on the robocode to keep it current and fix the bugs. It is designed to help people learn to program in Java and enjoy the experience. It is very easy to start - a simple robot can be written in just a few minutes - but perfecting a bot can take months or more.
Contents |
[edit] The game
Competitors write software that controls a miniature tank that fights other identically-built (but differently programmed) tanks in a playing field. Robots move, shoot at each other, scan for each other, and hit the walls (or other robots) if they aren't careful. Though the idea of this "game" may seem simple, the actual strategy needed to win is not. Good robots have hundreds of lines in their code dedicated to strategy. Some of the more successful robots use techniques such as statistical analysis and attempts at neural networks in their designs.
[edit] Safely run other people's bots
One can test a robot against many other competitors by downloading their bytecode, so design competition is fierce. Robocode provides a security sandbox (bots are restricted in what they can do on the machine they run on) which makes this a safe thing to do.
[edit] Movement and Targeting
Robocode competition is all about two things:
- Avoid getting hit too much (Movement)
- Try to predict where the opponent(s) will move and hit them as much as possible (Targeting)
Many sophisticated techniques have emerged. In particular, many top bots utilize:
- WaveSurfing - Adapting your movement and trying to avoid getting hit the same way twice.
- StatisticalTargeting - Collect data that describes the targeting situation together with what would have been the correct decision for each situation. Use this data to make targeting decisions.
- GuessFactor Targeting--the top form of Statistical targeting where the stats for enemy robots are each contained inside one number (the GuessFactor)
[edit] Sample bots
Several sample robots are included in Robocode to help the beginners get started. They demonstrate various basic techniques used in coding robots, from event-driven programming to writing out data to be used later.
[edit] Open source bots
Check the RoboWiki's open source bots listing:
It isn't complete, but there are lots of bots there.
[edit] Code size restraints
To force the competitors to prioritize what features to include in a bot there are four used code size categories. (Codesize is measured in bytes by a tool.):
- Megabots - no codesize restriction
- Minibots - less than 1500 bytes
- Microbots - less than 750 bytes
- Nanobots - less than 250 bytes
[edit] Leagues
There exist (and have existed) several leagues for Robocode.
[edit] RoboRumble@Home
The main active competition is the RoboRumble@Home, a continuous league based on distributed computation in a similar way to SETI@Home. The RR@H features leagues for 1-on-1, melee (free for all with more than two bots) and teams. 1-on-1 and melee competitions are carried out for the four main code size categories.
The RR@H uses an ELO like rating system. But since all bots get to meet all other bots this is mainly a measure on how well you perform against all others. There is also a ranking where only winning or losing counts. Don't lose against any other bot and you're the sure champion here.
[edit] Current rankings
Check the current rankings here:
[edit] Robocode Little League
While not currently active, the Robocode Little League (a weekly competition specifically for codesize-constrained bots) still provides tables on the past tournaments run.
[edit] Some robots worth mentioning
Lots of bots are worth mentioning, of course. But some are more spectacular in their performance than others, and some have influenced Robocode bot development more than others.
[edit] RR@H Champions
The current (March 2007) champions of the RR@H are:
Codesize | Battle type | Bot | Comment |
---|---|---|---|
Megabots | 1-on-1 | Dookius | open source |
melee | Aleph | ||
teams | Shadow | ||
overall | Shadow | Among the runner-ups in both 1-on-1 and melee and undefeated in 1-on-1 at that. | |
Minibots | 1-on-1 | WeeksOnEnd | First 2100 minibot. |
melee | GlowBlowMelee | ||
overall | hard to tell | No mini melee bot is very good at the 1-on-1 act | |
Microbots | 1-on-1 | WeeklongObsession | open source |
melee | Shiz | open source | |
overall | hard to tell | No micro melee bot is very good at the 1-on-1 act | |
Nanobots | 1-on-1 | WeekendObsession | open source |
melee | Lib | open source | |
overall | DoctorBob |
[edit] Influential bots
Once deemed impossible to beat and indeed was, SandboxDT continues to be a strong competitor, drawing in new coders and bots.
Noted for spurring development are such bots as Shadow, which introduced WaveSurfing and FloodMini, an open source minibot featuring StatisticalTargeting.
In recent years, open source bot CassiusClay has challenged Ascendant, and helped coders grasp advanced movement and targeting techniques.
Phoenix, the current #2 bot, has helped to demonstrate the power of graphical debugging. The code used to draw debugging information onto the screen is open-source, released as DrawingBot.
[edit] A Robocode Wiki
The main site for Robocode knowledge and discussions is the RoboWiki. Here you can read about techniques and strategies, browse info on many bots, find source code (both code snippets and complete competitive bots), ask for help and more. The Robowiki also hosts the RoboRumble@Home.
Beginners in Robocode might want to start with The Robocode Beginners FAQ.