Last change
on this file since 1139 was
1139,
checked in by Maciej Komosinski, 4 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
|
Line | |
---|
1 | from evolalg.base.frams_step import FramsStep |
---|
2 | from evolalg.base.individual import Individual |
---|
3 | |
---|
4 | |
---|
5 | class FramsPopulation(FramsStep): |
---|
6 | def __init__(self, frams_lib, genetic_format, pop_size, commands=None, *args, **kwargs): |
---|
7 | |
---|
8 | if commands is None: |
---|
9 | commands = [] |
---|
10 | super().__init__(frams_lib, commands,*args, **kwargs) |
---|
11 | |
---|
12 | self.pop_size = pop_size |
---|
13 | self.genetic_format = genetic_format |
---|
14 | |
---|
15 | def call(self, population, *args, **kwargs): |
---|
16 | super(FramsPopulation, self).call(population) |
---|
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.