Closed haneenhassen closed 3 months ago
This is because an ImageTranspose
wrapper has been used by default in rllte.
You can refer to https://github.com/vwxyzjn/cleanrl/blob/master/cleanrl/ppo_atari.py to use a proper Atari wrapper.
And you need to use (4, 84, 84), i.e., channel first, for rllte's intrinsic reward modules.
thanks
When executing the following code: python
from stable_baselines3.common.env_util import make_vec_env, make_atari_env from stable_baselines3.common.vec_env import VecFrameStack
envs = make_atari_env("MontezumaRevenge-v4") envs = VecFrameStack(envs, n_stack=4)
print(envs.observation_space, envs.action_space)
the output is:
Box(0, 255, (84, 84, 4), uint8) Discrete(18)
This indicates that the observation space is a Box with shape (84, 84, 4).
In contrast, when executing this code: python
from rllte.env import make_atari_env
envs = make_atari_env("MontezumaRevenge-v5") print(envs.observation_space, envs.action_space)
the output is:
Box(0, 255, (4, 84, 84), uint8) Discrete(18)
Here, the observation space has been transformed to a Box with shape (4, 84, 84).