1 #ifndef GRAIL_MUTATION_H
2 #define GRAIL_MUTATION_H
16 enum class MutationSelectionType
25 Mutation(
double mutationPhaseRate = 1.0,
26 double mutateIndividualRate = 0.09,
27 double mutateChromosomeRate = 0.5,
28 bool mutateBothParentsAndChildren =
true,
29 std::mt19937_64::result_type seed = std::random_device{}());
33 virtual void Perform(
const std::vector<std::unique_ptr<EvoScript>>& parentPopulation,
34 const std::vector<std::unique_ptr<EvoScript>>& childrenPopulation);
36 std::vector<std::unique_ptr<EvoScript>> populationAfter{};
52 MutationSelectionType RandomResolutionTypeForIndividual = MutationSelectionType::SELECT_P_OF_N;
53 MutationSelectionType RandomResolutionTypeForChromosome = MutationSelectionType::SELECT_P_OF_N;
56 std::mt19937_64 randGen;
58 virtual void MutateIndividual(
EvoScript& individual);
63 #endif /// GRAIL_MUTATION