simoninithomas / Deep_reinforcement_learning_Course

Implementations from the free course Deep Reinforcement Learning with Tensorflow and PyTorch
http://www.simoninithomas.com/deep-rl-course
3.74k stars 1.23k forks source link

Deep Q-Learning, Spaceinvaders, retro-gym #31

Open Yaroina opened 5 years ago

Yaroina commented 5 years ago

Hi! I’m trying to run SpaceInvaders, but faced problem with:” Game not found: Did you make sure to import the ROM?”. Then I tried solution by MaximusWudy, with point and renaiming files to .a26 (as adviced at openai/retro). But when I try to run “python3 -m retro.import (…)” it always comes with error Importing 130863 potential games… Traceback (most recent call last): File “//anaconda/lib/python3.5/runpy.py”, line 184, in _run_module_as_main “main”, mod_spec) File “//anaconda/lib/python3.5/runpy.py”, line 85, in _run_code exec(code, run_globals) File “//anaconda/lib/python3.5/site-packages/retro/import/main.py”, line 4, in main() File “//anaconda/lib/python3.5/site-packages/retro/scripts/import_path.py”, line 18, in main retro.data.merge(*potential_roms, quiet=False) File “//anaconda/lib/python3.5/site-packages/retro/data/init.py”, line 404, in merge known_hashes[sha] = (game, ext, os.path.join(path(), curpath)) UnboundLocalError: local variable ‘ext’ referenced before assignment To be honest, I have no idea what to try next.

noobmaster29 commented 5 years ago

Here's my current solution:

  1. download this file: http://www.atarimania.com/rom_collection_archive_atari_2600_roms.html
  2. unzip and put the roms folder it in your working (notebook) folder
  3. After the first import cell: !python3 -m retro.import ./roms env = retro.make(game='SpaceInvaders-Atari2600')

It currently works for me.

Hope this helps :)

Forgot to add this reference: https://github.com/openai/retro/issues/53

LucasColas commented 4 years ago

How to import ROM on Google Colab ?