Simulator¶
- class Simulator(seed=None)¶
Bases:
objectAbstract base class for simulators.
- available_actions()¶
Returns an iterable over the available actions. The action mode may be used to select how actions are referred to.
- Returns:
- is_done()¶
Is the simulator in a sink state?
- Returns:
Yes, if the simulator is in a sink state.
- nr_available_actions()¶
Returns the number of available actions
- Returns:
- restart(state=None)¶
Reset the simulator to the initial state
- set_action_mode(mode)¶
Select the action mode, that is, how the actions are represented
- Parameters:
mode – SimulatorActionMode.INDEX_LEVEL or SimulatorActionMode.GLOBAL_NAMES
- Returns:
- set_full_observability(value)¶
Sets whether the full state space is observable. Default inherited from the model, but this method overrides the setting.
- Parameters:
value
- set_observation_mode(mode)¶
Select the observation mode, that is, how the states are represented
- Parameters:
mode – STATE_LEVEL or PROGRAM_LEVEL
- step(action=None)¶
Do a step taking the passed action.
- Parameters:
action – The index of the action, for deterministic actions, action may be None.
- Returns:
The observation (on state or program level).