Difference between revisions of "RoboRunner"

From Robowiki
Jump to navigation Jump to search
m (add navbox)
(update to 1.1.0, update / re-prioritize to-do's)
Line 9: Line 9:
 
== Download and install ==
 
== Download and install ==
  
* Download it here: [http://dijitari.com/void/robocode/roborunner-1.0.1.zip roborunner-1.0.1.zip] (1.6 MB)
+
* Download it here: [http://dijitari.com/void/robocode/roborunner-1.1.0.zip roborunner-1.1.0.zip] (1.6 MB)
 
* Unzip the contents into a new directory, e.g. ~/roborunner.
 
* Unzip the contents into a new directory, e.g. ~/roborunner.
 
* Run setup.sh to make ''n'' clones of an existing Robocode directory, where ''n'' is the number of concurrent threads you plan to run with. E.g., ''./setup.sh 3 ~/robocode_1.7.4.1''
 
* Run setup.sh to make ''n'' clones of an existing Robocode directory, where ''n'' is the number of concurrent threads you plan to run with. E.g., ''./setup.sh 3 ~/robocode_1.7.4.1''
Line 38: Line 38:
  
 
There are still some important things missing. Here's my current to do list, in rough priority order.
 
There are still some important things missing. Here's my current to do list, in rough priority order.
* handle other scoring besides APS
 
* print % of bots faced until it is 100%
 
 
* render TC/MC scores with support for groups if scoring is bullet damage/energy conserved
 
* render TC/MC scores with support for groups if scoring is bullet damage/energy conserved
* documentation: info on included cleanup / shell scripts
 
 
* way to check score without running anything
 
* way to check score without running anything
 
* handle errors in battles, maybe dying processes or timed out battles too
 
* handle errors in battles, maybe dying processes or timed out battles too
 
* override for number of threads, <= number of installs specified
 
* override for number of threads, <= number of installs specified
 
* JVM arguments in roborunner.properties, right now just passing -Xmx512M
 
* JVM arguments in roborunner.properties, right now just passing -Xmx512M
 +
* custom battle listeners for more sophisticated scoring or other analysis
 
* layer over Properties battleData so I’m not parsing all over the place
 
* layer over Properties battleData so I’m not parsing all over the place
* option for overall output after every battle
+
* option for complete, per bot output after every battle or season
* store individual battle scores instead of running totals, if there’s demand / use for it
 
 
* support for Windows (.bat files and/or setup instructions)
 
* support for Windows (.bat files and/or setup instructions)
 
* unit tests
 
* unit tests
 +
* specify dirs for sources of robots in roborunner.properties
 +
* documentation: info on included cleanup / shell scripts
 +
* arg to clear .data dirs before starting
 +
* store individual battle scores instead of running totals, if there’s demand / use for it
 
* recover from corrupted data files
 
* recover from corrupted data files
* arg to clear .data dirs before starting
+
* print % of bots faced until it is 100%
 
* print avg elapsed time per battle at end
 
* print avg elapsed time per battle at end
* specify dirs for sources of robots in roborunner.properties
 
  
 
__NOTOC__
 
__NOTOC__
  
 
[[Category:Utilities]]
 
[[Category:Utilities]]

Revision as of 00:37, 29 July 2012

Sub-pages:
Version History - Help

A batch battle runner in the vein of RoboLeague and RoboResearch. Designed to be easy to setup and to run fast with multi-threading and persistent Robocode engines, using the Robocode control API.

Download and install

  • Download it here: roborunner-1.1.0.zip (1.6 MB)
  • Unzip the contents into a new directory, e.g. ~/roborunner.
  • Run setup.sh to make n clones of an existing Robocode directory, where n is the number of concurrent threads you plan to run with. E.g., ./setup.sh 3 ~/robocode_1.7.4.1

Sorry, the setup is Unix only right now. If anyone wants to contribute analogous .bat files, please feel free. Or maybe you can run the shell scripts with Cygwin. RoboRunner itself should work fine if you install some copies of Robocode and point to them in roborunner.properties.

Running battles

  • Copy some bots into roborunner/bots. JARs will be copied, if necessary, into the robots directory of each Robocode install on launch.
  • Create a .rrc file to configure a challenge, or use one from RoboResearch.
  • Run some battles with rr.sh. E.g., ./rr.sh -bot voidious.Diamond 1.8.2 -c dibed35.rrc -seasons 5

Advantages over RoboResearch

  • Easy to setup and get started.
  • Keeps Robocode engine processes running instead of spinning up a new JVM for every battle, for much improved performance.
  • Support for Melee and custom battlefield sizes.
  • Scores for each challenger are kept in a separate file. No slow-downs because of all the previous battles you've run, and no fussing with databases.
  • Cleaner, more human readable output.

Source code

I've published the code in the public domain at GitHub: RoboRunner repo

RoboRunner depends on Guava, which is included in the download above. Read about it or grab the latest JAR here: http://code.google.com/p/guava-libraries/

What's missing?

There are still some important things missing. Here's my current to do list, in rough priority order.

  • render TC/MC scores with support for groups if scoring is bullet damage/energy conserved
  • way to check score without running anything
  • handle errors in battles, maybe dying processes or timed out battles too
  • override for number of threads, <= number of installs specified
  • JVM arguments in roborunner.properties, right now just passing -Xmx512M
  • custom battle listeners for more sophisticated scoring or other analysis
  • layer over Properties battleData so I’m not parsing all over the place
  • option for complete, per bot output after every battle or season
  • support for Windows (.bat files and/or setup instructions)
  • unit tests
  • specify dirs for sources of robots in roborunner.properties
  • documentation: info on included cleanup / shell scripts
  • arg to clear .data dirs before starting
  • store individual battle scores instead of running totals, if there’s demand / use for it
  • recover from corrupted data files
  • print % of bots faced until it is 100%
  • print avg elapsed time per battle at end