Rollout#
- class enki_env.rollout.Rollout(observation: Observation, action: Action, reward: Array, termination: BoolArray, truncation: BoolArray, info: dict[str, MaskedArray], valid: BoolArray, robots: list[str])#
Bases:
objectHolds data collected during a rollout, like by
enki_env.ParallelEnkiEnv.rollout()andenki_env.EnkiEnv.rollout().- action: Action#
An array of shape
(#steps, #robots, *shape of actions)with the actions at each step for each robots. Validity in stored separately invalid.
- property episode_reward: float#
Returns the average (over robots) of cumulative (over steps) rewards.
- Returns:
The episode reward.
- property episode_success: BoolArray | None#
The final
info["is_success"]for each robot.- Returns:
An array of Booleans.
- info: dict[str, MaskedArray]#
A dictionary where the value is a masked array of shape
(#steps, #robots, *shape of info)aggregates all the information entries for the given key at each step for all robots. The array mask record which entries were present at a given time step for a given robot.
- property length: ndarray[tuple[Any, ...], dtype[int64]]#
The number of steps done by each robot.
- Returns:
An array of integers of length
#robots
- property masked_action: MaskedArray#
Returns the actions as masked array.
- Returns:
The actions.
- property masked_observation: dict[str, MaskedArray]#
Returns the observations as dictionary of masked array.
- Returns:
The observations.
- property masked_reward: MaskedArray#
Returns the rewards as masked array.
- Returns:
The rewards.
- observation: Observation#
A dictionary of arrays for each key in the observation space. Array have shape
(#steps, #robots, *shape of observation)with the value of the observation at each step for each robots. Validity in stored separately invalid.