ray.rllib.env.multi_agent_episode.MultiAgentEpisode.concat_episode#

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

Adds the given other MultiAgentEpisode 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 of the individual agents 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 MultiAgentEpisode to be concatenated to this one.

Returns: A MultiAgentEpisode instance containing the concatenated data

from both episodes (self and other).