nadavbh12 / Retro-Learning-Environment

The Retro Learning Environment (RLE) -- a learning framework for AI
Other
184 stars 40 forks source link

How to run python example on Linux #5

Closed 4SkyNet closed 7 years ago

4SkyNet commented 7 years ago

Hi, I've got some troubles with the given example in:

~/doc/examples

I try to run:

python_example.py path_to_game_rom

But it fails with issues wrt argv[2], where I should provide some core_file (*.so)

I try again:

python_example.py path_to_game_rom path_to_librle_c.so

But it fails again with this error:

Failed to load symbol 'retro_init'': ../../rle_python_interface/librle_c.so: undefined symbol: retro_init

It seems to that there should be some corrections wrt symbols (it can be linux specific as previous commit to setup.py from my buddy)

nadavbh12 commented 7 years ago

The .so file should be of the core (Atari or Snes). For snes it should be in snes9x2010/snes9x2010-libretro.so.

I'll add the instructions to help avoid confusion.

4SkyNet commented 7 years ago

Thx, it loads! ...but then I've got a segmentation fault

Warning: couldn't load settings file: R.L.E: Retro Learning Environment (version 0.5.0) [Based upon the Arcade Learning Environment (A.L.E)] [Powered by LibRetro] Use -help for help screen. [inf] Frontend supports RGB565 - will use that instead of XRGB1555.

Sound buffer size: 128000 (32000 samples) Core loaded

[inf] No ROM file header found.

Map_LoROMMap

PPU.RenderSub = 0 PPU.FullClipping = 1 Settings.Transparency = 1 Settings.SpeedhackGameID = 0 PPU.SFXSpeedupHack = 0 coldata_update_screen = 1 [inf] "MORTAL KOMBAT" [checksum ok] LoROM, 16Mbits, ROM, NTSC, SRAM:0Kbits, ID:____, CRC32:DEF42945 Running ROM file... Random seed is 123

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

nadavbh12 commented 7 years ago

Sorry for the delayed response, didn't notice your comment earlier. Please give it another try and let me know if you still have this issue.

tohnperfect commented 7 years ago

I also got the same error with v1.0.2 .

Warning: couldn't load settings file: R.L.E: Retro Learning Environment (version 1.0.0) [Based upon the Arcade Learning Environment (A.L.E)] [Powered by LibRetro] Use -help for help screen. [inf] Frontend supports RGB565 - will use that instead of XRGB1555. Sound buffer size: 128000 (32000 samples) Core loaded [inf] No ROM file header found. Map_LoROMMap PPU.RenderSub = 0 PPU.FullClipping = 1 Settings.Transparency = 1 Settings.SpeedhackGameID = 7 PPU.SFXSpeedupHack = 0 coldata_update_screen = 0 [inf] "SUPER MARIOWORLD" [checksum ok] LoROM, 4Mbits, ROM+RAM+BAT, NTSC, SRAM:16Kbits, ID:____, CRC32:B19ED489 Running ROM file... Random seed is 123 Segmentation fault (core dumped)

nadavbh12 commented 7 years ago

Please make sure that the name of the rom on your file system is identical to that in the rom file.

tohnperfect commented 7 years ago

Thank you very much @nadavbh12, I am able run the example code now.

Supposedly, tutorial, more examples, and how to use the RLE can be found in the ALE?

nadavbh12 commented 7 years ago

You're welcome. Not sure what you're asking. Could you rephrase that?

tohnperfect commented 7 years ago

Where I could find more examples and tutorial of your library? Should I start with the ALE?

Thank you for making this great library.

On Feb 6, 2017 9:36 PM, "nadavbh12" notifications@github.com wrote:

You're welcome. Not sure what you're asking. Could you rephrase that?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nadavbh12/Retro-Learning-Environment/issues/5#issuecomment-277821329, or mute the thread https://github.com/notifications/unsubscribe-auth/ADOnvZm9Re_Mi7ZJbIM2Y7KxkGpseBAvks5rZ5JAgaJpZM4K6UgB .

nadavbh12 commented 7 years ago

Basically any repository you find online which uses ALE can easily be replaced by RLE. You can check out this fork of deep_q_rl to run DQN with RLE.

tohnperfect commented 7 years ago

Great! Thank you very much for the pointer.

On Feb 6, 2017 9:57 PM, "nadavbh12" notifications@github.com wrote:

Basically any repository you find online which uses ALE can easily be replaced by RLE. You can check out this https://github.com/nadavbh12/deep_q_rl fork of deep_q_rl to run DQN with RLE.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nadavbh12/Retro-Learning-Environment/issues/5#issuecomment-277827165, or mute the thread https://github.com/notifications/unsubscribe-auth/ADOnvdx_B64ZXdDwz8wt3tqpuvU-Gx03ks5rZ5dLgaJpZM4K6UgB .