--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 game
R- to restart the game with new random map
→- arrows to move the player
<SPACE>- to place the bomb
next_movemethod contained within your class which is called on each turn of the game and:
0: Player 1 (Wizard)
1: Player 2 (Knight)
ib: Metal Block (i.e. Indestructible Block)
sb: Wooden Block (i.e. Soft Block)
ob: Ore Block
t: Treasure Chest
bonly. To access the location of the player, use
'': Do nothing
l: Move left
r: Move right
u: Move up
d: Move down
p: Place a bomb
game_state(class object), has the following properties:
is_over(Boolean): whether the game has ended
tick_number(int): the number of turns that have passed. Each 'tick' corresponds to 100ms
size(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 map
ammo(list of tuples): list of the locations of all ammo currently on the map
treasure(list of tuples): list of the locations of all treasure currently on the map
all_blocks(list of tuples): list of the locations of all blocks (wooden, ore, metal) currently on the map
soft_blocks(list of tuples): list of the locations of all wooden blocks currently on the map
ore_blocks(list of tuples): list of the locations of all ore blocks currently on the map
indestructible_blocks(list of tuples): list of the locations of all indestructible metal blocks currently on the map
game_statealso 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:
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 map
is_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 tuples
player_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 has
hp(int): the amount of HP your player currently has
location(tuple): your agent's location on the map, represented as (x,y)
reward(int): the total score of your agent
power(int): the blast-radius of the bombs placed by the player (default: 2)
game_stateregardless 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_statewill be, versus what is actually happening.
uwas issued after tick
2, and will therefore be picked up by the Game in tick
game_stateyour Agent observes in tick
2will therefore show you what the Game looks like without
uhaving 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.jsonand store in the OS-specific configuration directory.
config.jsonlooks 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.