Administrator Instructions

The sections below contain information for an administrator of the CodeRally environment.

Setting up a CodeRally server

Follow the instructions below to configure a server for sharing code or running a tournament:

  1. Install a Java JRE on the machine that you want to use as the server.
  2. Copy the rally.jar file included in the distribution to the machine.
  3. Run java -jar rally.jar -server c:\temp\coderally 1234 from the commandline, where c:\temp\coderally is the directory you CodeRally to use for backup, and 1234 is the port number for the server to use.
  4. To allow others to connect to your server, send them the hostname of the server and port number you used.
  5. When you want to stop the server, use Ctrl-C.
Each client machine must take the following steps to connect to this server:
  1. Start Eclipse configured with the CodeRally environment.
  2. Go to Window > Preferences.
  3. Select CodeRally.
  4. Enter the server host name and port.
  5. Click Apply, and then OK.
  6. You can now click the Submit button on the toolbar at any time to send your code to the server. Once you have done this, use the public track to compete against the other player's code that has been downloaded to your machine.

    Every submission you make to the server is backed up. Only the latest copy of your code (not including source) is sent to each new user who submits code to the server. Class files are encyrpted to prevent decompiling.

Administering a Tournament

To administer a CodeRally competition, the administator must take the following steps to setup the machines and run the tournament:

Machine configuration

  1. Configure one machine using the regular installation instructions.
  2. Start Eclipse.
  3. Go to Window > Preferences.
  4. Select CodeRally.
  5. Enter the server host name and port that you will be using.
  6. Click Apply, and then OK.
  7. Copy the eclipse installation directory and workspace to any number of machines that you want to use for the tournament.
  8. The JavaDocs (javadoc.zip) and manual (manual.html) found in this directory can be edited to include information for the current tournament, and then printed for each contestant or placed on the machine's desktop.
  9. Copy rally.jar to your server machine.
  10. Optional: Use another spare machine and map a drive to the server. This machine will be used for a spectator scoreboard.
Running the tournament
  1. Use the -server mode to start the server.
  2. Optional: On the spectator machine, run using the -spectate mode to start the spectator scoreboard on this machine.
  3. [Coding portion of the tournament runs for 1 to 3 hours]
  4. When the coding portion is over, use Ctrl-C to stop the server.
Finding and displaying the winners
  1. Use the -tournament mode to run a tournament on the server.
  2. Optional: If you need to do elimination rounds, backup the tournament directory and remove the players that did not make it past the first round. The placement information can be found in the trace files within the working directory.
  3. When you want to playback the tournament, use the -playback mode.
  4. Optional: Use another machine and map a drive to the server. Run using the -scoreboard mode to start a secondary scoreboard on this machine.

Launching Externally

To run the challenge from the command line, use the following command:

java -jar rally.jar [mode]

Where mode is one of:

-test
-testtournament
-tournament
-playback
-server
-spectate
-scoreboard

In test and testtournament modes, the -Dcode.location=xxx system property is used to point to the location of the user's code.

The description of each mode is listed below, along with the mode’s additional parameters.

-test [path] [name] [rounds]
Run a tournament in test mode. This will prompt the user to pick which sample cars to run against.
[path] The root (working) directory which stores all of the tournament information. The same directory should be used for all of these commands.
[name] The name of the tournament. This name will be displayed on the scoreboard.
[rounds] The number of rounds to play.

-testtournament [path] [name] [rounds]
Run a test tournament.

-tournament [path] [name] [rounds]
Run a complete tournament in batch mode. This generates a .dat file in the given path that can then be played back at any time using the -playback mode.

-playback [path]
Play back a tournament from a saved .dat file.

-spectate [path] [name]
Start a spectator scoreboard.

-server [path] [port]
Start the challenge server. This server will run on the given port and accept submissions from the Eclipse plug-in. To stop the server, use Ctrl-C.

-scoreboard [path]
Start a scoreboard. This scoreboard will list the current score from any running tournament, which was started via the -test, -tournament, -testtournament, -playback, or -spectate modes.

Matches, Rounds, and Tournament

CodeRally allows any number of players to compete in a tournament. Each tournament consists of a given number of rounds, in which each player competes exactly once per round. In the first round, players are randomly grouped into matches containing six or less players per match. Each of these matches is run, so each player gets a chance to compete once.

For each successive round, the players are bracketed into matches according to their point values, and players with similar points play against each other. This continues for the number of rounds in the tournament, at which point winners are declared based on the total point values.

When there are a large number of players, manual elimination rounds can be used to speed up the tournament. In this case, a tournament is run for 3 rounds (for example) and then only the top half of the players proceed to the next elimination round. This next elimination round can be run as a separate tournament, so all players start with 0 points again and there is an even playing field.