Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perhaps update the tutorial documentation to reflect new cartpole high/low? #368

Closed
DanielTakeshi opened this issue Oct 5, 2016 · 2 comments

Comments

@DanielTakeshi
Copy link

I'm following the tutorial and am in the section "Spaces." The box's bounds are printed as:

print(env.observation_space.high)
#> array([ 2.4       ,         inf,  0.20943951,         inf])
print(env.observation_space.low)
#> array([-2.4       ,        -inf, -0.20943951,        -inf])

However, here is the code I wrote (which follows the tutorial):

import gym
env = gym.make('CartPole-v0')

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

And when I run this (in the file "bare_minimum_test") I get the following output:

$ python daniel_scripts/bare_minimum_test.py 
[2016-10-05 16:23:01,719] Making new env: CartPole-v0
Discrete(2)
Box(4,)
[  4.80000000e+00   3.40282347e+38   4.18879020e-01   3.40282347e+38]
[ -4.80000000e+00  -3.40282347e+38  -4.18879020e-01  -3.40282347e+38]

So it seems like the first and third bounds (in both the high/low) were doubled, for some reason.

@MasterScrat
Copy link

Ah, I was precisely wondering about this last month: https://stackoverflow.com/q/55597404/318557

@MasterScrat
Copy link

Wait, why is this closed? the problem still exists, doesn't it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants