ray.rllib.utils.replay_buffers.multi_agent_replay_buffer.MultiAgentReplayBuffer.add#

MultiAgentReplayBuffer.add(batch: SampleBatch | MultiAgentBatch | Dict[str, Any], **kwargs) None[source]#

Adds a batch to the appropriate policy’s replay buffer.

Turns the batch into a MultiAgentBatch of the DEFAULT_POLICY_ID if it is not a MultiAgentBatch. Subsequently, adds the individual policy batches to the storage.

Parameters:
  • batch – The batch to be added.

  • **kwargs – Forward compatibility kwargs.

DeveloperAPI: This API may change across minor Ray releases.