Farama-Foundation / Arcade-Learning-Environment

The Arcade Learning Environment (ALE) -- a platform for AI research.
GNU General Public License v2.0
2.1k stars 416 forks source link

`obs_type="ram"` returns constant #534

Open pseudo-rnd-thoughts opened 2 weeks ago

pseudo-rnd-thoughts commented 2 weeks ago
import numpy as np
import gymnasium as gym
import ale_py

gym.register_envs(ale_py)

# env = gym.make( "ALE/Breakout-v5", obs_type="ram", render_mode="human")
env = gym.make( "ALE/MsPacman-v5", obs_type="ram", render_mode="human")

obs, _ = env.reset()
for step in range(100):
    action = env.action_space.sample()
    observation, reward, terminated, truncated, info = env.step(action)
    print(observation)
    print(step, action, observation.shape, np.unique(observation))

env.close()

Using obs_type="ram" means that the observation elements are constant. This implies that the obs_type is bugged, most likely occurring during the update to 0.9.0

pseudo-rnd-thoughts commented 1 week ago

The problem is due to NumPy 2.0 for some reason, unclear why currently