source: framspy/evolalg/base/ @ 1139

Last change on this file since 1139 was 1139, checked in by Maciej Komosinski, 3 years ago

Added --debug mode that prints names of steps; final multiple evaluation now evaluates genotypes in hall of fame instead of the last population

File size: 748 bytes
1from evolalg.base.step import Step
4class FramsStep(Step):
5    def __init__(self, frams_lib, commands=None, *args, **kwargs):
6        super(FramsStep, self).__init__(*args, **kwargs)
7        if commands is None:
8            commands = []
9        self.frams = frams_lib
10        self.commands = commands
12    def pre(self):
13        for c in self.commands:
14            self.frams.sendDirectCommand(c) #TODO update to use FramsticksLib when needed, pass lambda, import frams module? Maybe pre-lambda returns old value, post-lambda restores what pre-lambda returned. Or pass ExtValue or list of ExtValues and their new values (and either caller saves original values to be restored, or pre() returns a list of original values to be restored in post())
Note: See TracBrowser for help on using the repository browser.