def step(self, action):
    'Repeat action, sum reward, and max over last observations.'
    total_reward = 0.0
    done = None
    for i in range(self._skip):
        (obs, reward, done, info) = self.env.step(action)
        if (i == (self._skip - 2)):
            self._obs_buffer[0] = obs
        if (i == (self._skip - 1)):
            self._obs_buffer[1] = obs
        total_reward += reward
        if done:
            break
    max_frame = self._obs_buffer.max(axis=0)
    return (max_frame, total_reward, done, info)
Repeat action, sum reward, and max over last observations.
def step(self, action):
    
    total_reward = 0.0
    done = None
    for i in range(self._skip):
        (obs, reward, done, info) = self.env.step(action)
        if (i == (self._skip - 2)):
            self._obs_buffer[0] = obs
        if (i == (self._skip - 1)):
            self._obs_buffer[1] = obs
        total_reward += reward
        if done:
            break
    max_frame = self._obs_buffer.max(axis=0)
    return (max_frame, total_reward, done, info)