- class torchrl.envs.transforms.NoopResetEnv(noops: int = 30, random: bool = True)¶
Runs a series of random actions when an environment is reset.
env (EnvBase) – env on which the random actions have to be performed. Can be the same env as the one provided to the TransformedEnv class
noops (int, optional) – upper-bound on the number of actions performed after reset. Default is 30. If noops is too high such that it results in the env being done or truncated before the all the noops are applied, in multiple trials, the transform raises a RuntimeError.
random (bool, optional) – if False, the number of random ops will always be equal to the noops value. If True, the number of random actions will be randomly selected between 0 and noops. Default is True.
- reset(tensordict: TensorDictBase) TensorDictBase ¶
Do no-op action for a number of steps in [1, noop_max].