openai / gym

A toolkit for developing and comparing reinforcement learning algorithms.
https://www.gymlibrary.dev
Other
34.82k stars 8.61k forks source link

Black observation(flickering) in AirRaid #1650

Closed gamkkk closed 5 years ago

gamkkk commented 5 years ago

I got many black observation(flickering) in AirRaidDeterministic-v4 shown below (same issue in #378). flickering

However, there is no flicker in this gameplay example. Is this correct or bug??

I'm using the gym version '0.12.1' in macOS Mojave.

christopherhesse commented 5 years ago

This happens without using gym, so it looks like an issue with https://github.com/mgbellemare/Arcade-Learning-Environment

import matplotlib.pyplot as plt
import atari_py

ale = atari_py.ALEInterface()
ale.setFloat("repeat_action_probability".encode("utf-8"), 0.0)
game_path = atari_py.get_game_path("air_raid")
ale.loadROM(game_path)
ale.reset_game()
for i in range(200):
    print("i", i)
    ale.act(0)
    obs = ale.getScreenRGB2()
    plt.subplot(10, 20, i + 1)
    plt.axis("off")
    plt.imshow(obs)
    if ale.game_over():
        break
plt.show()

Oddly, gym-retro doesn't have black screens but does have some grayscale screens and flickering. The current version of stella from the website: https://stella-emu.github.io/downloads.html does not seem to have these issues so it's likely these graphical issues were fixed in newer versions of stella.

Thanks for reporting this bug, but please file it on the ALE repo instead of the gym one.