source: framspy/evolalg_steps/population/frams_population.py @ 1290

Last change on this file since 1290 was 1185, checked in by Maciej Komosinski, 2 years ago

Renamed a module; new name is "evolalg_steps"

File size: 639 bytes
RevLine 
[1185]1from evolalg_steps.base.frams_step import FramsStep
2from evolalg_steps.base.individual import Individual
[1113]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.