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
andother
) must fit together. This is checked by the IDs (must be identical), the time step counters (self.env_t
must be the same asepisode_chunk.env_t_started
), as well as the observations/infos at the concatenation boundaries. Also,self.is_done
must not be True, meaningself.is_terminated
andself.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
andother
).