import flappy_bird_env # noqa
import gymnasium
import matplotlib.pyplot as plt
from gymnasium.wrappers import GrayScaleObservation
from stable_baselines3.common.vec_env import DummyVecEnv, VecFrameStack
env = gymnasium.make("FlappyBird-v0", render_mode="human") # if I change this into rgb_array, it returns black or 000
env = GrayScaleObservation(env, keep_dim=True)
env = DummyVecEnv([lambda: env])
state = env.reset()
# take step from sample
action = env.action_space.sample()
observation, reward, done, info = env.step([action])
print(observation[0])
plt.imshow(observation[0])
plt.show()
the option to use render_mode "rgb_array" doesn't work as it returns black image so I would have to use "human", could you take a look at this?
Hi,
I was trying to implement this into my RL project
the option to use render_mode "rgb_array" doesn't work as it returns black image so I would have to use "human", could you take a look at this?