diff options
author | Yuheng Long <yuhenglong@google.com> | 2013-06-03 18:46:00 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-06-10 20:21:38 -0700 |
commit | f20cffac082e3d920818f230ffc80ae6976267c0 (patch) | |
tree | d1375d3dd7b0a32be97bd179f8fab7ab3e096473 /bestflags/steering.py | |
parent | 8cdaddf7ec91520a0bfbdf9da73056f255f67824 (diff) | |
download | toolchain-utils-f20cffac082e3d920818f230ffc80ae6976267c0.tar.gz |
Added the skeleton for the flagging framework.
BUG=None
TEST=None
Change-Id: I72c37ac70ed2adca588ad9866a6bcc26775aed8b
Reviewed-on: https://gerrit-int.chromium.org/39096
Reviewed-by: Luis Lozano <llozano@chromium.org>
Tested-by: Yuheng Long <yuhenglong@google.com>
Commit-Queue: Yuheng Long <yuhenglong@google.com>
Diffstat (limited to 'bestflags/steering.py')
-rw-r--r-- | bestflags/steering.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bestflags/steering.py b/bestflags/steering.py new file mode 100644 index 00000000..7d9064b5 --- /dev/null +++ b/bestflags/steering.py @@ -0,0 +1,25 @@ +"""A Genetic Algorithm implementation for selecting good flags.""" + +__author__ = 'yuhenglong@google.com (Yuheng Long)' + + +class Steering(object): + """The steering algorithm that produce the next generation to be run.""" + + def __init__(self, steps): + """Set up the number of steps generations this algorithm should evolve. + + Args: + steps: number of steps that the feed back loop should perform + """ + + self._steps = steps + + def run(self, generation): + """Generate a set of new generations for the next round of execution. + + Args: + generation: the previous generation. + """ + + pass |