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)
In [4]:
state = env.reset()
In [5]:
imshow(state)
Out[5]:
In [6]:
state.shape
Out[6]:
In [7]:
imshow(state[70:180, 10:160])
Out[7]:
In [8]:
state[70:180, 10:160].shape
Out[8]:
In [9]:
imshow(imresize(state[70:180, 10:160], (64, 64)))
Out[9]:
In [ ]: