yawning_titan.agents.keyboard#

Classes

KeyboardAgent

A means for a human player to play the YAWNING-TITAN simulation.

class yawning_titan.agents.keyboard.KeyboardAgent(env)[source]#

A means for a human player to play the YAWNING-TITAN simulation.

The keyboard agent provides a basic means for a human player to play the YAWNING-TITAN simulation.

An example of using this class can be found within the notebooks/Creating and playing as a Keyboard Agent.ipynb

__init__(env)[source]#
get_move_set()[source]#

Return the action set mapped to action numbers.

Get the action set for the given environment and map it to the action numbers used by the open AI gym env.

Returns:

An action mask for top level actions to the first action number in the environment. A full dictionary of all the actions that can be taken. The action number where the standard actions start (actions that can be applied to every node). The number of standard actions

play(render_graphically=True)[source]#

Play the game as a keyboard agent.

Allows the user to select an action using the console and displays the effect of the action on the environment.

Parameters:

render_graphically – If True render using the matplotlib renderer, if False display if state of the environment in the console.