Hi,
I have a custom gym environment and i have found that I need to set its observation_space. I have read through the gym docs, looked at its use in cartpole, looked at the spaces folder, but I do not understand what it conceptually is and how/with what I should set it. How can I find this out?
Thank you
The observation_space defines the structure of the observations your environment will be returning. Learning agents usually need to know this before they start running, in order to set up the policy function. Some general-purpose learning agents can handle a wide range of observation types: Discrete, Box, or pixels (which is usually a Box(0, 255, [height, width, 3]) for RGB pixels).
See at https://gym.openai.com/docs under Spaces.
Shouldn't this issue be closed?
The
observation_spacedefines the structure of the observations your environment will be returning. Learning agents usually need to know this before they start running, in order to set up the policy function. Some general-purpose learning agents can handle a wide range of observation types: Discrete, Box, or pixels (which is usually aBox(0, 255, [height, width, 3]) for RGB pixels).See at https://gym.openai.com/docs under Spaces.
Trivial question, but what does the 3 represent? Thanks
@toenailssauce Represents the RGB value respectively.
How to go about defining observation_space where two images are passed as a state?
use Dict or Tuple, the code is here.
Thank you @yangpeiren I saw that. the problem is baseline supports boxes obs_spaces only which is a bummer :(
@AloshkaD , you are welcome, actually the Ray Rllib from UC Berkeley supports Dict and Tuple, however the learning curve of it is steep, since it is a quite large framework.
Most helpful comment
The
observation_spacedefines the structure of the observations your environment will be returning. Learning agents usually need to know this before they start running, in order to set up the policy function. Some general-purpose learning agents can handle a wide range of observation types: Discrete, Box, or pixels (which is usually aBox(0, 255, [height, width, 3]) for RGB pixels).See at https://gym.openai.com/docs under Spaces.