1

Screenshot

This is what env.render() outputs on the screen, the environment is SpaceInvader-v0.

Am I doing something wrong here? My code is literally right off the OpenAI Gym website, only changed the environment.

squadrick
  • 770
  • 3
  • 21

2 Answers2

2

I had the same issue and just figured it out (hopefully it's the same issue as yours). I had installed gym==0.7.0 and all I could get is a jumbled screen. When I upgraded to the latest gym (0.9.x), everything now looks correct. You may have to modify some code to adapt to the version switch.

user2721897
  • 355
  • 2
  • 9
1

Your gym and atari_py versions are incompatible (atari_py >= 0.1.1 requires gym >= 0.9.5).

The openai devs introduced getScreenRGB2 API call and changed gym to use it after my call that getScreenRGB is actually returns data not in RGB but in BGRX format and latter channel swapping in gym eats a lot of CPU cycles.

Nikita Kniazev
  • 3,728
  • 2
  • 16
  • 30
  • I fixed this by just upgrading to the latest version of `gym`, but it's good to know what really caused the error. Thanks. – squadrick Mar 03 '18 at 19:43