source: framspy/evolalg_steps/fitness/multiple_evaluations.py @ 1201

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

Renamed a module; new name is "evolalg_steps"

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