ray.rllib.utils.replay_buffers.multi_agent_prioritized_replay_buffer.MultiAgentPrioritizedReplayBuffer#

class ray.rllib.utils.replay_buffers.multi_agent_prioritized_replay_buffer.MultiAgentPrioritizedReplayBuffer(capacity: int = 10000, storage_unit: str = 'timesteps', num_shards: int = 1, replay_mode: str = 'independent', replay_sequence_override: bool = True, replay_sequence_length: int = 1, replay_burn_in: int = 0, replay_zero_init_states: bool = True, underlying_buffer_config: dict = None, prioritized_replay_alpha: float = 0.6, prioritized_replay_beta: float = 0.4, prioritized_replay_eps: float = 1e-06, **kwargs)[source]#

Bases: MultiAgentReplayBuffer, PrioritizedReplayBuffer

A prioritized replay buffer shard for multiagent setups.

This buffer is meant to be run in parallel to distribute experiences across num_shards shards. Unlike simpler buffers, it holds a set of buffers - one for each policy ID.

DeveloperAPI: This API may change across minor Ray releases.

Methods

__init__

Initializes a MultiAgentReplayBuffer instance.

add

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

apply

Calls the given function with this Actor instance.

get_host

Returns the computer's network name.

get_state

Returns all local state.

ping

Ping the actor.

replay

DeveloperAPI: This API may change across minor Ray releases.

sample

Samples a MultiAgentBatch of num_items per one policy's buffer.

set_state

Restores all local state to the provided state.

stats

Returns the stats of this buffer and all underlying buffers.

update_priorities

Updates the priorities of underlying replay buffers.