'Excecutes an action in the gym environment.
Builds current state (concatenation of action_repeat-1 previous
frames and current one). Pops oldest frame, adds current frame to
the state buffer. Returns current state.'

def step(self, action_index):

    (x_t1, r_t, terminal, info) = self.env.step(self.gym_actions[action_index])
    x_t1 = self.get_preprocessed_frame(x_t1)
    previous_frames = np.array(self.state_buffer)
    s_t1 = np.empty((self.action_repeat, 84, 84))
    s_t1[:(self.action_repeat - 1), :] = previous_frames
    s_t1[(self.action_repeat - 1)] = x_t1
    self.state_buffer.popleft()
    self.state_buffer.append(x_t1)
    return (s_t1, r_t, terminal, info)
