simple_replay_buffer

Attributes

buffer

Classes

SimpleReplayBuffer

Module Contents

class simple_replay_buffer.SimpleReplayBuffer(capacity: int | None = None)[source]
capacity = None[source]
buffer[source]
store(state, action, reward, next_state, terminated, truncated)[source]

Store a transition in the buffer.

extend(replay_buffer: SimpleReplayBuffer)[source]

Extend the buffer with another buffer.

sample(batch_size: int = 1, sequential: bool = False)[source]

Sample a batch of experiences.

size()[source]

Return current buffer size.

clear()[source]

Clear the buffer.

__len__()[source]

Return the current buffer size.

pop(num_elements: int = 1)[source]

Pop elements from the buffer.

simple_replay_buffer.buffer[source]