First of all: Thank you for writing this nice wrapper! :)
I wanted to use the AtariEnv for evaluation and I realized that the seed method is not working.
I am not sure whether this is a bug or should be that way
from d4rl_atari.envs import AtariEnv
import numpy as np
env0 = AtariEnv("Pong", stack=True)
env0.seed(0)
env1 = AtariEnv("Pong", stack=True)
env1.seed(0)
env0.reset()
env1.reset()
for i in range(10):
a = env0.action_space.sample()
s0, *_ = env0.step(a)
s1, *_ = env1.step(a)
np.equal(np.array(s0), np.array(s1)).all()
The following code works:
from d4rl_atari.envs import AtariEnv
import numpy as np
env0 = AtariEnv("Pong", stack=True)
env0._env.seed(0)
env1 = AtariEnv("Pong", stack=True)
env1._env.seed(0)
env0.reset()
env1.reset()
for i in range(10):
a = env0.action_space.sample()
s0, *_ = env0.step(a)
s1, *_ = env1.step(a)
np.equal(np.array(s0), np.array(s1)).all()
First of all: Thank you for writing this nice wrapper! :)
I wanted to use the AtariEnv for evaluation and I realized that the seed method is not working. I am not sure whether this is a bug or should be that way
The following code works: