Created
August 25, 2020 16:17
-
-
Save Danaze/044878390d41726990f9f179b7a47659 to your computer and use it in GitHub Desktop.
gym cartpole environment observations and actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import gym | |
env = gym.make("CartPole-v1") | |
# there are two actions | |
print("number of actions: " + np.str(env.action_space.n)) | |
# check the observations bounds for each (position, velocity, angle, angular velocity) | |
for _ in range(4): | |
print (env.observation_space.high[_]) | |
print (env.observation_space.low[_]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment