MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / __init__

Method __init__

rl3/a2c/atari_wrappers.py:98–103  ·  view source on GitHub ↗

Return only every `skip`-th frame

(self, env, skip=4)

Source from the content-addressed store, hash-verified

96
97class MaxAndSkipEnv(gym.Wrapper):
98 def __init__(self, env, skip=4):
99 """Return only every `skip`-th frame"""
100 gym.Wrapper.__init__(self, env)
101 # most recent raw observations (for max pooling across time steps)
102 self._obs_buffer = np.zeros((2,) + env.observation_space.shape, dtype='uint8')
103 self._skip = skip
104
105 def step(self, action):
106 """Repeat action, sum reward, and max over last observations."""

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected