UniformReplayBuffer

class maze.train.trainers.common.replay_buffer.uniform_replay_buffer.UniformReplayBuffer(buffer_size: int, seed: int)

Replay buffer for off policy learning.

Parameters

buffer_size – The maximum buffer size.

add_rollout(actor_rollout: Union[maze.core.trajectory_recording.records.trajectory_record.SpacesTrajectoryRecord, maze.core.trajectory_recording.records.structured_spaces_record.StructuredSpacesRecord, numpy.ndarray, List])None

(overrides BaseReplayBuffer)

implementation of BaseReplayBuffer

sample_batch(n_samples: int, learner_device: str) → List[Union[maze.core.trajectory_recording.records.structured_spaces_record.StructuredSpacesRecord, maze.core.trajectory_recording.records.trajectory_record.SpacesTrajectoryRecord]]

(overrides BaseReplayBuffer)

implementation of BaseReplayBuffer