Exception: ROM is missing for breakout

        python强化学习时可能会遇到环境模拟的异常

        env = gym.envs.make("Breakout-v0")

Exception                                 Traceback (most recent call last)
<ipython-input-3-7584539d0f0c> in <module>
----> 1 env = gym.envs.make("Breakout-v0")

~/miniconda3/envs/lwhao-rl/lib/python3.9/site-packages/gym/envs/registration.py in make(id, **kwargs)
    143 
    144 def make(id, **kwargs):
--> 145     return registry.make(id, **kwargs)
    146 
    147 def spec(id):

~/miniconda3/envs/lwhao-rl/lib/python3.9/site-packages/gym/envs/registration.py in make(self, path, **kwargs)
     88             logger.info('Making new env: %s', path)
     89         spec = self.spec(path)
---> 90         env = spec.make(**kwargs)
     91         # We used to have people override _reset/_step rather than
     92         # reset/step. Set _gym_disable_underscore_compat = True on

~/miniconda3/envs/lwhao-rl/lib/python3.9/site-packages/gym/envs/registration.py in make(self, **kwargs)
     58         else:
     59             cls = load(self.entry_point)
---> 60             env = cls(**_kwargs)
     61 
     62         # Make the environment aware of which spec it came from.

~/miniconda3/envs/lwhao-rl/lib/python3.9/site-packages/gym/envs/atari/atari_env.py in __init__(self, game, mode, difficulty, obs_type, frameskip, repeat_action_probability, full_action_space)
     47 
     48         self.game = game
---> 49         self.game_path = atari_py.get_game_path(game)
     50         self.game_mode = mode
     51         self.game_difficulty = difficulty

~/miniconda3/envs/lwhao-rl/lib/python3.9/site-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 

        通过以下地址,下载Roms.rar

        http://www.atarimania.com/rom_collection_archive_atari_2600_roms.html

        将Roms.rar解压缩以后,运行命令,即可解决。

python -m atari_py.import_roms <path to folder>

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值