Get action: action object
On its turn, the bot will need to perform an action.
Action Object
is the output of the bot's Get Action
function. The Action Object
has two fields: action
and params
. The params
are the parameters needed to perform the action.
Examples
Tic-Tac-Toe
A player can make only one type of action in this game: place a piece in one of the 9 squares. The action object will look something like
When the bot Get Action
function returns the above object, the game server will attempt to place a piece at index 3 for the player_turn_idx
that is making the move.
Battleship
A player can make two types of actions in this game: placing ships
and firing shots
. During the PLACE_SHIP
phase, the action object should look like
During the FIRE_SHOT
phase, the action object should look like
Passing a turn
The bot must return an action during its turn. If the function returns null
or fails to return an object, it will be forfeit the game. For games where it is valid to pass a turn, the action schema should include an explicit action to do so. The action object for this might look like
Last updated