17 #include <core/darwin.h> 18 #include <core/utils.h> 22 class GenotypeFactory {
24 virtual ~GenotypeFactory() =
default;
26 virtual void createPrimordialSeed() = 0;
27 virtual void replicate(
int parent_index) = 0;
28 virtual void crossover(
int parent1,
int parent2,
float preference) = 0;
29 virtual void mutate() = 0;
32 class GenerationFactory {
34 virtual ~GenerationFactory() =
default;
36 virtual size_t size()
const = 0;
37 virtual GenotypeFactory* operator[](
size_t index) = 0;
A population implementation encapsulates the fixed-size set of genotypes, together with the rules for...
Definition: darwin.h:161
virtual void createNextGeneration(GenerationFactory *next_generation)=0
Create a new generation of genotypes.
Definition: cgp_islands_selection.cpp:26
Selection Algorithm interface.
Definition: selection_algorithm.h:41
virtual void newPopulation(darwin::Population *population)=0
Prepare the selection for a new population.
Classes derived from this are not copyable or movable.
Definition: utils.h:69