Robocode
From Wikipedia, the free encyclopedia
| Original author(s) | Mathew Nelson |
|---|---|
| Developer(s) | Flemming N. Larsen |
| Initial release | February 2001 |
| Stable release | 1.7.1.2 / 2009-05-24 |
| Preview release | 1.7.1.3 Beta / 2009-06-08 |
| Written in | Java |
| Operating system | Cross-platform (Requires Java) |
| Platform | Java |
| Size | 4.7MB |
| Available in | English |
| Development status | Active |
| Type | Programming game |
| License | Common Public License |
| Website | http://robocode.sourceforge.net/ |
Robocode is an Open Source educational game started by Mathew Nelson (originally provided by IBM). Currently contributions are being made by various people; officially Flemming N. Larsen and Pavel Šavara are working on Robocode to keep it current and fix the bugs. The game 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 can 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 can have thousands of lines in their code dedicated to strategy. Some of the more successful robots use techniques such as statistical analysis or attempts at neural networks in their designs.
[edit] Safely run other peoples' 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 internet redistribution safe.
[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:
- Wave Surfing - Adapting your movement and trying to avoid getting hit the same way twice.
- Statistical Targeting - 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 best known form of Statistical Targeting where the stats for enemy robots are each expressed through a number between -1.0 and 1.0 (the "GuessFactor").
- Pattern Matching - Tries to match patterns of observed behavior with previously observed patterns, and make decisions on targeting based around that.
[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 files for use later.
[edit] Open source bots
The RoboWiki has an extensive list of open source robots [1]. It isn't complete, but it is extensive.
[edit] Code size restraints
To force the competitors to prioritize what features to include in a bot there are four codesize 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 a rating system based on the average score a bot scores against all others, known as Averaged Percentage Score, or APS. There is also a ranking where only winning or losing counts, with 2 points given for a win, 1 for a tie, and 0 for a loss, known as the Premier League or PL. The name was inspired by the English soccer league of the same name, which works off of a similar ranking mechanism.
While the APS tends to be a ranking that reflects strength against weaker and stronger bots alike, the PL tends to reflect strength against the stronger bots. So while one bot may be very effective at dodging simple targeting with 90% accuracy, and thus gets a high APS score, another bot may only dodge with 70% accuracy (ie. still winning) but be able to fight stronger bots more effectively. Thus it would get a lower APS score but a higher PL ranking.
[edit] Current rankings
The current ranking for RoboRumble is available at http://darkcanuck.net/rumble.
[edit] Robocode Little League
While no longer 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
Many 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 (June 1, 2009) champions of the RR@H are:
| Codesize | Battle type | Bot | Comment |
|---|---|---|---|
| Megabots | 1-on-1 | DrussGT | Open source |
| melee | Shadow | ||
| teams | Shadow | ||
| overall | Shadow | Great melee performance and undefeat in 1-on-1 for very long time. | |
| Minibots | 1-on-1 | CunobelinDC | First minibot to use a K-nearest neighbor algorithm (more commonly known as Dynamic Clustering in Robocode) Also open source. |
| melee | GlowBlowMelee | ||
| overall | hard to tell | No mini melee bot is very good at 1-on-1 | |
| Microbots | 1-on-1 | Toorkild | open source |
| melee | Sprout | open source | |
| overall | hard to tell | No micro melee bot is very good at 1-on-1 | |
| Nanobots | 1-on-1 | LittleBlackBook | First nanobot featuring a GuessFactor Targeting. Also open source. |
| melee | DustBunny | open source | |
| overall | WeekendObsession | It isn't same version, but the same ideas. | |
| Unlimited | team | Shadow | Great performance all the time with all one-on-one, melee and team. |
[edit] Influential bots
Once deemed impossible to beat, SandboxDT continues to be a strong competitor, drawing in new coders and bots.
Noted for spurring development are such bots as Shadow, which introduced Wave Surfing, and FloodMini, an open source minibot featuring Statistical Targeting.
An open source top bot, CassiusClay has helped coders grasp advanced movement and targeting techniques.
Phoenix, the current #3 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.
YersiniaPestis, the current #7 robot, is the first robot which managed to take the PL crown from Shadow. Now it is the PL king.
[edit] The 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.
[edit] External links
- Official Website
- Robocode on SourceForge.net
- RoboWiki
- Old RoboWiki
- Thai RoboWiki
- Irish Robocode Competition
- German Robocode Website
- Russian Robocode Community Website
- Evolving Robocode robots with JGAP (Java Genetic Algorithms and Genetic Programming Package)
- Robocode and Genetic Algorithms
- TankAI - C# version of RoboCode

