aboutsummaryrefslogtreecommitdiff
path: root/bestflags/hill_climb_best_neighbor.py
diff options
context:
space:
mode:
Diffstat (limited to 'bestflags/hill_climb_best_neighbor.py')
-rw-r--r--bestflags/hill_climb_best_neighbor.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bestflags/hill_climb_best_neighbor.py b/bestflags/hill_climb_best_neighbor.py
index 409b42c9..4f59bca3 100644
--- a/bestflags/hill_climb_best_neighbor.py
+++ b/bestflags/hill_climb_best_neighbor.py
@@ -41,6 +41,12 @@ class HillClimbingBestBranch(Generation):
Generation.__init__(self, exe_set, parents)
self._specs = specs
+ # This variable will be used, by the Next method, to generate the tasks for
+ # the next iteration. This self._next_task contains the best task in the
+ # current iteration and it will be set by the IsImproved method. The tasks
+ # of the next iteration are the neighbor of self._next_task.
+ self._next_task = None
+
def IsImproved(self):
"""True if this generation has improvement over its parent generation.