SingleAgentEpisode API#
rllib.env.single_agent_episode.SingleAgentEpisode#
Constructor#
A class representing RL environment episodes for individual agents. |
|
Validates the episode's data. |
Getting basic information#
Returning the length of an episode. |
|
Calculates an episode's return, excluding the lookback buffer's rewards. |
|
Returns the duration of this Episode (chunk) in seconds. |
|
Whether the episode is actually done (terminated or truncated). |
|
True, if the data in this episode is already stored as numpy arrays. |
|
Returns the number of environment steps. |
Getting environment data#
Returns individual observations or batched ranges thereof from this episode. |
|
Returns individual info dicts or list (ranges) thereof from this episode. |
|
Returns individual actions or batched ranges thereof from this episode. |
|
Returns individual rewards or batched ranges thereof from this episode. |
|
Returns extra model outputs (under given key) from this episode. |
Adding data#
Adds the initial data (after an |
|
Adds results of an |
Creating and handling episode chunks#
Returns a successor episode chunk (of len=0) continuing from this Episode. |
|
Returns a slice of this episode with the given slice object. |
|
Adds the given |
|
Converts this Episode's list attributes to numpy arrays. |