Genex v0.1.1 Genex.Operators.Mutation View Source
Implementation of several population mutation methods.
Mutation takes place according to some rate. Mutation is useful for introducing novelty into the population. This ensures your solutions don't prematurely converge.
Future versions of Genex will provide the ability to define the "aggressiveness" of mutations. As of this version of Genex, mutations effect the ENTIRE chromosome.
Link to this section Summary
Functions
Perform a bit-flip mutation.
Performs a gaussian mutation.
Perform inversion mutation.
Performs Polynomial Bounded mutation.
Perform a scramble mutation.
Performs uniform integer mutation.
Link to this section Functions
bit_flip(chromosome)
View Sourcebit_flip(Genex.Chromosome.t()) :: Genex.Chromosome.t()
Perform a bit-flip mutation.
This mutation performs a binary XOR on every gene in the Chromosome.
Returns Chromosome
.
Parameters
chromosome
-Chromosome
to mutate.
gaussian(chromosome)
View Sourcegaussian(Genex.Chromosome.t()) :: Genex.Chromosome.t()
Performs a gaussian mutation.
This mutation generates a random number at random genes in the chromosome. The random number is from a normal distribution produced from the mean and variance of the genes in the chromosome.
Returns Chromosome
.
Parameters
chromosome
-Chromosome
to mutate.
invert(chromosome)
View Sourceinvert(Genex.Chromosome.t()) :: Genex.Chromosome.t()
Perform inversion mutation.
This mutation reverses (inverts) the genes of the Chromosome.
Returns Chromosome
.
Parameters
chromosome
-Chromosome
to mutate.
Performs Polynomial Bounded mutation.
See NSGA-II algorithm.
Returns Chromosome
.
Parameters
chromosome
-Chromosome
to mutate.eta
low
high
scramble(chromosome)
View Sourcescramble(Genex.Chromosome.t()) :: Genex.Chromosome.t()
Perform a scramble mutation.
This mutation shuffles the genes of the Chromosome.
Returns Chromosome
.
Parameters
chromosome
-Chromosome
to mutate.
uniform_integer(chromosome, min, max)
View Sourceuniform_integer(Genex.Chromosome.t(), integer(), integer()) :: Genex.Chromosome.t()
Performs uniform integer mutation.
This mutation generates a random number at random genes in the chromosome.
Returns Chromosome
.
Parameters
chromosome
-Chromosome
to mutate.min
- lower boundmax
- upper bound