Add more examples for better documentation.
BUG=None
TEST=unit testings for the pipeline stage, pipeline workers, generation,
steering, task, flag and hill climbing.
Change-Id: I1f8f361388d3c3171a7135d1d0ef38ee5f695829
Reviewed-on: https://gerrit-int.chromium.org/42584
Reviewed-by: Luis Lozano <llozano@chromium.org>
Commit-Queue: Yuheng Long <yuhenglong@google.com>
Tested-by: Yuheng Long <yuhenglong@google.com>
diff --git a/bestflags/genetic_algorithm.py b/bestflags/genetic_algorithm.py
index 56b1dcc..0e7de07 100644
--- a/bestflags/genetic_algorithm.py
+++ b/bestflags/genetic_algorithm.py
@@ -200,7 +200,7 @@
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 @@
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