source: framspy/evolalg/population/frams_population.py @ 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: 627 bytes
RevLine 
[1113]1from evolalg.base.frams_step import FramsStep
2from evolalg.base.individual import Individual
3
4
5class FramsPopulation(FramsStep):
[1139]6    def __init__(self, frams_lib, genetic_format, pop_size, commands=None, *args, **kwargs):
7
[1113]8        if commands is None:
9            commands = []
[1139]10        super().__init__(frams_lib, commands,*args, **kwargs)
[1113]11
12        self.pop_size = pop_size
13        self.genetic_format = genetic_format
14
[1139]15    def call(self, population, *args, **kwargs):
16        super(FramsPopulation, self).call(population)
[1113]17        return [Individual(self.frams.getSimplest(self.genetic_format)) for _ in range(self.pop_size)]
18
Note: See TracBrowser for help on using the repository browser.