MCPcopy Index your code
hub / github.com/lazyprogrammer/machine_learning_examples / wrap_deepmind

Function wrap_deepmind

rl3/a2c/atari_wrappers.py:227–243  ·  view source on GitHub ↗

Configure environment for DeepMind-style Atari.

(env, episode_life=True, clip_rewards=True, frame_stack=False)

Source from the content-addressed store, hash-verified

225
226
227def wrap_deepmind(env, episode_life=True, clip_rewards=True, frame_stack=False):
228 """Configure environment for DeepMind-style Atari.
229 """
230 if episode_life:
231 env = EpisodicLifeEnv(env)
232
233 if 'FIRE' in env.unwrapped.get_action_meanings():
234 env = FireResetEnv(env)
235 env = WarpFrame(env)
236
237 if clip_rewards:
238 env = ClipRewardEnv(env)
239
240 if frame_stack:
241 env = FrameStack(env, 4)
242
243 return env
244
245
246class Monitor(gym.Wrapper):

Callers 2

mainFunction · 0.90
_thunkFunction · 0.90

Calls 5

EpisodicLifeEnvClass · 0.85
FireResetEnvClass · 0.85
WarpFrameClass · 0.85
ClipRewardEnvClass · 0.85
FrameStackClass · 0.85

Tested by

no test coverage detected