Open dattienle2573 opened 7 months ago
Currently you get a single RGB frame, there is no stacking. To get what you are looking for, you must use the Observation Wrappers provided by gymnasium
.
I'd do it this way:
import flappy_bird_env # noqa
from gymnasium.wrappers import FrameStack, GrayScaleObservation
env = gymnasium.make("FlappyBird-v0")
env = GrayScaleObservation(env)
env = FrameStack(4)
render_mode = None
does not work. I don't want to render everytime I trained the model, so how to resolve this?
You cannot have frames with render_mode = None
. You can use render_mode = "rgb_array_list"
to then get the collected frames with render()
or reset()
.
If I resize the env by env = ResizeObservation(env, 80)
, what part of the env observation space would it keep? Do you have any suggestions if you know another effective way to do this?
I want to stack 4 frame instead of 3 frame and covert rgb color to gray scale. How can I do that?