openai / gym

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

How to get the detailed info of env? #758

Closed inksci closed 5 years ago

inksci commented 6 years ago

For example, the env 'Pendulum-v0', I can print its observation, action with python:

observation: [ 0.452032    0.89200172  0.91324294]
action: [ 0.19525402]

BUT what are the meaning of these data? What they represent for? Any information is welcome!

FirefoxMetzger commented 6 years ago

The meaning of the observation is unique to each environment and is not further specified by the gym framework. So where to get the info depends on the individual environment. The info field might be useful for additional information, though I find it's rarely used.

Some environments are documented in this repo's wiki. If the environment comes from outside of gym, check their docs. Otherwise your out of luck and have to stick to reading the source code, google and perhaps a lucky blog post. But don't worry, it's python and the API isn't to complex so it should be fairly straight forward.

inksci commented 6 years ago

@FirefoxMetzger Thank for your answer, which is helpful. Moreover, if there is a web page introducing all the information of env within gym, the people who use gym will feel easier for their work.

ImpulseAdventure commented 6 years ago

In the case of Pendulum-v0 you can find some details on the observation and action spaces here: https://github.com/openai/gym/wiki/Pendulum-v0

madvn commented 6 years ago

See #106

inksci commented 6 years ago

@ImpulseAdventure That is the perfect example what I want.

christopherhesse commented 5 years ago

Thanks for answering this @ImpulseAdventure, this is not documented for most environments, though you can often figure out from the code what the observations and actions are.