def _curr_frame(self): img = self.ale.getScreenRGB() img = rgb2yuv(img)[:, :, 0] # get Y channel, according to Nature paper. # print 'RAM', self.ale.getRAM() if self.mode == 'small': img = self.max_pool(img) img = imresize(img, self.img_shape, interp='bicubic') return img
def _get_frame(self): if self.state_type == 'pixel': from scipy.misc import imresize img = self.curr_screen_rgb img = rgb2yuv(img)[:, :, 0] # get Y channel, according to Nature paper. img = imresize(img, (84, 84), interp='bicubic') return img / floatX(255.0) elif self.state_type == 'ram': return self._get_ram_state() elif self.state_type == '1hot': return self._get_1hot_state() else: raise NotImplementedError()