From f087d3302b348ebc485a96521356fdd4a7c01057 Mon Sep 17 00:00:00 2001 From: Stelios Tymvios Date: Sat, 11 Jul 2020 21:24:24 +0300 Subject: [PATCH] docstring --- stable_baselines3/common/buffers.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/stable_baselines3/common/buffers.py b/stable_baselines3/common/buffers.py index 68c449b..26a8a49 100644 --- a/stable_baselines3/common/buffers.py +++ b/stable_baselines3/common/buffers.py @@ -396,6 +396,23 @@ class RolloutBuffer(BaseBuffer): class NstepReplayBuffer(ReplayBuffer): + """ + Replay Buffer that computes N-step returns. + + :param buffer_size: (int) Max number of element in the buffer + :param observation_space: (spaces.Space) Observation space + :param action_space: (spaces.Space) Action space + :param device: (Union[th.device, str]) PyTorch device + to which the values will be converted + :param n_envs: (int) Number of parallel environments + :param optimize_memory_usage: (bool) Enable a memory efficient variant + of the replay buffer which reduces by almost a factor two the memory used, + at a cost of more complexity. + See https://github.com/DLR-RM/stable-baselines3/issues/37#issuecomment-637501195 + and https://github.com/DLR-RM/stable-baselines3/pull/28#issuecomment-637559274 + :param n_step: (int) The number of transitions to consider when computing n-step returns + :param gamma: (float) The discount factor for future rewards. + """ def __init__( self, buffer_size: int,