Difference between revisions of "RoboRunner/Help"
(some general help info) |
m (→Options) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 24: | Line 24: | ||
<pre> | <pre> | ||
<Challenge name> | <Challenge name> | ||
− | PERCENT_SCORE | + | {PERCENT_SCORE|SURVIVAL_FIRSTS|SURVIVAL_SCORE|BULLET_DAMAGE|MOVEMENT_CHALLENGE} |
<Number of rounds> | <Number of rounds> | ||
<Battlefield width> (optional) | <Battlefield width> (optional) | ||
Line 53: | Line 53: | ||
abc.Shadow 3.84i, wompi.Numbat 1.5, tzu.TheArtOfWar 1.2 | abc.Shadow 3.84i, wompi.Numbat 1.5, tzu.TheArtOfWar 1.2 | ||
</pre> | </pre> | ||
+ | |||
+ | == Options == | ||
+ | |||
+ | The following optional settings can be passed to rr.sh: | ||
+ | * ''-t'' - Set number of threads used, up to the number of Robocode installs configured in roborunner.properties. | ||
+ | * ''-wiki'' - Force wiki formatted score output, e.g. for [[MC2K7]]. | ||
+ | * ''-smart'' - Smart battle selection. Selects battles to try and produce the most accurate overall score in the least amount of time. | ||
== What about Windows?! == | == What about Windows?! == |
Latest revision as of 02:51, 13 August 2012
- RoboRunner Sub-pages:
- RoboRunner - Version History - Help
Contents
Setup
Setup should be as simple as unzipping to a fresh directory and cloning a Robocode install with setup.sh. For example:
- mkdir ~/roborunner
- cd ~/roborunner
- unzip ~/Downloads/roborunner-1.0.1.zip
- ./setup.sh 3 ~/robocode_1.7.4.0
This would make 3 copies of the given Robocode install under ~/roborunner/robocodes, and delete the bot JARs, robot cache, and robot database from the copies. When you execute RoboRunner, one thread will be used for each Robocode install.
Executing battles
The included rr.sh shell script can be used to run battles. You need to pass a challenger bot with -bot, a challenge file with -c, and a number of seasons with -seasons. For example:
- ./rr.sh -bot voidious.Diamond 1.8.2 -c dibed35.rrc -seasons 5
Any bots you want to run battles with should go into the roborunner/bots subdirectory. They will be copied into the Robocode installs when you run RoboRunner, if they're not already present.
Challenge file format
The format is derived from RoboResearch, and RoboResearch files should work without any changes. Each line is a set of bots for the challenger to face. It can be just one bot or a comma delimited set of bots, which would be a Melee battle.
<Challenge name> {PERCENT_SCORE|SURVIVAL_FIRSTS|SURVIVAL_SCORE|BULLET_DAMAGE|MOVEMENT_CHALLENGE} <Number of rounds> <Battlefield width> (optional) <Battlefield height> (optional) package1.Bot1 1.0 package2.Bot2 1.0 package3.Bot3 1.0, package4.Bot4 1.0
1v1 example:
Sample 1v1 Test Bed PERCENT_SCORE 35 jam.mini.Raiko 0.43 rz.HawkOnFire 0.1 zyx.micro.Ant 1.1
Melee example:
Sample Melee Test Bed PERCENT_SCORE 35 1000 1000 rz.HawkOnFire 0.1, zyx.micro.Ant 1.1, ph.melee.ArcherME 0.3 abc.Shadow 3.84i, wompi.Numbat 1.5, tzu.TheArtOfWar 1.2
Options
The following optional settings can be passed to rr.sh:
- -t - Set number of threads used, up to the number of Robocode installs configured in roborunner.properties.
- -wiki - Force wiki formatted score output, e.g. for MC2K7.
- -smart - Smart battle selection. Selects battles to try and produce the most accurate overall score in the least amount of time.
What about Windows?!
I haven't forgotten Windows, but the setup script was much easier to write as a shell script than as a Java program, and many folks here are on Mac or Unix, so that's the route I've gone for now. If you have Cygwin, give that a try and let me know if it works!
I do plan to make setup as easy on Windows as on Unix, but I wanted to release early and iterate. For now, if you want to get it setup manually, here's what you'd need to do.
- Install some copies of Robocode and specify them in roborunner.properties. Just add the line: robocodePaths=/path/to/robocode_1,/path/to/robocode_2
- Create bots and data subdirectories and make sure you can write to them.
- Instead of using rr.sh, just use the raw Java command and pass the arguments to that, or make a batch file: java -cp lib/roborunner-1.0.1.jar:lib/guava-12.0.1.jar:robocodes/r1/libs/robocode.jar robowiki.runner.RoboRunner -bot voidious.Diamond 1.8.2 -c dibed35.rrc -seasons 5
Please let me know if you can help with some batch file magic for the Windows setup. (I'd give it a shot myself if I even had a Windows box to test it on.)
Other stuff
- If you want to delete or mess with the data files, they're in the data subdirectory in a simple key=value format.
- rmall.sh will delete all JARs, robot caches, and robot databases from the Robocode installs created by setup (in roborunner/robocodes). The bots needed are copied on launch, and Robocode will unpack all the JARs on startup, so you can do this as often as you like.
- rmdata.sh will just clear the .data directories. I like to do this between benchmarks of dev versions, so data saving bots will act as similarly as possible between runs.