From 205698dd666e2ac915ea0fd270cfd6eb7dbe682f Mon Sep 17 00:00:00 2001 From: Minghao Zhang <37171450+Mehooz@users.noreply.github.com> Date: Tue, 21 Apr 2020 15:36:08 +0800 Subject: [PATCH] fix #33 (#34) --- tianshou/env/atari.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tianshou/env/atari.py b/tianshou/env/atari.py index bd9231e..3f67da0 100644 --- a/tianshou/env/atari.py +++ b/tianshou/env/atari.py @@ -95,8 +95,9 @@ class preprocessing(object): axis=-1) if self.count >= self.max_episode_steps: terminal = True - self.terminal = terminal - return observation, total_reward, is_terminal, info + else: + terminal = False + return observation, total_reward, (terminal or is_terminal), info def _grayscale_obs(self, output): self.env.ale.getScreenGrayscale(output)