Line | |
---|
1 | from typing import Dict, List |
---|
2 | |
---|
3 | from evolalg.base.individual import Individual |
---|
4 | from evolalg.fitness.fitness_step import FitnessStep |
---|
5 | import copy |
---|
6 | |
---|
7 | class MultipleEvaluationFitness(FitnessStep): |
---|
8 | def __init__(self, frams_lib, fields: Dict, fields_defaults: Dict, commands: List[str] = None, |
---|
9 | vectorized: bool = True, number_evaluations = 10): |
---|
10 | super().__init__(frams_lib, fields, fields_defaults, commands, vectorized) |
---|
11 | self.number_evaluations = number_evaluations |
---|
12 | |
---|
13 | |
---|
14 | def call(self, population: List[Individual]): |
---|
15 | pop = copy.deepcopy(population) |
---|
16 | statistics = [{} for _ in range(len(population))] |
---|
17 | for _ in self.number_evaluations: |
---|
18 | pass |
---|
19 | return population |
---|
Note: See
TracBrowser
for help on using the repository browser.