Skip to content

Instantly share code, notes, and snippets.

@PierreExeter
Created September 17, 2019 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PierreExeter/40be87911ce4d963b3fddbc977f232ea to your computer and use it in GitHub Desktop.
Save PierreExeter/40be87911ce4d963b3fddbc977f232ea to your computer and use it in GitHub Desktop.
import gym
import numpy as np
import math
import matplotlib.pyplot as plt
# CREATE ENVIRONMENT
env = gym.make('CartPole-v0')
n_actions = env.action_space.n
n_states = env.observation_space.shape[0]
print("Action space size: ", n_actions)
print("State space size: ", n_states)
print('states high value:')
print(env.observation_space.high[0])
print(env.observation_space.high[1])
print(env.observation_space.high[2])
print(env.observation_space.high[3])
print('states low value:')
print(env.observation_space.low[0])
print(env.observation_space.low[1])
print(env.observation_space.low[2])
print(env.observation_space.low[3])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment