From 752d7b49e934ca6aa441c46631da1eafba418552 Mon Sep 17 00:00:00 2001 From: Peng Yu Date: Thu, 16 Nov 2017 10:46:34 -0500 Subject: [PATCH] terminal not used in preprocess remove them --- environments/environment.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/environments/environment.py b/environments/environment.py index 22950cc..99a9145 100644 --- a/environments/environment.py +++ b/environments/environment.py @@ -113,11 +113,11 @@ def step(self, action, is_training): self.lives = current_lives if self.use_cumulated_reward: - return self.preprocess(screen, terminal), cumulated_reward, terminal, {} + return self.preprocess(screen), cumulated_reward, terminal, {} else: - return self.preprocess(screen, terminal), reward, terminal, {} + return self.preprocess(screen), reward, terminal, {} - def preprocess(self, raw_screen, terminal): + def preprocess(self, raw_screen): y = 0.2126 * raw_screen[:, :, 0] + 0.7152 * raw_screen[:, :, 1] + 0.0722 * raw_screen[:, :, 2] y = y.astype(np.uint8) y_screen = imresize(y, self.observation_dims)