Skip to content

Commit

Permalink
Minor fix to empty fitness of single objective individuals
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyingPumba committed Aug 9, 2021
1 parent ff68369 commit 5df2c0d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion evaluation/single_objective.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ def new_hall_of_fame(self) -> HallOfFame:
return HallOfFame(maxsize=50)

def set_empty_fitness(self, individual: IndividualSingleObjective) -> None:
individual.fitness.values = (0, sys.maxsize, 0)
individual.fitness.values = (0,)

individual.crashes = 0
individual.length = sys.maxsize

individual.evaluation_finish_timestamp = time.time()
individual.evaluation_elapsed_time = 0
Expand Down

0 comments on commit 5df2c0d

Please sign in to comment.