fix atari wrapper to be deterministic (#467)

This commit is contained in:
Jiayi Weng 2021-10-19 10:26:11 -04:00 committed by GitHub
parent b9eedc516e
commit 098d466467
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ class NoopResetEnv(gym.Wrapper):
def reset(self):
self.env.reset()
noops = np.random.randint(1, self.noop_max + 1)
noops = self.unwrapped.np_random.randint(1, self.noop_max + 1)
for _ in range(noops):
obs, _, done, _ = self.env.step(self.noop_action)
if done: