Robocode

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Robocode
Splash screen
Original author(s) Mathew Nelson
Developer(s) Flemming N. Larsen
Initial release February 2001 (2001-02)
Stable release 1.9.2.0 / April 23, 2014; 5 months ago (2014-04-23)
Development status Active
Written in Java, .NET Framework programming languages (C#, VB.NET, etc.)
Operating system Cross-platform (Requires Java for core and .NET Framework for .NET)
Platform Java
Size 5.0 MB
Available in English
Type Programming game
License Eclipse Public License [1]
Website http://robocode.sourceforge.net/

Robocode is an open source educational game started by Mathew Nelson . Contributions are being made by people including Flemming N. Larsen and Pavel Šavara who work on Robocode to keep it current and fix the bugs.

The game helps people learn to program in Java or, starting in version 1.7.2, .NET Framework programming languages (C#, VB.NET, etc.).A simple robot can be written in just a few minutes - but perfecting a bot can take months.

Game[edit]

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 misprogrammed. Though the idea of the game is simple, the strategy needed to win is not. 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.

Safely run other people's bots[edit]

A robot can be tested against others by downloading their Java bytecode or CLR Class Library. Robocode provides a security sandbox (restricted in what they can do on the machine they run on), which makes internet redistribution safe.

Movement and targeting[edit]

Robocode programming attempts to achieve:

  • Movement: Avoid getting hit too much.[2]
  • Targeting: Try to predict where the opponents will move and hit them as much as possible.[3]

Top bots may use:

  • Wave Surfing[4] - Adapting movement and trying to avoid getting hit the same way twice.
  • Statistical Targeting[5] - 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[6] - 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").[7]
  • Pattern Matching[8] - Tries to match patterns of observed behavior with previously observed patterns, and make decisions on targeting based around that.

Sample bots[edit]

Several sample robots are included in Robocode to help the beginner. They demonstrate techniques used in coding robots, from event-driven programming to writing data to files for use later.

Open source bots[edit]

The RoboWiki has an extensive (although incomplete) list of open source robots.[9]

Code size restraints[edit]

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:[10]

  • Megabots[11] - no codesize restriction
  • Minibots[12] - less than 1500 bytes
  • Microbots[13] - less than 750 bytes
  • Nanobots[14] - less than 250 bytes

There is no equivalent for .NET robot yet.

Leagues[edit]

There exist (and have existed) several leagues for Robocode.

RoboRumble@Home[edit]

The main active competition is the RoboRumble@Home,[15] 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.

The RoboRumble@Home only supports Java robots.

Current rankings[edit]

The current ranking for RoboRumble is available at http://darkcanuck.net/rumble.[16]

Robocode Little League[edit]

While no longer active, the Robocode Little League[17] (a weekly competition specifically for codesize-constrained bots) still provides tables on the past tournaments run.

Twin Duel[edit]

Twin Duel[18] is a 2v2 weekly survivalist tournament. The tournament brings challenges to Robocoders - they need a good mix of both one-on-one and melee strategy. It is a codesize-restricted league, which only allow teams under 2,000 bytes to participated. The format of the tournament is single-elimination round-robin with an exception of the final which is the best of three series.

International competitions[edit]

  • Virtual Combat held by CodeFest'11, the annual international online coding festival of Computer Engineering Society, IIT BHU
  • Robocode UdL held by the Universitat de Lleida
  • Robocode Ireland - Robocode Ireland, Games Fleadh Game Festival
  • IPL Robocode competition 2010 - Belgian Robocode Competition

RR@H champions[edit]

The September 29, 2009 champions of the RR@H are:

Codesize Battle type Bot Comment
Megabots 1-on-1 DrussGT Open source
melee Diamond There is 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.
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.
Unrestricted team Shadow Good performance among one-on-one, melee and team.
2000 bytes twin duel LunarTwins Good performance with nice 2v2 strategy

Influential bots[edit]

  • SandboxDT,[19] was once an unbeatable robot. It has been dethroned twice, by Duelist and by Shadow, which ended its reign. It continues to be a strong competitor, drawing in new coders and bots.
  • Shadow,[20] is a bot which introduces Wave Surfing concept into Robocode. It holds a melee crown.
  • FloodMini,[21] an open source minibot featuring Statistical Targeting, has helped Robocoders understand Statistical Targeting.
  • CassiusClay,[22] an open source top bot, has helped coders grasp advanced movement and targeting techniques.
  • Phoenix,[23] the current #5 bot, demonstrates the power of graphical debugging. The code used to draw debugging information onto the screen is open-source, released as DrawingBot.[24]
  • YersiniaPestis,[25] the current #11 robot, is the first robot which took the PL crown from Shadow.

Robocode wiki[edit]

The main site for Robocode knowledge and discussions is the RoboWiki, with techniques and strategies, info on bots, source code (both code snippets and complete competitive bots), and ask for help. The RoboWiki hosts RoboRumble@Home.

Beginners in Robocode can start with Robocode Beginners FAQ.[26]

See also[edit]

References[edit]

  1. ^ http://sourceforge.net/projects/robocode/
  2. ^ "Category:Movement". RoboWiki. Retrieved 2012-10-18. 
  3. ^ "Category:Targeting". RoboWiki. Retrieved 2012-10-18. 
  4. ^ "Wave Surfing". RoboWiki. Retrieved 2012-10-18. 
  5. ^ "Category:Statistical Targeting". RoboWiki. Retrieved 2012-10-18. 
  6. ^ "GuessFactor Targeting (traditional)". RoboWiki. Retrieved 2012-10-18. 
  7. ^ "GuessFactor". RoboWiki. Retrieved 2012-10-18. 
  8. ^ "Pattern Matching". RoboWiki. Retrieved 2012-10-18. 
  9. ^ "Category:Open Source Bots". RoboWiki. Retrieved 2012-10-18. 
  10. ^ "Codesize". User.cs.tu-berlin.de. 2002-05-10. Retrieved 2012-10-18. 
  11. ^ "Category:MegaBots". RoboWiki. Retrieved 2012-10-18. 
  12. ^ "Category:MiniBots". RoboWiki. 2007-11-12. Retrieved 2012-10-18. 
  13. ^ "Category:MicroBots". RoboWiki. Retrieved 2012-10-18. 
  14. ^ "Category:NanoBots". RoboWiki. Retrieved 2012-10-18. 
  15. ^ "RoboRumble". RoboWiki. Retrieved 2012-10-18. 
  16. ^ "RoboRumble!". darkcanuck.net. Retrieved 2012-10-18. 
  17. ^ "Welcome to the Robocode Little League". Robocode.yajags.com. Retrieved 2012-10-18. 
  18. ^ "Twin Duel". RoboWiki. Retrieved 2012-10-18. 
  19. ^ "SandboxDT". RoboWiki. Retrieved 2012-10-18. 
  20. ^ "Shadow". RoboWiki. Retrieved 2012-10-18. 
  21. ^ "FloodMini". RoboWiki. Retrieved 2012-10-18. 
  22. ^ "CassiusClay". RoboWiki. Retrieved 2012-10-18. 
  23. ^ "Phoenix". RoboWiki. Retrieved 2012-10-18. 
  24. ^ [1][dead link]
  25. ^ "YersiniaPestis". RoboWiki. Retrieved 2012-10-18. 
  26. ^ "Robocode/FAQ". RoboWiki. Retrieved 2012-10-18. 

External links[edit]