openai / gym

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

Start CartPole-v1 with pendulum oriented downwards #1317

Closed ferreirafabio closed 5 years ago

ferreirafabio commented 5 years ago

Hi,

I was wondering what the best way is to initialize the CartPole-v1 environment with a pendulum oriented downwards.

Thank you

christopherhesse commented 5 years ago

You should probably try editing https://github.com/openai/gym/blob/master/gym/envs/classic_control/cartpole.py but you'll also have to change the done condition since you would immediately lose if the pole was facing down. You may want to consider the pendulum environment instead: https://gym.openai.com/envs/Pendulum-v0/