Mutation

Mutation methods introduce random changes to chromosomes, helping to maintain diversity and explore new possibilities in optimization algorithms.

GeneticAlgorithms.RealGeneMutationType
RealGeneMutation(mutation_rate::Float64, mutation_interval::Tuple{T,T})

Defines the mutation of genes of real values.

Currently only Float64 and Integer types (including Bool) are supported. Mutation is applied for each gene on its own with probability mutation_rate. On mutation a value from the uniform distribution in the interval mutation_interval is drawn and added to the gene. Boolian genes are inverted.

source
GeneticAlgorithms.RealGeneMutationMethod
(c::RealGeneMutation{T})(chromosome::Chromosome{T})::Chromosome{T} where {T<:Bool}

Applies the mutation to the given chromosome if the chromosome is of type Bool.

source
GeneticAlgorithms.RealGeneMutationMethod
(c::RealGeneMutation{T})(chromosome::Chromosome{T})::Chromosome{T} where {T<:Float64}

Applies the mutation to the given chromosome if the chromosome is of type Float64.

source
GeneticAlgorithms.RealGeneMutationMethod
(c::RealGeneMutation{T})(chromosome::Chromosome{T})::Chromosome{T} where {T<:Integer}

Applies the mutation to the given chromosome if the chromosome is of type Integer.

source
GeneticAlgorithms.SudokuMutationType
SudokuMutation(mutation_rate::Float64, initial::Vector{Vector{Int64}})

Mutation method for Sudoku puzzles.

The mutation is applied column-wise with probability mutation_rate. initial contains the initial sudoku grid and must be of size 9x9. The mutation ensures that the initial cells of initial are not changed and the remaining values are shuffled.

source