EpisodeData#

minari.EpisodeData#

class minari.EpisodeData(id: int, seed: int | None, total_timesteps: int, observations: np.ndarray, actions: np.ndarray, rewards: np.ndarray, terminations: np.ndarray, truncations: np.ndarray)[source]#

Contains the datasets data for a single episode.

This is the object returned by minari.MinariDataset.sample_episodes.

Create new instance of EpisodeData(id, seed, total_timesteps, observations, actions, rewards, terminations, truncations)

Attributes#

EpisodeData.id: int#

Alias for field number 0

The ID of the episode in the Minari dataset.

EpisodeData.seed: int | None#

Alias for field number 1

The seed used to reset this episode in the Gymnasium API.

EpisodeData.total_timesteps: int#

Alias for field number 2

The number of timesteps contained in this episode.

EpisodeData.observations: ndarray#

Alias for field number 3

The observations of the environment. The initial and final observations are included meaning that the number of observations will be increased by one compared to the number of timesteps

EpisodeData.actions: ndarray#

Alias for field number 4

The actions taken in each episode timestep.

EpisodeData.terminations: ndarray#

Alias for field number 6

The terminated value after each environment step.

EpisodeData.truncations: ndarray#

Alias for field number 7

The truncated value after each environment step.