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: Optional[dict] = None, prioritized_replay_alpha: float = 0.6, prioritized_replay_beta: float = 0.4, prioritized_replay_eps: float = 1e-06, **kwargs)[source]#

Bases: ray.rllib.utils.replay_buffers.multi_agent_replay_buffer.MultiAgentReplayBuffer, ray.rllib.utils.replay_buffers.prioritized_replay_buffer.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__([capacity, storage_unit, ...])

Initializes a MultiAgentReplayBuffer instance.

add(batch, **kwargs)

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

apply(func, *args, **kwargs)

Calls the given function with this rollout worker instance.

get_host()

Returns the computer's network name.

get_state()

Returns all local state.

ping()

Ping the actor.

replay(**kwargs)

DeveloperAPI: This API may change across minor Ray releases.

sample(num_items[, policy_id])

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

set_state(state)

Restores all local state to the provided state.

stats([debug])

Returns the stats of this buffer and all underlying buffers.

update_priorities(prio_dict)

Updates the priorities of underlying replay buffers.