fix atari wrapper to be deterministic (#467)
This commit is contained in:
parent
b9eedc516e
commit
098d466467
@ -24,7 +24,7 @@ class NoopResetEnv(gym.Wrapper):
|
|||||||
|
|
||||||
def reset(self):
|
def reset(self):
|
||||||
self.env.reset()
|
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):
|
for _ in range(noops):
|
||||||
obs, _, done, _ = self.env.step(self.noop_action)
|
obs, _, done, _ = self.env.step(self.noop_action)
|
||||||
if done:
|
if done:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user