Skip to content

Instantly share code, notes, and snippets.

@messiest
Created December 21, 2017 12:04
Show Gist options
  • Save messiest/fc8cf5711ea86ef1e69d22662d391286 to your computer and use it in GitHub Desktop.
Save messiest/fc8cf5711ea86ef1e69d22662d391286 to your computer and use it in GitHub Desktop.
import gym
env = gym.make('SuperMarioBros-1-1-v0')
observation = env.reset()
done = False
t = 0
while not done:
action = env.action_space.sample() # choose random action
observation, reward, done, info = env.step(action) # feedback from environment
t += 1
if not t % 100:
print(t, info)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment