Tank Eaters Configuration File¶
Soar2D is a general framework that includes both Eaters and TankSoar. This document describes how to modify these environments using the configuration settings files.
Configuration Files¶
Soar2D configuration files are stored in the Soar2D folder. When running the soar2d jar, you may specify the configuration file to use on the command line, or run without specifying any and a dialog window will pop-up.
Configuration entries are of the format:
Use the pound sign for comments. Start them anywhere on a line.
Configuration keys have an optional hierarchy separated by dots or braces. These are equivalent:
Configuration values are strings or an array of strings using the following notation:
Most whitespace is stripped out of the configuration file. These lines are all equivalent:
Preserve spaces using quotes:
Don't split keys or values across lines:
Backslash doesn't escape anything (this is a change from the original behavior).
Code exists to easily pull out types boolean, string, int, double, or arrays of these types:
Defaults can be enforced in code:
Clients¶
Clients are encoded in a clients block using their names for their sub block.
Additionally, their names must be enumerated in an active_clients
array. For
example:
Note that there is a default, hidden client named "java-debugger". Don't use this name or put it in the active_clients list.
Path | Type | Values | Default | Comment |
---|---|---|---|---|
clients.active_clients | string array | Each active client. Clients not listed in this array but defined in this block are ignored. | ||
clients.''name''.command | string | Command to run from cwd | ||
clients.''name''.timeout | int | 0 | Seconds to wait for client to report in | |
clients.''name''.after | boolean | true | true: spawn after all agents are created, false: spawn before all agents are created |
eaters¶
Path | Type | Values | Default | Comment |
---|---|---|---|---|
eaters.vision | int | number of cells | 2 | How far can the eater see? |
eaters.wall_penalty | int | points (negative) | -5 | Penalty for running in to walls |
eaters.jump_penalty | int | points (negative) | -5 | Penalty for executing a jump |
eaters.low_probability | double | probability | 0.25 | Used during random map generation |
eaters.high_probability | double | probability | 0.75 | Used during random map generation |
general¶
Path | Type | Values | Default | Comment |
---|---|---|---|---|
general.cycle_time_slice | double | 50 | How much simulation time passes per tick (ms) | |
general.default_points | int | 0 | Starting points | |
general.game | string | tanksoar, eaters, room, kitchen, taxi | What game | |
general.map | string | path | Path to map file | |
general.headless | boolean | false | Run headless | |
general.preferences_file | string | "preferences" | Path to preferences file (used for common settings to preserve across runs such as last productions, window location). | |
general.runs | int | 1 | How many back-to-back runs to execute | |
general.seed | int | null (random default) | Seed Java and SML | |
general.force_human | boolean | false | Force human input, overrides agent input. Great for debugging input link. |
soar¶
Path | Type | Values | Default | Comment |
---|---|---|---|---|
soar.max_memory_usage | int | bytes | kernel default | Call command max-memory-usage |
soar.port | int | valid TCP ports | 12121 | Connect/listen on this port |
soar.remote | string | IP address | null | Connect to a remote kernel at this IP |
soar.spawn_debuggers | boolean | true | Spawn debuggers on agent creation | |
soar.soar_print | boolean | false | Log print events to file |
players¶
Players are encoded in a players block using arbitrary identifiers for their sub
blocks. Active player IDs must be enumerated in an active_players
array. For
example, the following configuration file defines 3 players but only uses two of
them for the run:
Do not id players with the prefix "gui" or "clone", the players created at runtime use those.
Path | Type | Values | Default | Comment |
---|---|---|---|---|
players.''id''.name | string | color | Agent name | |
players.''id''.productions | string | null (human) | Productions | |
players.''id''.script | string | null (human) | Do not use (yet), for testing | |
players.''id''.color | string | red, blue, yellow, purple, orange, green, black | random | desired color |
players.''id''.pos | int array | random | Starting x,y coordinate (int array, length 2) | |
players.''id''.facing | string | north, south, east, west | random | Starting facing direction, cardinal |
players.''id''.points | int | 0 | Starting points | |
players.''id''.energy | int | game default | Starting energy (tanksoar) | |
players.''id''.health | int | game default | Starting health (tanksoar) | |
players.''id''.missiles | int | game default | Starting missiles (tanksoar) | |
players.''id''.shutdown_commands | string array | valid Soar commands | null | Commands to run before destroying agent |
room¶
There are currently no configuration options for the Room environment.
taxi¶
Path | Type | Values | Default | Comment |
---|---|---|---|---|
taxi.disable_fuel | boolean | false | If disabled, ignore effects of fuel | |
taxi.fuel_starting_minimum | int | 5 | Fuel starts between this and maximum | |
taxi.fuel_starting_maximum | int | 12 | Fuel starts between this and minimum | |
taxi.fuel_maximum | int | 14 | Fuel goes to here when refueled |
tanksoar¶
Path | Type | Values | Default | Comment |
---|---|---|---|---|
tanksoar.max_missiles | 15 | Maximum missile count | ||
tanksoar.max_energy | 1000 | Maximum energy count | ||
tanksoar.max_health | 1000 | Maximum health count | ||
tanksoar.collision_penalty | -100 | Penalty for colliding with another tank or wall | ||
tanksoar.max_missile_packs | 3 | Maximum number of missile packs to spawn at a time | ||
tanksoar.missile_pack_respawn_chance | 5 | Chance per turn that a missile pack spawns when below max | ||
tanksoar.shield_energy_usage | -20 | Energy usage per turn that shields are on | ||
tanksoar.missile_hit_award | 2 | Points awarded when your missile connects with a tank | ||
tanksoar.missile_hit_penalty | -1 | Points lost when hit by a missile | ||
tanksoar.frag_award | 3 | Points awarded when your missile frags a tank | ||
tanksoar.frag_penalty | -2 | Points lost when fragged by a missile | ||
tanksoar.max_sound_distance | 7 | Maximum distance for the sound sensor | ||
tanksoar.missile_reset_threshold | 100 | Max amount of updates that can pass without a missile firing before resetting the map |
terminals¶
Path | Type | Values | Default | Comment |
---|---|---|---|---|
terminals.max_updates | int | 0 | World cycle count limit | |
terminals.agent_command | boolean | false | Agent issues stop command (input-link, not stop-soar) | |
terminals.points_remaining | boolean | false | No more points available on map | |
terminals.winning_score | int | 0 | At least one agent has at least this many points | |
terminals.food_remaining | boolean | false | There is no more food on the map (eaters) | |
terminals.unopened_boxes | boolean | false | There are no unopened boxes on the map (eaters) | |
terminals.fuel_remaining | boolean | false | Run out of fuel (taxi) | |
terminals.passenger_delivered | boolean | false | Passenger successfully delivered (taxi) | |
terminals.passenger_pick_up | boolean | false | Passenger removed from map (taxi) |
Logging¶
http://logging.apache.org/log4j/1.2/index.html
Map Files¶
Maps are now stored in the config/maps/game folder where game is the game type, such as eaters.
Map file¶
objects_file (string)
- This file defines objects in the world, see Object File below. The path is relative to the map file.
objects (string array)
- This is an array of objects ids that are available for use on the map. Often time these ids are one character so the map is easily human-readable.
cells (block)
- This sub-block defines the cells in the map, or properties about the cells that will be randomly generated.
cells.size (int)
- Width and height of map.
cells.random_walls (boolean)
- Randomly generate the walls on this map.
cells.random_food (boolean)
- Randomly place food on the map.
cells.rows (block)
- Cell instances
cells.rows.INTEGER (string array)
- The rows the map, from 0 to size - 1, represented as an array of strings. The strings maps to object ids. Separate multiple objects with dashes. Use a single dash for an empty cell.
Objects File¶
Objects are under an objects sub-block, and then an id block where the name of the block is their id used in the human-readable map file. Objects need a name property, which is how they are referred to in the code and logs. The rest of the properties are mostly domain specific.