Giter VIP home page Giter VIP logo

Comments (35)

MaximusWudy avatar MaximusWudy commented on September 26, 2024 54

Thank you very much! It amazingly worked. And for more people who have the same issue. Here is a detailed tutorial:

  1. Download zip file from http://www.atarimania.com/rom_collection_archive_atari_2600_roms.html
  2. Open Roms.rar > ROMS.rar and find Space Invaders (1980) XXXXXX
  3. Extract all matches (there are 5 of them) into your destin folder
  4. python -m retro.import . (don't forget the point)
  5. One of them worked! And continue with the amazing tutorial here: https://github.com/simoninithomas/Deep_reinforcement_learning_Course/blob/master/DQN/Space%20Invaders/DQN%20Atari%20Space%20Invaders.ipynb

from retro.

HemaZ avatar HemaZ commented on September 26, 2024 23

For Google Colab Notebooks do the following.

! wget http://www.atarimania.com/roms/Roms.rar && unrar x Roms.rar && unzip Roms/ROMS.zip
! pip3 install gym-retro
! python3 -m retro.import ROMS/

from retro.

simoninithomas avatar simoninithomas commented on September 26, 2024 21

Hello @MaximusWudy , thanks for your message ๐Ÿ˜Š

Effectively, you need to import the roms.

I found the roms here http://www.atarimania.com/rom_collection_archive_atari_2600_roms.html, by the way you will not need to rename the files.๏ปฟ

You just need to go to the folder were you unzipped your roms and write python -m retro.import . (don't forget the point)

Then, when the roms are imported you will be able to use Atari Space invaders (restart you jupyter notebook).

If you have other questions feel free to ask!

Have a great day,

from retro.

alexeytopolnitskiy avatar alexeytopolnitskiy commented on September 26, 2024 7

For those who struggle to use it in colab:

  1. !wget http://www.atarimania.com/roms/Roms.rar
    Make sure that Roms.rar appeared in files
  2. !unrar x /content/Roms.rar
    There are must be 2 zip archives: ROMS.zip and HC ROMS.zip
  3. !unzip /content/ROMS.zip
    ROMS folder must appear
  4. !pip install gym-retro
    Install retro package
  5. !python3 -m retro.import ROMS/
    Import environments
  6. env = retro.make(game="SpaceInvaders-Atari2600")
    Create environment!

ะกะฝะธะผะพะบ ัะบั€ะฐะฝะฐ 2020-10-31 ะฒ 23 10 44

from retro.

MaximusWudy avatar MaximusWudy commented on September 26, 2024 4

Hi Thomas,

      It's amazing that I am studying your tutorial right now and encounter the same problem! Could you please be more specific about which ROM is a good version. Or could you please attach the ROM file into your github folder?

     I really appreciate your tutorial and look forward to more in the future. Thank you!

Maximus

from retro.

bbartling avatar bbartling commented on September 26, 2024 4

Ok I see now what someone else was attempting to state above in the posts with a .

I added this into my terminal command python -m retro.import . and now I can see a
Importing 4 potential games, imported 0 games

And I still have the same error trying to run Thomas's code :( Any ideas? Thank you...

from retro.

simoninithomas avatar simoninithomas commented on September 26, 2024 3

I found why ๐ŸŽ‰. it's because you need the good version of the rom, however with Atari 2600 you have tons of different versions (PAL, NTSC, Hack, Non hack) etc.

** If you have the same problem, be sure to download the good version of the rom ๐Ÿ˜„**

I close the issue

from retro.

angeldroth avatar angeldroth commented on September 26, 2024 2

@RinshannKaihou for me, the solution was using the 1983 space invaders version: "Space Invaders (1983) (CCE) (C-820).bin" NOT any of the 1980 versions. If you copy all 5 space invader titles it reads:

Importing 5 potential games...
Importing SpaceInvaders-Atari2600
Imported 1 games

from retro.

samiulextreem avatar samiulextreem commented on September 26, 2024 1

you guys need to specify the path you put your files.then run the terminal command.for me it is like python -m retro.import C:\Users\GHOST\Documents\AI_tensorflow\Lib\site-packages\gym_retro-0.6.0.dist-info

hope this helps

from retro.

iamycee avatar iamycee commented on September 26, 2024 1

@simoninithomas Can't we just use gym?
import gym
env = gym.make('SpaceInvaders-v0')

Is there a difference in the gym-retro and gym environments?

from retro.

endrift avatar endrift commented on September 26, 2024 1

There is no license. I'm pretty sure it's copyright infringement to download and distribute them. However, for a good many of them there isn't a real risk due to the IP being old enough that no one really cares or they're in limbo. For newer games it's rougher, which is why when I made the Retro Contest, I promoted the use of ROMs you could buy on Steam without legal concerns.

from retro.

Urinx avatar Urinx commented on September 26, 2024

Thanks @MaximusWudy , I am also studying simoninithomas's tutorial and search for the Atari game rom and finally find this.

from retro.

seshuthota avatar seshuthota commented on September 26, 2024

Hi, I was also facing same issue. But when i tried to do "python -m retro.import . (don't forget the point)" i was getting Importing 0 potential games, imported 0 games. Can you tell me what i am doing wrong?

from retro.

simoninithomas avatar simoninithomas commented on September 26, 2024

Hi, @seshuthota what game you're trying to import ?

from retro.

seshuthota avatar seshuthota commented on September 26, 2024

I was trying to import Space Invaders. First i downloaded file from this page http://www.atarimania.com/rom_collection_archive_atari_2600_roms.html

I extracted and inside ROMS folder i found 5 files naming Space Inavders and i copied them to this path
Anaconda3\Lib\site-packages\retro\data\SpaceInvaders-Atari2600 and in the command prompt i tried this command "python -m retro.import" but it is printing "Importing 0 potential games, Imported 0 games". What did i do wrong here?
Did i got the wrong files? i have attached the files that i was copying.
SpaceInavdersGameFiles.zip

from retro.

simoninithomas avatar simoninithomas commented on September 26, 2024

Hi,
Simply unzip the total archive in a folder go to this folder and type python -m retro.import . (dont forget that point !!!)

from retro.

bbartling avatar bbartling commented on September 26, 2024

Hi Im struggling with this same thing.. I even tried this process 2 times:

  1. I downloaded these files as posted above http://www.atarimania.com/rom_collection_archive_atari_2600_roms.html
  2. Copied the roms.rar download file to my desktop and right click extract in Linux Mint v18
  3. I have Anaconda 3.6 installed and then right click open in terminal on the new extracted folder python -m retro.import

Importing 0 potential games, imported 0 games

Can someone tell me what I am doing wrong???

from retro.

endrift avatar endrift commented on September 26, 2024

You need to add . at the end of the script. It needs a directory name. (I've just pushed changes that let it use files and will search the current directory if no arguments are passed but this isn't in the stable build.)

from retro.

samersallam avatar samersallam commented on September 26, 2024

Very important note:
If the ROM has a .bin extension, rename it to have the correct extension for that system.

.md: Sega Genesis (also known as Mega Drive)
.sfc: Super Nintendo Entertainment System (also known as Super Famicom)
.nes: Nintendo Entertainment System (also known as Famicom)
.a26: Atari 2600
.gb: Nintendo Game Boy
.gba: Nintendo Game Boy Advance
.gbc: Nintendo Game Boy Color
.gg: Sega Game Gear
.pce: NEC TurboGrafx-16 (also known as PC Engine)
.sms: Sega Master System

https://github.com/openai/retro#rom-extensions

from retro.

RinshannKaihou avatar RinshannKaihou commented on September 26, 2024

Hi @bbartling I'm facing the same issue.

(tensorflow) D:\Anaconda3\Lib\site-packages\retro\data\SpaceInvaders-Atari2600>python -m retro.import . Importing 4 potential games... Imported 0 games

Have you found the reason?

from retro.

bbartling avatar bbartling commented on September 26, 2024

@RinshannKaihou no I have not...

from retro.

sunnyswag avatar sunnyswag commented on September 26, 2024

you need cd to fold ....../Roms/ROMS ,and then do the following:

pip3 install gym-retro
python3 -m retro.import

@RinshannKaihou

from retro.

nikhilkaparthi avatar nikhilkaparthi commented on September 26, 2024

I see no module named retro. Could someone please help

from retro.

LucasColas avatar LucasColas commented on September 26, 2024

For Google Colab Notebooks do the following.

! wget http://www.atarimania.com/roms/Roms.rar && unrar x Roms.rar && unzip Roms/ROMS.zip
! pip3 install gym-retro
! python3 -m retro.import ROMS/

Didn't work for me...

from retro.

MoranReznik avatar MoranReznik commented on September 26, 2024

For Google Colab Notebooks do the following.

! wget http://www.atarimania.com/roms/Roms.rar && unrar x Roms.rar && unzip Roms/ROMS.zip
! pip3 install gym-retro
! python3 -m retro.import ROMS/

didnt work for me on google colab... dont know what to do.

from retro.

MoranReznik avatar MoranReznik commented on September 26, 2024

Hi,
Simply unzip the total archive in a folder go to this folder and type python -m retro.import . (dont forget that point !!!)

when you say "dont forget the point", do you mean the point between "retro" and "import", and the point after "import" is just for closing the sentence, or do you mean not forgetting the point after "import"? also, shouldn't we specify a path?

from retro.

endrift avatar endrift commented on September 26, 2024

The point after import. That is the path.

from retro.

dleacock avatar dleacock commented on September 26, 2024

This is how I solved it.

  1. Downloaded Atari ROMs from here
  2. Extracted to any place. Opened and found "Space Invaders (1983) (CCE) (C-820).bin".
  3. Extracted the file in the same directory as my python script.
  4. python -m retro.import . in the same location where I would run the script.

from retro.

adityakusupati avatar adityakusupati commented on September 26, 2024

Hi,

Thanks for the solution. Any idea what is the license for these ROMs? Stella is on GNU and Retro is on MIT licenses, but I am not sure about the ROMs. I have seen people use these ROMs for publications but I haven't seen the licenses in their codebases.

Any help would be great

from retro.

adityakusupati avatar adityakusupati commented on September 26, 2024

Thanks a lot. This helps ๐Ÿ‘

from retro.

wolfsinem avatar wolfsinem commented on September 26, 2024

For Google Colab Notebooks do the following.

! wget http://www.atarimania.com/roms/Roms.rar && unrar x Roms.rar && unzip Roms/ROMS.zip
! pip3 install gym-retro
! python3 -m retro.import ROMS/

Change link to http://www.atarimania.com/rom_collection_archive_atari_2600_roms.html . Worked for me

from retro.

SAB-6 avatar SAB-6 commented on September 26, 2024

This might help someone working in colab; creating a new directory works for me

! wget http://www.atarimania.com/roms/Roms.rar && unrar x Roms.rar 
!mkdir <new_dir>
!unzip Roms/ROMS.zip -d <new_dir>
! pip install gym-retro
!python3 -m retro.import <new_dir>/ROMS/

from retro.

haneensalameh66 avatar haneensalameh66 commented on September 26, 2024

! wget http://www.atarimania.com/roms/Roms.rar && unrar x Roms.rar && unzip Roms/ROMS.zip
! pip3 install gym-retro
! python3 -m retro.import ROMS/

hey, did you manage to solve this issue with colab ?

from retro.

SAB-6 avatar SAB-6 commented on September 26, 2024

This might help someone working in colab; creating a new directory works for me

! wget http://www.atarimania.com/roms/Roms.rar && unrar x Roms.rar 
!mkdir <new_dir>
!unzip Roms/ROMS.zip -d <new_dir>
! pip install gym-retro
!python3 -m retro.import <new_dir>/ROMS/

This works for me

from retro.

haneensalameh66 avatar haneensalameh66 commented on September 26, 2024

! wget http://www.atarimania.com/roms/Roms.rar && unrar x Roms.rar
!mkdir <new_dir>
!unzip Roms/ROMS.zip -d <new_dir>
! pip install gym-retro
!python3 -m retro.import <new_dir>/ROMS/

unfortunately, it didn't work for me. i had this error message : FileNotFoundError: Game not found: SpaceInvaders-Atari2600. Did you make sure to import the ROM?

from retro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.