From cd30efe52e8ce5b0eb577bcd64ad14d9e214c21b Mon Sep 17 00:00:00 2001 From: Zach Dwiel Date: Thu, 4 Oct 2018 11:46:51 -0400 Subject: [PATCH] remove unnecessary test result is None in GraphManager.act --- rl_coach/graph_managers/graph_manager.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/rl_coach/graph_managers/graph_manager.py b/rl_coach/graph_managers/graph_manager.py index 6c72e54..9a1e393 100644 --- a/rl_coach/graph_managers/graph_manager.py +++ b/rl_coach/graph_managers/graph_manager.py @@ -372,8 +372,6 @@ class GraphManager(object): data_store.load_from_store() # perform several steps of playing - result = None - count_end = self.total_steps_counters[self.phase][steps.__class__] + steps.num_steps # The assumption here is that the total_steps_counters are each updated when an event @@ -388,12 +386,6 @@ class GraphManager(object): result = self.top_level_manager.step(None) steps_end = self.environments[0].total_steps_counter - # result will be None if at least one level_manager decided not to play (= all of his agents did not play) - # causing the rest of the level_managers down the stack not to play either, and thus the entire graph did - # not act - if result is None: - break - # add the diff between the total steps before and after stepping, such that environment initialization steps # (like in Atari) will not be counted. # We add at least one step so that even if no steps were made (in case no actions are taken in the training