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

Method step

3-atari/env.py:43–51  ·  view source on GitHub ↗
(self, action)

Source from the content-addressed store, hash-verified

41 self.game_over = True
42
43 def step(self, action):
44 obs, reward, terminated, truncated, info = self.env.step(action)
45 self.game_over = terminated or truncated
46 lives = info.get("lives", 0)
47 if 0 < lives < self.lives:
48 terminated = True
49 self.lives = lives
50 info["game_over"] = self.game_over
51 return obs, reward, terminated, truncated, info
52
53 def reset(self, **kwargs):
54 if self.game_over:

Callers 5

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

Calls

no outgoing calls

Tested by

no test coverage detected