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

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

Renamed a module; new name is "evolalg_steps"

File size: 838 bytes
RevLine 
[1113]1from typing import Dict, List
2
[1185]3from evolalg_steps.base.individual import Individual
4from evolalg_steps.fitness.fitness_step import FitnessStep
[1113]5import copy
6
7class MultipleEvaluationFitness(FitnessStep):
8    def __init__(self, frams_lib, fields: Dict, fields_defaults: Dict, commands: List[str] = None,
[1139]9                 vectorized: bool = True, number_evaluations = 10, *args, **kwargs):
10        super().__init__(frams_lib, fields, fields_defaults, commands, vectorized, *args, **kwargs)
[1113]11        self.number_evaluations = number_evaluations
12
13
14    def call(self, population: List[Individual]):
[1139]15        super(MultipleEvaluationFitness, self).call(population)
[1113]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.