Last active
April 26, 2017 23:23
-
-
Save malzantot/a69e57339c9fe801db849cf8ffcc45fe to your computer and use it in GitHub Desktop.
openai_gym101
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 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