steering.py revision 49358b75c25a44760e884245440dc96e55812d04
1"""A Genetic Algorithm implementation for selecting good flags.
2
3Part of the Chrome build flags optimization.
4"""
5
6__author__ = 'yuhenglong@google.com (Yuheng Long)'
7
8
9class Steering(object):
10  """The steering algorithm that produce the next generation to be run."""
11
12  def __init__(self, steps):
13    """Set up the number of steps generations this algorithm should evolve.
14
15    Args:
16      steps: number of steps that the feed back loop should perform
17    """
18
19    self._steps = steps
20
21  def run(self, generation):
22    """Generate a set of new generations for the next round of execution.
23
24    Args:
25      generation: the previous generation.
26    """
27
28    pass
29