Build the best - destroy the rest!

Thursday, 10 December 2009

Robocode Beta

This is a maintenance release of Robocode with the bug fixes and changes described below.


  • Bug [2897215] - Robot Editor doesn't accept packagename with dot (.) in it.

  • Bug [2876395] - Source is not included.

  • Bug [2867326] - Lockup on start if too many bots in robots dir (cont'd).


  • Req [2641759] - Scrollable properties. All console windows including the Robot Console and Properties are now scrollable, and all have the same look.


  • It is now possible to add paths to robot project inside an Eclipse workspace under the Development Options in the Preferences. Robocode will read the .classpath file in the project in order to locate both class files, properties files, and java files. This means that the Robot Packager is now able to include your source files when you use Eclipse, and it supports multiple source paths. Notice that Robocode does not support linked sources or include and exclude filters.

  • Changed the messages given when creating a new robot with the Robot Editor regarding robot name and package name.

Download Robocode Beta from here

Wednesday, 11 November 2009


This is the final release of that fixes two bugs compared to the beta version.


  • RobocodeFileOutputStream.getName() always returned null instead of the filename.

  • Robots listed in e.g. the New Battle window was sorted like: 1.1.1, 1.1.10y, 1.1.2, 1.1.10 (alpha-numerical). But version numbers with an ending letter like in "1.1.10y" like in the versions just listed, were not placed in the correct order. Notice that 1.1.10y is between 1.1.1 and 1.1.2. This bug has been fixed so the versions in the example now will be sorted correctly like: 1.1.1, 1.1.2, 1.1.10, 1.1.10y

Download Robocode from here

Wednesday, 14 October 2009

Robocode Beta

This is a maintenance release of Robocode, which fixes the bugs below.


  • Bug [2871138] - Graphics2D.getTransform() throws NPE

  • Bug [2872781] - "Teleport" - occurs when robot's distance remaining is very large

  • Bug [2876395] - Source is not included, was not set

Download Robocode Beta from here

Thursday, 8 October 2009

How do you test your robot ?

Philip Johnson from University of Hawaii uses Robocode in his computer science course.

He came with idea of unit testing Robocode robots and prepared excellent video guide to show you how to do that.

He reused our implementation of RobotTestBed, which we use to test Robocode engine. We will be working with him to include his idea. Probably as downloadable Robocode extension package.

Code and more could be found in pmj-dacruzer project

Enjoy this great stuff!

Friday, 25 September 2009


This final version is dedicated for the RoboRumble@Home community where many issues seen with the RoboRumble client have been solved.

In the following the bug fixes and changes compared to the Beta are listed.


  • Bug [2845608] - in RobotFileSystemManager.init

  • Bug [2845612] - Can't load Katana 1.0 or DrussGT 1.3.1wilo

  • Bug [2854692] - Lockup on start if too many bots in robots dir

  • Bug [2852860] - IllegalArgumentException on painting in some robots

  • Fixed NullPointerException that could occur with the -battle command-line option



  • The previous 1.7.x.x versions have been very strict so that robots that could not be loaded, started, skipped too many turns etc. would be disallowed to participate in battles. With the bugfix for bug [2845612] above this policy has been changed so robots are only "banned" if the cause a security violation or they could not be loaded or started (meaning that they are not able to run). In addition, ALL security violations are always written out in both the main console and robot's console. A message will be written out in the main console like "xxx has caused a security violation. This robot has been banned and will not be allowed to participate in battles".


  • With the bugfix for bug [2852860] a change was made so a robot will now receive this message in its console window, if it is painting too much between actions:
    "SYSTEM: This robot is painting too much between actions. Max. capacity has been reached."

  • Notice that a robot is not allowed to perform an unlimited amount of paint operations for two reasons:

    1. It takes up a lot of memory as the painting operations are recorded in a buffer before being processed, and potentially this buffer must be recorded to a file (for replays). A robot is allowed to use up to a maximum of 64 KB per action. An average painting operation like e.g. fillRect(x, y, width, height) takes up 15 bytes, meaning that more 4000 painting operations should be possible, which is a lot.

    2. It takes a lot of CPU cycles to process the painting buffer to the display making the painting slow if the buffer is too large.

  • It is possible to remove the limit of the robots painting buffer by using the command-line option: -Ddebug=true

Download Robocode from here

Wednesday, 26 August 2009

Robocode Beta

This version is dedicated for the RoboRumble@Home community where many issues seen with the RoboRumble client have been solved.
Thank you all for reporting as many known issues as possible, and also help out solving these - especially with the issue seen with the robot movement that had a big impact on the scores and rankings! :-)

