def _restart_environment_episode(self, force_environment_reset=False):
// prevent reset of environment if there are ale lives left
if "Breakout" in self.env_id and self.env.env.ale.lives() > 0 and not force_environment_reset:
return self.observation
if self.seed:
After Change
def _restart_environment_episode(self, force_environment_reset=False):
// prevent reset of environment if there are ale lives left
if (hasattr(self.env.env, "ale") and self.env.env.ale.lives() > 0) \
and not force_environment_reset and not self.env._past_limit():
return self.observation