Robocode
Encyclopedia
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
or, starting in version 1.7.2, .NET Framework programming languages
(C#, VB.NET
, etc.), 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.
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 network
s in their designs.
or CLR
Class Library, 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.
Many sophisticated techniques have emerged. In particular, many top bots utilize:
to writing out data to files for use later.
robots http://robowiki.net/wiki/Category:Open_Source_Bots.
It isn't complete, but it is extensive.
There is no equivalent for .NET robot yet.
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 (i.e. still winning) but be able to fight stronger bots more effectively. Thus it would get a lower APS score but a higher PL ranking.
Currently, the RoboRumble@Home only supports Java robots.
Beginners in Robocode might want to start with The Robocode Beginners FAQ.
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
educational game
Educational game
Educational games are games that have been designed to teach people about a certain subject, expand concepts, reinforce development, understand an historical event or culture, or assist them in learning a skill as they play...
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
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
or, starting in version 1.7.2, .NET Framework programming languages
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...
(C#, VB.NET
Visual Basic .NET
Visual Basic .NET , is an object-oriented computer programming language that can be viewed as an evolution of the classic Visual Basic , which is implemented on the .NET Framework...
, etc.), 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.
The game
Competitors write software that controls a miniature tankTank
A tank is a tracked, armoured fighting vehicle designed for front-line combat which combines operational mobility, tactical offensive, and defensive capabilities...
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 network
Neural network
The term neural network was traditionally used to refer to a network or circuit of biological neurons. The modern usage of the term often refers to artificial neural networks, which are composed of artificial neurons or nodes...
s in their designs.
Safely run other peoples' bots
One can test a robot against many other competitors by downloading their Java bytecodeBytecode
Bytecode, also known as p-code , is a term which has been used to denote various forms of instruction sets designed for efficient execution by a software interpreter as well as being suitable for further compilation into machine code...
or CLR
Common Language Runtime
The Common Language Runtime is the virtual machine component of Microsoft's .NET framework and is responsible for managing the execution of .NET programs. In a process known as just-in-time compilation, the CLR compiles the intermediate language code known as CIL into the machine instructions...
Class Library, 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.
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.
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 programmingEvent-driven programming
In computer programming, event-driven programming or event-based programming is a programming paradigm in which the flow of the program is determined by events—i.e., sensor outputs or user actions or messages from other programs or threads.Event-driven programming can also be defined as an...
to writing out data to files for use later.
Open source bots
The RoboWiki has an extensive list of open sourceOpen source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
robots http://robowiki.net/wiki/Category:Open_Source_Bots.
It isn't complete, but it is extensive.
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
There is no equivalent for .NET robot yet.
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 (i.e. still winning) but be able to fight stronger bots more effectively. Thus it would get a lower APS score but a higher PL ranking.
Currently, the RoboRumble@Home only supports Java robots.
Current rankings
The current ranking for RoboRumble is available at http://darkcanuck.net/rumble.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.Twin Duel
Twin Duel is a 2v2 weekly survivalist tournament. It has been absent for a while, but now it is active again. This tournament also brings new challenges to Robocoders. They need a good mix of both one-on-one and melee strategy in order to gain the successful around this game. This is a codesize-restricted league, which only allow teams under 2,000 bytes to participated. The format of this tournament is single-elimination round-robin with an exception of the final which is best of 3 series.Current international competitions
- Virtual Combat held by CodeFest'11, the annual international online coding festival of Computer Engineering Society, IT-BHU
- Robocode UdL held by the Universitat de Lleida
- Robocode Ireland - Robocode Ireland, Games Fleadh Game Festival
- IPL Robocode competition 2010 - Belgian Robocode Competition
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.RR@H Champions
The current (September 29, 2009) champions of the RR@H are:Codesize | Battle type | Bot | Comment |
---|---|---|---|
Megabots | 1-on-1 | DrussGT | Open source Open source The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology... |
melee | Diamond | There is currently a race between Portia, Diamond and Shadow. Any of those can take melee rumble throne within single updates. | |
overall | Shadow | Undefeatable in 1-on-1 and melee for a very long time. | |
Minibots | 1-on-1 | CunobelinDC | First minibot to use a k-nearest neighbor algorithm K-nearest neighbor algorithm In pattern recognition, the k-nearest neighbor algorithm is a method for classifying objects based on closest training examples in the feature space. k-NN is a type of instance-based learning, or lazy learning where the function is only approximated locally and all computation is deferred until... (more commonly known as Dynamic Clustering in Robocode) Also open source Open source The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology... . |
melee | GlowBlowMelee | ||
overall | hard to tell | No mini melee bot is very good at 1-on-1 | |
Microbots | 1-on-1 | Toorkild | open source Open source The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology... |
melee | Sprout | open source Open source The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology... |
|
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 Open source The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology... . |
melee | DustBunny | open source Open source The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology... |
|
overall | WeekendObsession | It isn't same version, but the same ideas. | |
Unrestricted | team | Shadow | Great performance all the time among one-on-one, melee and team. |
2000 bytes | twin duel | LunarTwins | Great performance with nice 2v2 strategy |
Influential bots
- SandboxDT was once an unbeatable robot. It had been staying as a crown for a long time and only been dethroned twice! First time by Duelist and second time by Shadow, which ended its reign. Nowadays, it still continues to be a strong competitor, drawing in new coders and bots.
- Shadow, a bot which introduces Wave Surfing concept into Robocode. While isn't the king, it had been untouchable for long time. It still holds a melee crown.
- FloodMini, an open sourceOpen sourceThe term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
minibot featuring Statistical Targeting, had help many Robocoders into understand the concept of Statistical Targeting. - CassiusClay, an open sourceOpen sourceThe term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
top bot, has helped coders grasp advanced movement and targeting techniques. - Phoenix, the current #5 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 #11 robot, is the first robot which managed to take the PL crown from Shadow.
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.
External links
- Official Website
- Robocode on SourceForge.net
- RoboWiki
- Old RoboWiki
- Chicago (USA) Robocode Competition
- Irish Robocode Competition
- German Robocode Website
- Russian Robocode Community Website
- Catalan Robocode Website
- Evolving Robocode robots with JGAP (Java Genetic Algorithms and Genetic Programming Package)
- Robocode and Genetic Algorithms
- TankAI - C# game similar to Robocode
- Marvin’s Arena - C# game similar to Robocode