diff options
Diffstat (limited to 'bestflags/genetic_algorithm.py')
-rw-r--r-- | bestflags/genetic_algorithm.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bestflags/genetic_algorithm.py b/bestflags/genetic_algorithm.py index 56b1dcc1..0e7de07f 100644 --- a/bestflags/genetic_algorithm.py +++ b/bestflags/genetic_algorithm.py @@ -200,7 +200,7 @@ class GAGeneration(Generation): Generation.__init__(self, tasks, parents) self._total_stucks = total_stucks - def Improve(self): + def Improved(self): """True if this generation has improvement upon its parent generation.""" tasks = self.Pool() @@ -216,7 +216,7 @@ class GAGeneration(Generation): best_current = sorted(tasks, key=lambda task: task.GetTestResult())[0] # At least one task has improvement. - if best_current.Improve(best_parent): + if best_current.Improved(best_parent): self._total_stucks = 0 return True |