Mutation operators

Mutation operators (a.k.a. mutators) work on a single individual and return a copy. Some of them have parameters to control how the mutation is performed, and are dependent on both the data contained in an individual and its representation.

Currently, mutation is only implemented for vector individuals.

Selecting a mutation operator

Deprecated from EvoLP 1.4

All mutation operators have been renamed to mutators since EvoLP 1.4. The old names will be deprecated in a future major release. Be sure to check the new type ontology.

EvoLP provides many built-in mutators.

For binary vectors

For continuous vectors

For permutation-based vectors

Performing the mutation

After "instantiating" a mutation method, you can use mutate on a single individual ind. All operators return a copy, and in the process no individual is modified.

EvoLP.mutateFunction
mutate(M::BitwiseMutator, ind)

Randomly flips each bit with a probability λ.

source
mutate(M::GaussianMutator, ind)

Randomly add Gaussian noise to the ind candidate solution, with a standard deviation of σ.

source
mutate(::SwapMutator, ind)

Randomly swap the position of two alleles in the ind candidate solution.

source
mutate(::InsertionMutator, ind)

Randomly choose two positions a and b from ind, insert at a+1 the element at position b`, and shift the rest of the elements.

source
mutate(::ScrambleMutator, ind)

Randomly scramble the subsequence between two random points in ind.

source
mutate(::InversionMutator, ind)

Invert the subsequence between two random points in ind.

source