Skip to content

Commit

Permalink
Reduce magic value fitnesses
Browse files Browse the repository at this point in the history
  • Loading branch information
h3ndrk committed Jul 2, 2021
1 parent 5d8002a commit d6f8b46
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,10 @@ def fitness(self) -> typing.Optional[float]:
if self.evaluation_result is None:
return None
if 'exception' in self.evaluation_result:
return -1
return -100
if self.evaluation_result['compiledNN_result'] > self.configuration[
'compiledNN_threshold']:
return 0
return -99
metric_factor = -1 if self.configuration[
'negate_metric_in_fitness'] else 1
return (metric_factor *
Expand Down

0 comments on commit d6f8b46

Please sign in to comment.