source: framspy/evolalg/fitness/multiple_evaluations.py @ 1113

Last change on this file since 1113 was 1113, checked in by Maciej Komosinski, 3 years ago

Added a framework for evolutionary algorithms cooperating with FramsticksLib?.py

File size: 728 bytes
Line 
1from typing import Dict, List
2
3from evolalg.base.individual import Individual
4from evolalg.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):
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.