MCPcopy Index your code
hub / github.com/rlcode/reinforcement-learning / reset

Method reset

3-atari/env.py:25–30  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

23# this the agent wastes a lot of frames waiting for a random FIRE.
24class FireResetEnv(gym.Wrapper):
25 def reset(self, **kwargs):
26 self.env.reset(**kwargs)
27 obs, _, terminated, truncated, _ = self.env.step(1) # FIRE
28 if terminated or truncated:
29 obs, _ = self.env.reset(**kwargs)
30 return obs, {}
31
32
33# Treats each life as its own episode for bootstrapping (so Q-targets / GAE don't

Callers 4

2-ppo.pyFile · 0.45
1-dqn.pyFile · 0.45
resetMethod · 0.45
run_test_loopFunction · 0.45

Calls 1

stepMethod · 0.45

Tested by

no test coverage detected