mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-07-28 20:11:31 +00:00
docstring
This commit is contained in:
parent
0879a8712f
commit
f087d3302b
1 changed files with 17 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue