alogos.systems.whge.mutation
¶
Mutation functions for WHGE.
Functions¶
|
Mutate a genotype by random bit flips with a certain probability. |
|
Mutate a genotype by n random bit flips. |
Detailed object descriptions¶
- alogos.systems.whge.mutation.bit_flip_by_probability(grammar, genotype, parameters=None)[source]¶
Mutate a genotype by random bit flips with a certain probability.
The probability for a bit flip is considered independently for each position in the genotype, regardless of the genotype length.
Caution: Mutation is performed in-place for performance reasons, which means that the provided genotype is modified. If this is not desired, a copy needs to be made beforehand.
- Parameters:
grammar (
Grammar
)genotype (
Genotype
)parameters (
dict
orParameterCollection
, optional) – Following keyword-value pairs are considered by this function:mutation_bit_flip_probability
(int
) : Probability of changing a bit.
References
Medvet in 2017: Hierarchical Grammatical Evolution
p. 250: “we performed 30 independent executions of the evolutionary search […] with the following evolution parameters: […] bit flip mutation with p_mut = 0.01 and 0.2 rate”
Bartoli, Castelli, Medvet in 2018: Weighted Hierarchical Grammatical Evolution
7, Table 1: “Mutation op. bit flip w. p_mut = 0.01”
Reference implementation in Java: evolved-ge
-
The algorithm loops over each bit of the genotype, in each run generating a random number between 0.0 and 1.0 and if it is smaller than p_mut the current bit is flipped.
-
Using
ProbabilisticMutation
with p_mut 0.01 and rate 0.2:DeepExperimenter.java
,DeepDistributedExperimenter.java
,GOM.java
,MapperGenerationExperimenter.java
,MapperGenerationDistributedExperimenter.java
-