--headless
- run the game without graphics. Tournament matches will be run in this mode.--interactive
- game is created with an extra player for the interactive user. This player can be controlled using the keyboard.--watch
- automatically reload the user's agent if the source code files changes. This allows for interactive development as code can be edited while the game is running.--record <FILE>
- record game action into a specified file for later review.Enter
- to pause / un-pause the gameR
- to restart the game with new random map↑
/ ↓
/ ←
/ →
- arrows to move the player<SPACE>
- to place the bombAgent
.next_move
method contained within your class which is called on each turn of the game and:game_state
and player_state
)0
: Player 1 (Wizard)1
: Player 2 (Knight)ib
: Metal Block (i.e. Indestructible Block)sb
: Wooden Block (i.e. Soft Block)ob
: Ore Blockb
: Bomba
: Ammot
: Treasure Chestb
only. To access the location of the player, use player_state.location
.''
: Do nothingl
: Move left r
: Move right u
: Move up d
: Move down p
: Place a bomb game_state
and player_state
game_state
(class object), has the following properties:is_over
(Boolean): whether the game has endedtick_number
(int): the number of turns that have passed. Each 'tick' corresponds to 100mssize
(tuple): the size of the game map, represented as (x,y) - (x = columns, y = rows)bombs
(list of tuples): list of the locations of all bombs currently on the mapammo
(list of tuples): list of the locations of all ammo currently on the maptreasure
(list of tuples): list of the locations of all treasure currently on the mapall_blocks
(list of tuples): list of the locations of all blocks (wooden, ore, metal) currently on the mapsoft_blocks
(list of tuples): list of the locations of all wooden blocks currently on the mapore_blocks
(list of tuples): list of the locations of all ore blocks currently on the mapindestructible_blocks
(list of tuples): list of the locations of all indestructible metal blocks currently on the mapgame_state
also provides the following methods:entity_at(location)
: takes an input location as an (x,y) tuple and returns the tag of the entity/object at that location:0
or 1
)None
if emptysb
, ob
, a
, etc).is_in_bounds(location)
: takes an input location as an (x,y) tuple and returns True or False (Boolean) depending on whether that location is within the boundaries of the game mapis_occupied(location)
: takes an input location as an (x,y) tuple and returns True or False (Boolean) depending on whether that location is occupied (i.e. contains ammo, block, players etc.)opponents(excluding_player_pid)
: takes an Agent ID as an integer and returns the current location of the opponent players as a list of tuplesplayer_state
(class object), with the following properties:id
(int): your agent's player number (i.e. Player 1 = 0
, Player 2 = 1
, and so on)ammo
(int): the amount of ammo your player currently hashp
(int): the amount of HP your player currently haslocation
(tuple): your agent's location on the map, represented as (x,y)reward
(int): the total score of your agentpower
(int): the blast-radius of the bombs placed by the player (default: 2)game_state
regardless of whether your Agent has returned its action or not within that time (i.e. it will not wait for your Agent). If your Agent takes more than 100ms to return its move, its action will be picked up on the next tick. This can therefore lead to an asynchronous situation between what your Agent thinks the current game_state
will be, versus what is actually happening.u
was issued after tick 2
, and will therefore be picked up by the Game in tick 3
. The game_state
your Agent observes in tick 2
will therefore show you what the Game looks like without u
having been executed yet. This is a limitation of how the game environment is set up to enable the game to progress without being stalled by any Agent in play.config.json
and store in the OS-specific configuration directory.config.json
looks like this:max_iterations
) or game update time step (tick_step
). However, these options are fixed in the tournament and can not be modified so please ensure your Agent works correctly with the default values.