Note
Ray 2.40 uses RLlib’s new API stack by default. The Ray team has mostly completed transitioning algorithms, example scripts, and documentation to the new code base.
If you’re still using the old API stack, see New API stack migration guide for details on how to migrate.
MultiAgentEpisode API#
rllib.env.multi_agent_episode.MultiAgentEpisode#
Constructor#
Stores multi-agent episode data. |
|
Validates the episode's data. |
Getting basic information#
Returns the length of an |
|
Returns all-agent return. |
|
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. |
|
Number of agent steps. |
Multi-agent information#
Returns the ModuleID for a given AgentID. |
|
Returns a set of agent IDs required to send an action to |
|
Returns a set of agent IDs of those agents that just finished stepping. |
Getting environment data#
Returns agents' observations or batched ranges thereof from this episode. |
|
Returns agents' info dicts or list (ranges) thereof from this episode. |
|
Returns agents' actions or batched ranges thereof from this episode. |
|
Returns agents' rewards or batched ranges thereof from this episode. |
|
Returns agents' actions or batched ranges thereof from this episode. |
|
Gets the terminateds at given indices. |
|
Returns all temporarily stored data items (list) under the given key. |
Adding data#
Stores initial observation. |
|
Adds a timestep to the episode. |
|
Temporarily adds (until |
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. |