Skip to content

Instantly share code, notes, and snippets.

@PierreExeter
Created October 11, 2019 11:00
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/228ecb014a54b4f5542f620d948f9af4 to your computer and use it in GitHub Desktop.
Save PierreExeter/228ecb014a54b4f5542f620d948f9af4 to your computer and use it in GitHub Desktop.
import gym
import pybullet_envs
import time
env = gym.make("CartPoleBulletEnv-v1")
env.reset()
while True:
action = [1, 0]
state, reward, done, info = env.step(action)
print(state)
print(action)
env.render()
time.sleep(1./30.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment