ray.rllib.env.single_agent_episode.SingleAgentEpisode.concat_episode#

SingleAgentEpisode.concat_episode(other: SingleAgentEpisode) None[source]#

Adds the given other SingleAgentEpisode to the right side of self.

In order for this to work, both chunks (self and other) must fit together. This is checked by the IDs (must be identical), the time step counters (self.env_t must be the same as episode_chunk.env_t_started), as well as the observations/infos at the concatenation boundaries. Also, self.is_done must not be True, meaning self.is_terminated and self.is_truncated are both False.

Parameters:

other – The other SingleAgentEpisode to be concatenated to this one.

Returns: A SingleAgentEpisode instance containing the concatenated data

from both episodes (self and other).