Updated January 2026 by Flemming N. Larsen
Robocode is a programming game where the goal is to code a robot battle tank to compete against other robots in a battle arena. The name "Robocode" is short for "Robot code." As the player, you are the programmer of the robot and have no direct control during the battle. Instead, you must write the AI that tells your robot how to behave and react to events occurring in the arena. Battles run in real-time and are displayed on-screen.
The motto of Robocode is: Build the best, destroy the rest! 🤖💥
Robocode is provided free of charge and is developed as a leisure project with no commercial involvement. It is an Open Source project provided under the terms of the EPL (Eclipse Public License).
Robocode was created by Mathew A. Nelson in late 2000 and became a professional endeavor when brought to IBM as an AlphaWorks download in July 2001. The game was inspired by Robot Battle (1994) and RobotWar (early 1980s).
In 2005, IBM released Robocode as Open Source on SourceForge. Flemming N. Larsen took over as lead developer in July 2006 and has continued development with numerous community contributions.
To run Robocode, Java 8 or newer must be installed on your system. Both the Java Runtime Environment (JRE) and the Java Development Kit (JDK) can be used. Note that the JRE does not include the standard Java compiler (javac), which comes with the JDK. However, Robocode includes a built-in compiler, ECJ (Eclipse Compiler for Java), so it is sufficient to run Robocode with only the JRE.
Important: As of version 1.10.1 (June 2025), Robocode has been refactored to support Java 24 and newer versions, even after the retirement of the Security Manager in Java 24. Robocode remains fully functional on older Java versions from Java 8 onward.
Also note that it is important that these environment variables are set up before running Robocode:
JAVA_HOME=C:\Program Files\AdoptOpenJDK\jdk-16.0.0.36-hotspotJAVA_HOME=/usr/lib/jvm/adoptopenjdk-16-hotspot-amd64bin directory of the Java home directory (JAVA_HOME), which includes the java executable for starting the Java Virtual Machine (JVM).PATH=%PATH%;%JAVA_HOME%\binPATH=${PATH}:${JAVA_HOME}/binYou can read more details here:
The RoboWiki is also an amazing resource for information about Robocode development used by most Robocoders.
If you have questions or need help, visit the Robocode Google Group.
The Robocode API is provided here:
The Robocode API consists of several components:
robocode. The Robot API is used for developing robots and is the only part of the API that robots are allowed to access.robocode.robotinterfaces. The Robot Interfaces are used for developing new robot types with a different API than the standard Robot API. Note: The game rules and robot behaviors cannot be changed.robocode.control. The Control API is used for allowing another application to start battles with selected robots in Robocode and retrieve the results. It is also possible to get snapshots of robots and bullets (such as position, heading, energy level, etc.) at a specific time during a battle.If you want to try out new robots beyond the sample robots that come with Robocode, you should visit the LiteRumble home page, which contains a large collection of bots.
The Robocode community uses the RoboWiki as its primary communication channel where people share ideas, code snippets, algorithms, and strategies.
Connect with other Robocoders:
A great way to improve your skills is to try real challenges. 🏆
On the RoboWiki, you can find various challenges:
If you want to challenge your robot(s) and yourself as a Robocoder, LiteRumble is the best way to do it. 🥊 LiteRumble is the ultimate collaborative effort to maintain a live, up-to-date ranking of Robocode bots.
Don't hesitate to enter the RoboRumble competition! 🚀
It is possible to specify options and predefined properties from the command line when running Robocode. You can list these options by typing the following in a command prompt or shell:
robocode -help
For example, you can:
You can read more details here:
If you discover an issue with Robocode, you are encouraged to report it as soon as possible. The sooner, the better.
Bug reports should be submitted on the Bugs page on the SourceForge site for Robocode. Each bug report will be prioritized based on its impact on the game.
It will be very helpful if you describe the steps needed to reproduce the issue. You are welcome to provide screenshots, source code, or anything else that will demonstrate the bug. It is also a good idea to include information about which operating system and versions of both Robocode and Java you are using.
If you are a registered user at SourceForge (register here), you will be able to add a "monitor" to your bug report. This way, you will receive notifications when someone adds comments to your report and be able to better track the current status of the bug, such as when it is fixed and in which version of Robocode the fix will be available.
If you are a developer and have a good idea of how the bug can be fixed, you are welcome to provide a pull request on GitHub. By fixing the bug, you will become a contributor to Robocode. You can learn more about how to contribute here. Note that we accept bug fixes under the terms of the EPL.
If you have an idea for a new feature or improvement for Robocode, you are welcome to share your idea by submitting a feature request or starting a discussion on the Robocode Application Developers group.
Feature requests should be submitted on the Feature Requests page on the SourceForge site for Robocode. Each feature request will be prioritized among other requests.
Note that if the feature represents a major change to the game (such as changing robot behavior), it might not be accepted, as Robocode is used for competitions like LiteRumble.
It will be very helpful if you describe your idea in detail and explain how you think it could be implemented in Robocode. For example, would it be possible to extend an existing feature with your idea?
If you are a registered user at SourceForge (register here), you will be able to add a "monitor" to your request. This way, you will receive notifications when someone adds comments to your request and be able to better track its status, such as when the feature has been implemented and in which version of Robocode it will be available.
If you are a developer and have a good idea of how the feature could be implemented, you are welcome to implement it if the feature is accepted. By implementing the feature, you will become a contributor to Robocode. You can learn more about how to contribute here. Note that we accept implementations under the terms of the EPL.
News about Robocode is posted on the blog for Robocode. You can subscribe to an RSS feed to receive news about Robocode:
You can also follow Robocode on Facebook:
The RoboWiki can be followed on Twitter as well:
If you want to contribute to Robocode with a new feature or bug fix, you should start by reading the Developers Guide for Building Robocode.
Note that we accept code changes under the terms of the EPL.
There is little documentation about the internals of Robocode, and the codebase will need to be examined as a contributor to gain insight into how Robocode is implemented. This requires a skilled Java developer to understand how Robocode is structured.
Robocode is divided into several modules. You can read Pavel Savara's blog post to get a good overview of Robocode here:
Help for Robocode internals can be provided through the Robocode Application Developers group, where you can register and start a new topic. This is the best way to get information and ask about details regarding Robocode internals.
If a contribution is a relatively small change involving fewer than 10 files, the preferred method is to create a pull request on GitHub.
Your pull request will be reviewed and tested before being accepted and merged into Robocode. Note that additional work might be done by other Robocode developers to finalize the contribution or make adjustments.
Robocode Tank Royale is a new version of Robocode with a completely redesigned architecture based on WebSocket communication, supporting multiple programming languages and network play. 🎯
Key differences:
Resources: