Farama-Foundation / Minigrid

Simple and easily configurable grid world environments for reinforcement learning
https://minigrid.farama.org/
Other
2.09k stars 604 forks source link

What is the best practice on the observation space #186

Closed pengzhenghao closed 2 years ago

pengzhenghao commented 2 years ago

Hi, I am new to this project and wonder what is the best practice on the observation.

  1. I find that current partially observable observation only occupy some small values such as 0, 1, 2, 3 in the full allowable pixel value space [0, 255]. Would that harms training if later the training algorithm automatically rescales the input to [0, 1] with x = x / 255? Since current observation will be scaled to very small values like [0, 0.0039, ...].
  2. Can I just simply convert the partially observation to gray scale by calling opencv function cvtColor? Would this loss information?
  3. Can I use frame stacking just like Atari environment? By doing so the agent will access some of its history. Should I apply frame stacking to original three channels (so the final input will be [7, 7, 3*4=12]) or apply to the gray scale image ([7, 7, 4])?

Thanks in advance!

maximecb commented 2 years ago

Hello,

By default, the observations are not RGB values, but you can use a wrapper to produce RGB values. This is explained in the README: https://github.com/Farama-Foundation/gym-minigrid#wrappers

And yes of course you can use frame stacking.

pseudo-rnd-thoughts commented 2 years ago

Closed due to inactivity