Ach113
Ach113

Reputation: 1825

openai-gym how to determine what the values in observation space mean

Is there any documentation where I could details regarding this kind of stuff? For example:

import gym

# environment for agent
env = gym.make('Pendulum-v0')
env.reset()

print(env.observation_space.high, env.observation_space.low)

# pendulum observation space ranges from [-1, -1, -8] to [1, 1, 8]

I cant figure out what each number in observation space means. I guess two of them are x and y coordinates (although I dont know which is which), and what does the third number stand for?

Upvotes: 2

Views: 2688

Answers (2)

Alberto Hernandez
Alberto Hernandez

Reputation: 59

Open AI's documentation covers this:

  1. Dimensionality of Observation space, Action space, reward, etc. of all the environments: https://github.com/openai/gym/wiki/Table-of-environments

  2. Specific ranges for them, e.g. https://github.com/openai/gym/wiki/Pendulum-v1

In your case, assuming Pendulum-v0 shares v1's features, your three values mean:

  • cos(theta), between -1 and 1
  • sin(theta), between -1 and 1
  • theta dot, or angular velocity, between -8 and 8

Best

Upvotes: 0

Ach113
Ach113

Reputation: 1825

Apparently openai's github page has a wiki which contains the information I was looking for: https://github.com/openai/gym/wiki

Upvotes: 1

Related Questions