hill-a / stable-baselines

A fork of OpenAI Baselines, implementations of reinforcement learning algorithms
http://stable-baselines.readthedocs.io/
MIT License
4.09k stars 728 forks source link

Breakout environment doesn't exist. #1123

Closed Michi-123 closed 3 years ago

Michi-123 commented 3 years ago

Breakout env doesn't exist on Google colab.

env = make_atari_env('BreakoutNoFrameskip-v4', num_env=16, seed=0)

Executed above code, the following error occurs. What should I do? I need your help. Thank you.

Exception                                 Traceback (most recent call last)
 in ()
      1 # There already exists an environment generator that will make and wrap atari environments correctly.
      2 # We use 16 parallel processes
----> 3 env = make_atari_env('BreakoutNoFrameskip-v4', num_env=16, seed=0)
      4 # Stack 4 frames
      5 env = VecFrameStack(env, n_stack=4)

9 frames
/usr/local/lib/python3.7/dist-packages/atari_py/games.py in get_game_path(game_name)
     18     path = os.path.join(_games_dir, game_name) + ".bin"
     19     if not os.path.exists(path):
---> 20         raise Exception('ROM is missing for %s, see https://github.com/openai/atari-py#roms for instructions' % (game_name,))
     21     return path
     22 

Exception: ROM is missing for breakout, see https://github.com/openai/atari-py#roms for instructions
araffin commented 3 years ago

Hello, The issue comes from atari-py, you need to install atari-py==0.2.5

See https://github.com/openai/atari-py/pull/79

Michi-123 commented 3 years ago

It works! Thank you very much.

KabhiCodeKabhiFork commented 6 months ago

I am getting this error on google colab

env = gym.make('Breakout-v4')

the error associated is


NameNotFound                              Traceback (most recent call last)
[<ipython-input-16-9bff2d9ca04b>](https://cbidt6dpo6f-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20240110-060149_RC00_597200367#) in <cell line: 10>()
      8 batch_size = 5
      9 max_episode_length = 1000
---> 10 env = gym.make('Breakout-v4')
     11 num_actions = env.action_space.n
     12 solved = False

2 frames
[/usr/local/lib/python3.10/dist-packages/gym/envs/registration.py](https://cbidt6dpo6f-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab_20240110-060149_RC00_597200367#) in _check_name_exists(ns, name)
    210     suggestion_msg = f"Did you mean: `{suggestion[0]}`?" if suggestion else ""
    211 
--> 212     raise error.NameNotFound(
    213         f"Environment {name} doesn't exist{namespace_msg}. {suggestion_msg}"
    214     )

NameNotFound: Environment Breakout doesn't exist.```