Skip to content

Instantly share code, notes, and snippets.

@malzantot
Last active April 26, 2017 23:23
Show Gist options
  • Save malzantot/a69e57339c9fe801db849cf8ffcc45fe to your computer and use it in GitHub Desktop.
Save malzantot/a69e57339c9fe801db849cf8ffcc45fe to your computer and use it in GitHub Desktop.
openai_gym101
import gym
env = gym.make('CartPole-v0')
# Restart the environment to start a new episode
obs = env.reset()
for step_idx in range(500):
env.render()
obs, reward, done, _ = env.step(env.action_space.sample())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment