Kautenja / gym-super-mario-bros

An OpenAI Gym interface to Super Mario Bros. & Super Mario Bros. 2 (Lost Levels) on The NES
Other
678 stars 133 forks source link

Illegal instruction when calling gym_super_mario_bros.make() #95

Closed timtody closed 4 years ago

timtody commented 4 years ago

Describe the bug

the call to make yields a SIGILL

Reproduction Script

import gym_super_mario_bros
from gym_super_mario_bros.actions import SIMPLE_MOVEMENT
env = gym_super_mario_bros.make('SuperMarioBros-v0')
env = JoypadSpace(env, SIMPLE_MOVEMENT)

done = True
for step in range(5000):
    if done:
        state = env.reset()
    state, reward, done, info = env.step(env.action_space.sample())
    env.render()

env.close()

Expected behavior

No SIGILL

Screenshots

Additional context

pablotalavante commented 4 years ago

I have the same problem. It works for me in python3.8, but not in 3.7. Strange...

Kautenja commented 4 years ago

Hmm, were you running python 3.7 with gym-super-mario-bros installed, then upgraded to python3.8? If so, you may need to reinstall nes-py because it has some compiled C++ elements that may need to be recompiled.

Kautenja commented 4 years ago

closing issue as I cannot reproduce, and believe reinstallation of nes-py is required. Please reopen if this is not the case.