Neatified ga.print stuff and altered run_testing

This commit is contained in:
SimpleArt
2020-10-22 19:05:43 -04:00
parent 50aa1587ae
commit c84758f8c5
3 changed files with 28 additions and 6 deletions

View File

@ -16,7 +16,7 @@ class Termination_Methods:
return False
# If maximum fitness goal reached, stop ga.
if ga.target_fitness_type == 'max' and ga.get_chromosome_fitness(0) >= ga.convert_fitness(ga.fitness_goal):
elif ga.target_fitness_type == 'max' and ga.get_chromosome_fitness(0) >= ga.convert_fitness(ga.fitness_goal):
return False
# If generation goal is set, check it.