A big thanks goes to Patrick Cupka ("Voidious"), Julian Kent ("Skilgannon"), "Positive" and Nat Pavasant ("Nat") for their combined work with developing and testing the new and improved robot movement regarding acceleration and deceleration rules (Bug [2828072]). :-)


  • Bug [2828072] - Accel/decel rules introduced in causes trouble.

  • Bug [2828479] - Missed onRobotDeath events.

  • Bug [2819387] - Team jar files reported as corrupted.

  • Bug [2809518] - Does not extract .properties files into bot data dir. This fix did not work properly as the file sizes were truncated to 0 bytes.

  • Bug [2828614] - Sometimes too few results for robots are displayed.

  • Bug [2820434] - NullPointerException when setting classpath directory.

  • Bug [2811621] - Invalid entry point in codesize-1.1.jar.

  • Bug [2833271] - IllegalThreadStateException occurring in RoboRumble.

  • Bug [2831201] - Robocode enters infinite loop with the Restart button.

  • The RateControlRobot (Beta) returned rates in radians instead of degrees with the methods: getTurnRate(), getGunRotationRate(), and getRadarRotationRate().

Changes for RoboRumble

  • Updated the PARTICIPANTSURL in the roborumble.txt, meleerumble.txt, and teamrumble.txt

Download Robocode Beta from here

Thursday, 9 July 2009


This version is a maintenance release of Robocode fixing more bugs.


  • Bug [2813513] - Bullet and Ram Damage Bonuses are wrong.

  • Bug [2809518] - Does not extract .properties files into bot data dir.

  • Bug [2805858] - Access denied javax.swing -DNOSECURITY=true

  • Sometimes the "Show results when battle(s) ends" in the Common Options was disabled when running the RobocodeEngine, even though the setting had been enabled earlier.

  • Bug [2811621] - Invalid entry point in codesize-1.1.jar.

  • A NullPointerException occurred when closing the Preferences window, when no sound device is present in the system.


  • The default font on the Graphics context when using onPaint(Graphics2D) or getGraphics() has been changed to the "Dialog" font.

Download Robocode from here

Monday, 8 June 2009

Robocode Beta

Please welcome a new robot type, the RateControlRobot. This new robot type has been provided by Joshua Galecki and is an extension of the AdvancedRobot. Currently, the RateControlRobot is in its Beta stage.

The RateControlRobot class has been created in an attempt to allow more realistic robots. That is, many real/physical robots are given commands in terms of rates ("move forward one meter per second"). Hence, the RateControlRobot helps simulating a real robot.

The RateControlRobot provides these new methods:

  • setVelocityRate(double)

  • setTurnRate(double)

  • setGunTurnRate(double)

  • setRadarTurnRate(double)

These methods overrides setAhead(),setBack(), setTurnRight(), setTurnGunLeft() etc.

For an example, please look into the source code for the new sample.VelociRobot.

We ask the community for feedback for the new RateControlRobot and we will announce it as stable in one of next major releases. So please report issues or change requests etc. for this new robot type.


  • AdvancedRobot.setMaxTurnRate() did not work properly since version 1.5.4

  • Bug [2799165] - Wrong survival scores sent by rumble client

  • Bug [2802227] - Funny behaviors with robot graphics/paintings

Changes for RoboRumble

  • Added validation of each of the participant lines of the participant list. If a participant line is invalid due to e.g. wrong format/syntax or bad URL, then an error message is written out and the participant is ignored.

  • The format of the lines in the participant lines is the same as usual.

  • Accepted lines must follow this format: {robot+version},({http-url}|{repository-id}), where {robot+version} must match the regular expression "[\\w\\.]+[ ][\\w\\.-]+", the {http-url} must be a HTTP URL pointing at the robot .jar file, and the {repository-id} must be a number. The {http-url} and {repository-id} are mutual exclusive. Example of accepted lines:

  • johndoe.SomeRobot 1.0,

    johndoe.SomeRobot 1.0,321

  • Removed the info message "Trying to download {botname}" from the console output.

Other changes

  • The Development Options has become more usable, as Ruben Moreno Montoliu has added a list of paths and buttons for adding and removing directories, full resizable.

  • Updated the javadoc with a note for the setAdjust*() robot methods, which are ignored when turning with infinite values.

Download Robocode Beta from here

Monday, 25 May 2009


