original_docstring:  0) Atari frames: 210 x 160
  		1) Get image grayscale
  		2) Rescale image 110 x 84
  		3) Crop center 84 x 84 (you can crop top/bottom according to the game)
  		
docstring: 0) Atari frames: 210 x 160
  1) Get image grayscale
  2) Rescale image 110 x 84
  3) Crop center 84 x 84 (you can crop top/bottom according to the game)
docstring_tokens: 0 ) Atari frames : 210 x 160 1 ) Get image grayscale 2 ) Rescale image 110 x 84 3 ) Crop center 84 x 84 ( you can crop top / bottom according to the game )
code: def four_frames_to_4_84_84(S):
  	""" 0) Atari frames: 210 x 160
  		1) Get image grayscale
  		2) Rescale image 110 x 84
  		3) Crop center 84 x 84 (you can crop top/bottom according to the game)
  		"""
  	for i, img in enumerate(S):
  		gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
  		h, w = 110, 84
  		gray_resized = cv2.resize(gray,(w,h))
  		gray_cropped = gray_resized[13:110-13,:]
  		gray_reshaped = gray_cropped.reshape((1,84,84))
  		if i == 0:
  			s = gray_reshaped
  		else:
  			s = np.concatenate((s,gray_reshaped),axis=0)
  	return s
code_tokens: def four_frames_to_4_84_84 ( S ) : for i , img in enumerate ( S ) : gray = cv2 . cvtColor ( img , cv2 . COLOR_RGB2GRAY ) h , w = 110 , 84 gray_resized = cv2 . resize ( gray , ( w , h ) ) gray_cropped = gray_resized [ 13 : 110 - 13 , : ] gray_reshaped = gray_cropped . reshape ( ( 1 , 84 , 84 ) ) if i == 0 : s = gray_reshaped else : s = np . concatenate ( ( s , gray_reshaped ) , axis = 0 ) return s
short_docstring: 0) Atari frames: 210 x 160
  1) Get image grayscale
  2) Rescale image 110 x 84
  3) Crop center 84 x 84 (you can crop top/bottom according to the game)
short_docstring_tokens: 0 ) Atari frames : 210 x 160 1 ) Get image grayscale 2 ) Rescale image 110 x 84 3 ) Crop center 84 x 84 ( you can crop top / bottom according to the game )
comment: """ 0) Atari frames: 210 x 160
  		1) Get image grayscale
  		2) Rescale image 110 x 84
  		3) Crop center 84 x 84 (you can crop top/bottom according to the game)
  		"""