Aufgrund einer Wartung wird GitLab am 21.09. zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 21.09. between 8:00 and 9:00 am.

Commit c01a74c8 authored by Nicola Gatto's avatar Nicola Gatto
Browse files

Always return zero if sample games is zero

parent 7a8c3ae8
...@@ -177,6 +177,9 @@ class Agent(object): ...@@ -177,6 +177,9 @@ class Agent(object):
return states, actions, rewards, next_states, terminals return states, actions, rewards, next_states, terminals
def evaluate(self, target=None, sample_games=100, verbose=True): def evaluate(self, target=None, sample_games=100, verbose=True):
if sample_games <= 0:
return 0
target = self._target_score if target is None else target target = self._target_score if target is None else target
if target: if target:
target_achieved = 0 target_achieved = 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment