In [1]:
import gym
from matplotlib.pyplot import imshow
from scipy.misc import imresize
%matplotlib inline

In [2]:
env_name = "KungFuMaster-v0"

In [3]:
env = gym.make(env_name)


[2017-05-29 21:14:42,710] Making new env: KungFuMaster-v0

In [4]:
state = env.reset()

In [5]:
imshow(state)


Out[5]:
<matplotlib.image.AxesImage at 0x7f11501f5b38>

In [6]:
state.shape


Out[6]:
(210, 160, 3)

In [7]:
imshow(state[70:180, 10:160])


Out[7]:
<matplotlib.image.AxesImage at 0x7f1150112ba8>

In [8]:
state[70:180, 10:160].shape


Out[8]:
(110, 150, 3)

In [9]:
imshow(imresize(state[70:180, 10:160], (64, 64)))


Out[9]:
<matplotlib.image.AxesImage at 0x7f1150089cc0>

In [ ]: