ActionRecord¶
-
class
maze.core.trajectory_recording.records.action_record.
ActionRecord
(seed: int)¶ Action record holding either maze_action objects of agent actions for later deterministic (seeded) replays.
- Parameters
seed – The seed identifying the respective deterministic episode for the action record.
-
clip
(max_items: int) → None¶ Clip action record to maximum length.
- Parameters
max_items – Maximum number of items in action record.
-
dump
(dump_file: str) → None¶ Dump action record to file.
- Parameters
dump_file – absolute file path to pickle dump file.
-
get_agent_action
(step: int, actor_id: maze.core.env.structured_env.ActorID) → Dict[str, Union[int, numpy.ndarray]]¶ Request agent action item for specific step.
- Parameters
step – The requested time step.
actor_id – ID of the actor to query the action for.
- Returns
The action item.
-
get_maze_action
(step: int) → Any¶ Request maze action item for specific step.
- Parameters
step – The requested time step.
- Returns
The maze action item.
-
classmethod
load
(dump_file: str) → maze.core.trajectory_recording.records.action_record.ActionRecord¶ Load existing action record from file.
- Parameters
dump_file – Path to dumped action record.
- Returns
Loaded action record.
-
set_agent_action
(step: int, actor_id: maze.core.env.structured_env.ActorID, action: Dict[str, Union[int, numpy.ndarray]]) → None¶ Add action item for specified step.
- Parameters
step – The respective time step.
actor_id – ID of the actor to record the action for.
action – The respective agent action.