ray.rllib.utils.replay_buffers.prioritized_replay_buffer.PrioritizedReplayBuffer
ray.rllib.utils.replay_buffers.prioritized_replay_buffer.PrioritizedReplayBuffer#
- class ray.rllib.utils.replay_buffers.prioritized_replay_buffer.PrioritizedReplayBuffer(capacity: int = 10000, storage_unit: str = 'timesteps', alpha: float = 1.0, **kwargs)[source]#
Bases:
ray.rllib.utils.replay_buffers.replay_buffer.ReplayBufferThis buffer implements Prioritized Experience Replay.
The algorithm has been described by Tom Schaul et. al. in “Prioritized Experience Replay”. See https://arxiv.org/pdf/1511.05952.pdf for the full paper.
DeveloperAPI: This API may change across minor Ray releases.
Methods
__init__([capacity, storage_unit, alpha])Initializes a PrioritizedReplayBuffer instance.
add(batch, **kwargs)Adds a batch of experiences or other data to this buffer.
apply(func, *args, **kwargs)Calls the given function with this rollout worker instance.
get_host()Returns the computer's network name.
Returns all local state.
ping()Ping the actor.
sample(num_items, beta, **kwargs)Sample
num_itemsitems from this buffer, including prio.set_state(state)Restores all local state to the provided
state.stats([debug])Returns the stats of this buffer.
update_priorities(idxes, priorities)Update priorities of items at given indices.