MCPcopy Create free account
hub / github.com/YeWR/EfficientZero / __init__

Method __init__

core/utils.py:129–135  ·  view source on GitHub ↗

Return only every `skip`-th frame

(self, env, skip=4)

Source from the content-addressed store, hash-verified

127
128class MaxAndSkipEnv(gym.Wrapper):
129 def __init__(self, env, skip=4):
130 """Return only every `skip`-th frame"""
131 gym.Wrapper.__init__(self, env)
132 # most recent raw observations (for max pooling across time steps)
133 self._obs_buffer = np.zeros((2,)+env.observation_space.shape, dtype=np.uint8)
134 self._skip = skip
135 self.max_frame = np.zeros(env.observation_space.shape, dtype=np.uint8)
136
137 def step(self, action):
138 """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