Trees judge user guide
======================

The judge can be used to test bots locally. You need Java 8 to run it. You can run it using `java -jar trees-*.jar`. The configuration is all contained in `trees.properties`. You can also specify a different configuration file as the first argument (e.g. `java -jar trees-*.jar some-other-config.properties`).

Configuration
-------------
The `trees.properties` contains key/value pairs in the format `key=value`. The following values can be configured:

### Map Generation
- `map.file`: Path to a file containing a map created using the map editor from the visualization. If empty, a map will be generated using the specified parameters explained below.
- `map.generator`: Algorithm for generating the map. See the comment in the included `trees.properties` for available values. Map generation can further be configured, but not all of the algorithms support all configurations. If not supported the value is ignored.
- `map.generator`: Algorithm for assigning start nodes. See the comment in the included `trees.properties` for available values.
- `map.fertility`: Algorithm for assigning fertility values. See the comment in the included `trees.properties` for available values.
- `map.attractiveness`: Algorithm for assigning attractiveness values. See the comment in the included `trees.properties` for available values.
- `map.seed`: Seed used in the Rng when generating the map. The same seed will always lead to the same map.

### Log output
There are different log streams which output different information. For each log stream you can specify where it should be printed to by setting `log.<stream>` to the desired value:
- `stdout`: Print to the console.
- `none`: Do not print this stream.
- `<filename>`: Print to the specified file. Note that multiple log streams can not write to the same file.

The available log streams are:
- `debug`: Debug information about game simulation.
- `rule_breaking`: Information about when a bot did not follow rules or made something which does not make sense (e.g. plant on an already owned node).
- `process_error`: Output of stderr of the bot. Useful to debug your bot.
- `external_debug`: The complete communication between the judge and the bots.
- `graph_viz`: The game map in a format which can be used with graphviz. Works best with the `neato` layout engine.
- `game`: The game log which details all the actions. This output can be uploaded for visualization.

### Players
For both players (`player1.`/`player2.`) you can specify the following values:
- `name`: Name displayed in the visualization.
- `command`: Command to run for this bot. For compiled binaries this is the path to the binary, for e.g. Python this would be `python path/to/bot.py`.
