1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-17 19:20:19 +01:00

remove unnecessary test result is None in GraphManager.act

This commit is contained in:
Zach Dwiel
2018-10-04 11:46:51 -04:00
committed by zach dwiel
parent 35d67cbd9b
commit cd30efe52e

View File

@@ -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