Skip to content

Instantly share code, notes, and snippets.

View mohit242's full-sized avatar

Mohit mohit242

  • India
View GitHub Profile
@thomelane
thomelane / jupyter_gym_render.py
Created September 11, 2018 00:40
OpenAI Gym render in Jupyter
import gym
from IPython import display
import matplotlib
import matplotlib.pyplot as plt
%matplotlib inline
env = gym.make('Breakout-v0')
env.reset()
img = plt.imshow(env.render(mode='rgb_array')) # only call this once
for _ in range(100):