mirror of
https://github.com/gryf/coach.git
synced 2025-12-18 11:40:18 +01:00
remove unnecessary test result is None in GraphManager.act
This commit is contained in:
@@ -372,8 +372,6 @@ class GraphManager(object):
|
|||||||
data_store.load_from_store()
|
data_store.load_from_store()
|
||||||
|
|
||||||
# perform several steps of playing
|
# perform several steps of playing
|
||||||
result = None
|
|
||||||
|
|
||||||
count_end = self.total_steps_counters[self.phase][steps.__class__] + steps.num_steps
|
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
|
# 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)
|
result = self.top_level_manager.step(None)
|
||||||
steps_end = self.environments[0].total_steps_counter
|
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
|
# add the diff between the total steps before and after stepping, such that environment initialization steps
|
||||||
# (like in Atari) will not be counted.
|
# (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
|
# We add at least one step so that even if no steps were made (in case no actions are taken in the training
|
||||||
|
|||||||
Reference in New Issue
Block a user