sail-sg / envpool

C++-based high-performance parallel environment execution engine (vectorized env) for general RL environments.
https://envpool.readthedocs.io
Apache License 2.0
1.09k stars 100 forks source link

Why the breakout enviroment is the same with different seed?[BUG] #272

Closed Moirai7 closed 1 year ago

Moirai7 commented 1 year ago
import envpool, numpy, sys
print(envpool.__version__, numpy.__version__, sys.version, sys.platform)

0.8.2 1.21.6 3.7.10 | packaged by conda-forge | (default, Feb 19 2021, 16:07:37) [GCC 9.3.0] linux


I tried the bellowing code and found out the initial state of breakout enviroment is the same with different seed. I wonder why?

import envpool
import numpy as np
for s in [0,1,2,3,4]:
    env = envpool.make_gymnasium(
                'Breakout-v5',
                num_envs=1,
                seed=s*1000,
                episodic_life=False,
                reward_clip=False,
                stack_num=4,
            )
    observation, info = env.reset()
    print(observation)
    print(s, np.sum(observation))
Trinkle23897 commented 1 year ago

It's the same behavior if you try gym or atari-py