':param act: an index of the action
:returns: (reward, isOver)'

def action(self, act):

    oldlives = self.ale.lives()
    r = 0
    for k in range(self.frame_skip):
        if (k == (self.frame_skip - 1)):
            self.last_raw_screen = self._grab_raw_image()
        r += self.ale.act(self.actions[act])
        newlives = self.ale.lives()
        if (self.ale.game_over() or (self.live_lost_as_eoe and (newlives < oldlives))):
            break
    self.current_episode_score.feed(r)
    isOver = self.ale.game_over()
    if self.live_lost_as_eoe:
        isOver = (isOver or (newlives < oldlives))
    if isOver:
        self.finish_episode()
    if self.ale.game_over():
        self.restart_episode()
    return (r, isOver)