With this release some additional bugs have been eliminated compared to the beta version.


  • Bug [2791007] - FontMetrics StackOverflowError

  • Bug [2791010] - Graphics2D.setFont() has no effect

  • Bug [2793464] - setMaxVelocity(lower than current) + reverse direction bug

  • Bug [2785448] - Wrong file path used for development bots. Refixed.

  • Bug [2795854] - Installer says to run robocode.jar

  • Bug [2795883] - Nanobot rumble not sending melee or team parameters. Thanks goes to Jerome Lavigne aka. Darkcanuck for this fix.

  • Fixed three bugs introduced with the Beta version found using new test units:

    • One bug where the speed would immediately drop to max. velocity when calling setMaxVelocity() - disregarding the acceleration and deceleration rules.

    • Another bug where the turn rate was a bit wrong when moving back and turning left in the same time.

    • A third bug where the robot continued to move backwards when it should have stopped due to setAhead(0) or setBack(0).

Download Robocode from here

Saturday, 9 May 2009

Robocode Beta

With this beta, we corrected an old bug in Robocode with the robot speed and movement in some situations when a robot is decelerating. That is, a robot would only move 99% according to it's own rules. E.g. it could end with a distance remaining on -0.2 instead of 0, it could have a velocity higher than the set max. velocity, and it could take an extra turn to stop movement when decelerating. However, these 3 caveats does not occur that often. Hence, they should not have a big impact on the robot behavior and rankings on the RoboRumble etc.

If you do experience big differences since version, then don't hesitate with contacting us with detailed information about the scenario, so it is possible for us to reproduce and fix.


  • Bug [2077512] - Bug in RobotPeer.updateMovement? Robocode was not moving 100% according to it's own rules. Now it is.

  • Bug [2740708] - Fair Play! With two identical robots in a battle against each other, the first robots was much more likely to win, which was not fair.

  • Bug [2779557] - Client tries to remove all participants. When RoboRumble, TeamRumble, and/or MeleeRumble downloaded the participants list and did not receive a HTTP_OK or an empty list, the participants list was emptied. This caused problems with the RoboRumble server.

  • Bug [2785448] - Wrong file path used for development bots. Added option -DALWAYSUSECACHEFORDATA for anyone who liked it better.

  • Bug [2785456] - Melee rumble doesn't use "smart battles" (aka. priority battles). Thanks goes to Jerome Lavigne aka. Darkcanuck for this fix.

  • Fixed several ArrayOutOfBoundsExceptions occurring when starting a battle with fewer robots than a battle just played with more robots.

Changes for RoboRumble

  • The participants URL for RoboRumble, MeleeRumble, and TeamRumble have been updated to use the participant lists from the new RoboWiki:

    • RoboRumble:

    • MeleeRumble:

    • TeamRumble:

