parameters: (self, **kwargs)
return_statement: return obs
docstring: Reset only when lives are exhausted.
          This way all states are still reachable even though lives are episodic,
          and the learner need not know about any of this behind-the-scenes.
docstring_summary: Reset only when lives are exhausted.
          This way all states are still reachable even though lives are episodic,
          and the learner need not know about any of this behind-the-scenes.
docstring_tokens: Reset only when lives are exhausted . This way all states are still reachable even though lives are episodic and the learner need not know about any of this behind - the - scenes .
function: def reset(self, **kwargs):
          """Reset only when lives are exhausted.
          This way all states are still reachable even though lives are episodic,
          and the learner need not know about any of this behind-the-scenes.
          """
          if self.was_real_done:
              obs = self.env.reset(**kwargs)
          else:
              # no-op step to advance from terminal/lost life state
              obs, _, _, _ = self.env.step(0)
          self.lives = self.env.unwrapped.ale.lives()
          return obs
function_tokens: def reset ( self , * * kwargs ) : if self . was_real_done : obs = self . env . reset ( * * kwargs ) else : # no-op step to advance from terminal/lost life state obs , _ , _ , _ = self . env . step ( 0 ) self . lives = self . env . unwrapped . ale . lives ( ) return obs