Fixed typo
This commit is contained in:
@ -301,7 +301,7 @@ class GA(Attributes):
|
|||||||
# Sort by fitness, assuming None should be moved to the end of the list
|
# Sort by fitness, assuming None should be moved to the end of the list
|
||||||
def key(chromosome):
|
def key(chromosome):
|
||||||
if chromosome.fitness is not None:
|
if chromosome.fitness is not None:
|
||||||
return chromosome_fitness
|
return chromosome.fitness
|
||||||
elif reverse:
|
elif reverse:
|
||||||
return float('-inf')
|
return float('-inf')
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user