Other changes

  • Updated the Help menu to point at the new RoboWiki regarding the Online Help and FAQ.

  • RobocodeEngine control class: Added additional runBattle() method where it is possible to specify the initial positions of the robots when starting a battle.

  • The about box was updated, where contributors are now written in bold and in a green color.

  • Download Robocode Beta from here

    Friday, 10 April 2009


    With this release we have focused on eliminating as many problems seen with RoboRumble as possible. Hence, this version should hopefully prove stable as the new RoboRumble client.

    Bugfixes for RoboRumble

    • Bug [2727675] - Meleerumble using 2 bots instead of 10. Now the MELEEBOTS (number of robots that participate in a melee battle) works as expected.

    • Bug [2742554] - TeamRumble uploading result for Robot instead of team.

    • Bug [2727667] - Not enough java memory allocated in launch scripts. The launch scripts for RoboRumble and TeamRumble were changed so it is allowed to use up to 512 MB heap memory, and MeleeRumble is allowed to use up to 1024 MB.

    • Bug [2740403] - EOFException during repository rebuild. Exception is now reported in a simplified way.

    • Bug [2742891] - JarJar multi-registration. RoboRumble was not reusing the same RobocodeEngine instance.

    Other bugfixes

    • Bug [2627698] - pe.SandboxDT_3.02 stoped working. We had broken semantics of getTeammates() to return empty array when there is no team.

    • Bug [2738985] - Robocode API: Cannot subclass Event in 1.7.1.

    • Bug [2738993] - Errors with some robot classes when rebuilding database.

    • Bug [2711605] - Webpage button lay over robot description.

    • Bug [2723228] - Round number set by user was not saved between run.

    JuniorRobot changes

    • Bug - The event variables scannedXXX and hitXXX on the JuniorRobot was not reset to -1 (or -99) when nothing was scanned or hit.

    • Bug/Req [2500129] - Prevent JuniorRobot to be unresponsive.

    • Change: JuniorRobot will now automatically scan for enemies when it is not moving.

    Download Robocode from here

    Wednesday, 25 March 2009

    Startup tips - harvesting from you

    Hi All,

    We plan to implement startup tips and we are looking for good ones. I mocked up pictures of solution. We would like to implement panel with multiple fonts and links to web. It will be probably driven by XML similar to HTML, we don't have it yet, so the final solution may look different.
    startup tip
    startup tip

    Now you come, we need your help. Please share your best tips with us.

    You could do it by commenting here or on ticket or just send us email.

    We would like to see nice, well formed, short, informative TIPs about Robocode.

    Thanks !
    Pavel & Flemming

    Tuesday, 24 March 2009

    Robocode 1.7.1 (final)

    Robocode 1.7.1 has now finally been released.

    Beta releases prior to this final release:

    Version 1.7.1


    • Bug [2643448] - Editor UNDO does delete the line when no is undo left.

    • Bug [2664844] - Editor: Find/replace dialog (set cursor position).

    • Bug [2699018] - and were broken.

    • Bug [2699028] - NullPointerException in BattlesRunner.runBattlesImpl.

    • Bug [2703301] - Custom event priority was broken.


    • The New Battle dialog is now larger per default.

    • The layout of the View Options and Sound Options tab in the Preferences has been improved. An error dialog is shown when the input field for the desired TPS is out of range.

    Download Robocode 1.7.1 (final) from here

    Wednesday, 11 March 2009

    Robocode 1.7.1 Beta 2 - few bugs left?

    We fixed more bugs for the version 1.7.1 Beta 2. There are a few bugs left that are not considered critical, and which will be available with the final 1.7.1 release. Please try out this version and try to find as many bugs you possible can and report issues on the tracker for Robocode.


    • Bug [2658090] - Typing to find bot no longer works.

    • Bug [2666598] - API: Typo in Documentation onBulletMissed(BulletMissedEvent).

    • Bug [2658167] - Put back setTime() method of Event, the security is now handled other way, not by hiding the field.

    • Fixed the problem with loading team robots from nested .jar files.

    • On Ubuntu (Linux) the "Default window size" did not work properly.

    Internal Changes

    • On SUN's JVM enabled caching of .jar files opened thru URLConnection. Solved problem with closing such files by implementing URLJarCollector.

    Download Robocode 1.7.1 Beta 2 from here

    Monday, 2 March 2009

    Robocode 1.7.1 Beta - lots of improvements

    With this release we give BIG thanks to Nat Pavasant who have put in great effort in testing and finding as many bugs in Robocode as possible. He has been a great help with testing especially RoboRumble@Home functionality.

    Currently, there is one known issue, which will be fixed with the next Beta or in the final release of version 1.7.1. This is critical for e.g. the TeamRumble, so please notice the known issue below.

    Known issue

    • With this version Robocode cannot handle team packages containing robot .jar files, i.e. robot packages.


    • Bug [2626148] - Bots referencing robocode.robocodeGL broken. Now, we are now not following refrences to robocode packages.

    • Bug [2626164] - Don't ever punish robots in devel directories by removing from repository.

    • Bug [2634807], [2632874] - Robot console was wrongly synchronized with battle.

    • Bug [2634123] - Robot packager can be activated once per running.

    • Bug [2643395] - Development robots cause problems with data files.

    • Bug [2628346] - A battleview size exceed 800x600 filled with black.

    • Bug [2618169] - NullPointerException when using -battle option from the cmd-line.

    • Bug [2628217] - Robot Colors don't stick between rounds.

    • Bug [2649954] - Open battle menu dialog is not loading robots.

    • The command line usage of Robocode was not printed out at all when using the -? or -help option.

    New features

    • Added getCurrentWorkingDir() + getRobotsDir() to the robocode.control.RobocodeEngine.

    • Request [2446276] - Ranking Panel should be visible when Robocode is minimized. This feature has been added and it is possible to control the behavior from Common Options in the Preferences with the "Don't hide Rankings when main window is minimized", which is enabled per default.

    • Request [2467545] - Command Line option for saving a battle record file. Two new command line options have been added for Robocode, i.e. - record and -recordXML . The -record option records the battle as a binary and zipped battle record. Here I propose that the specified filename should is something like The -recordXML does the same as the -record option, but saves the battle record as an XML file. Here I suggest that you use a filename like

    • Request [1749483] - Speedup time required for rebuilding robot database.

    RoboRumble changes

    • Changed the link for into as the RoboRumble server fervir is down and with unstable ranking. The current ranking at Darkcanuck's server is alive. Almost all clients are point to Darkcanuck's now. Hence, it is updated now.

    • Update 3.3.2009: After discussion with both server owners we confirmed that old server will die soon. Big thanks to Pulsar for hosting it for us till now.

    Internal Changes

    • The robot repository has been updated. It is no longer extracting .jar files.

    • It also remembers last timestamp on file so detection of the changes is really fast. Only data files are extracted now.

    • Data files for non-packed robots were moved to .robotcache as well.

    • VersionManager is now able to detect if the Robocode version was upgraded since last run.

    • Blocking security issue with relative path in getDataFile() method.

    • Improved security in RobotClassLoader.

    • Reimplemented RobotPackager.

    • BulletSnapshot has now method getBulletId which gives identity of bullet for UI.

    Download Robocode 1.7.1 Beta from here

    Thursday, 19 February 2009

    Robocode - fixes yet another compiler path problem

    Robocode fixes a new major bug introduced with version when trying to get rid of Bug 2597046.


    • The fix for "Bug [2597046] Compiler classpath not quoted" backfired, as the entire text field in the window with the compiler properties would now be quoted. Hence, the compiler would not be able to compile, and it was not possible to cheage the compiler preferences from the GUI.

    Download Robocode from here

    Saturday, 14 February 2009

    Robocode - fixes major bug with starting Robocode

    Robocode fixes a major bug that some users have experienced when trying to start Robocode.


    • Bug [2596947] Fix needed to Robocode.bat: Some users experienced problems with starting Robocode. Hence, all startup batch and shell files for Windows, Linux, Mac OS X etc. have been corrected.

    • Bug [2597046] Compiler classpath not quoted: When running Robocode in a folder with spaces, the compiler classpath was not quoted. Hence, the compiler would not work.

    Download Robocode from here

    Monday, 26 January 2009

    Robocode 1.7 Beta 2

    This version contains bugfixes for bugs found in the previous 1.7 Beta.


    • Bugfix [2527112] Ubuntu throws NullPointerException in main when trying to startup Robocode.

    • Bugfix [2528467] Installation fail on windows if directory contain space(s).


    • Improved the version checking for new Robocode versions available for download.

    Download 1.7 Beta from here

    Tuesday, 20 January 2009

    Robocode 1.7 Beta - modularization

    This version represents a completely new infrastructure of Robocode making it easier to extend and maintain for the future, while staying 100% backward compatible. The goal of this release has been to introduce the new platform for Robocode and getting it tested carefully by the community before we add features to it for version 1.7.1 and newer.

    By omitting new features, we hope that we'll be faster in locating and fixing any issues introduced with this version compared to the previous version 1.6.2. When such issues have been eliminated, we will concentrate on the new features, which includes support for more programming languages and also some of the pending feature requests reported on the SourceForge site for Robocode


    • Bug [2497164] Spammy output on robot console windows.

    Internal changes

    • Robocode was modularized using the dependency injection framework PicoContainer. This work includes introduction of many interfaces to existing components.

    • Introduced Maven2 as build setup where the whole directory layout is based on the standard Maven structure.

    • Rewritten the RobotClassLoader so it is able to load .jar file in the future.

    • Rewritten security layer to use AccessController and CodeSource for detection of trusted code.

    • Redesigned RobocodeProperties to SettingsManager and introduced ISettingsListener.

    • Implemented RbSerializer to be able to implement IPC (Inter-Process Communication) in future. This should make it possible to extend Robocode for more platforms like e.g. Microsoft .NET.

    • Redesigned RepositoryManager and nearby to hide implementation details.

    • Moved all implementation of Robocode to the package 'net.sf.robocode'. The old package 'robocode' is now used only for API to outer world in order to keep backwards compability.

    Download 1.7 Beta from here

    Monday, 5 January 2009

    Robocode 1.6.2

    This is the final release of Robocode 1.6.2, which contains 3 bugfixes compared to the recent Beta 4 version.


    • Bug [2467536] Robot name was missing when replaying XML record.

    • Bug [2465580] Junior Robot turnAheadRight() bug. When a JuniorRobot was calling turnAheadRight(), turnAheadLeft(), turnBackRight(), or turnBackLeft() - the following exception occurred causing the robot to be terminated: java.lang.ClassCastException: robocode.peer.proxies.StandardRobotProxy

    • Bug [2449081] Exception when changing between Robot to AdvancedRobot. When a robot was changed from a Robot into an AdvancedRobot and recompiled, the game would cast a ClassCastException if a battle was started or restarted including that particular robot. However, this bug did not occur with new battles where the list of robots was refreshed (by pressing Ctrl+R).

    Download 1.6.2 (final) from here