Skip to content

Instantly share code, notes, and snippets.

@TheBojda
Created December 8, 2019 08:31
Show Gist options
  • Save TheBojda/69ecc3f9854f416a8aceec0778947da3 to your computer and use it in GitHub Desktop.
Save TheBojda/69ecc3f9854f416a8aceec0778947da3 to your computer and use it in GitHub Desktop.
import gym
env = gym.make("Breakout-v0")
observation = env.reset()
for _ in range(10000):
env.render()
action = env.action_space.sample() # your agent here (this takes random actions)
observation, reward, done, info = env.step(action)
if done:
observation = env.reset()
env.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment