| Part ofa series on the |
| Evolutionary algorithm |
|---|
| Genetic algorithm (GA) |
| Genetic programming (GP) |
| Differential evolution |
| Evolution strategy |
| Evolutionary programming |
| Related topics |
Mutation is agenetic operator used to maintaingenetic diversity of thechromosomes of a population of anevolutionary algorithm (EA), includinggenetic algorithms in particular. It is analogous to biologicalmutation.
The classic example of a mutation operator of a binary coded genetic algorithm (GA) involves a probability that an arbitrarybit in agenetic sequence will be flipped from its original state. A common method of implementing the mutation operator involves generating arandom variable for each bit in a sequence. This random variable tells whether or not a particular bit will be flipped. This mutation procedure, based on the biologicalpoint mutation, is called single point mutation. Other types of mutation operators are commonly used for representations other than binary, such as floating-point encodings or representations for combinatorial problems.
The purpose of mutation in EAs is to introduce diversity into the sampledpopulation. Mutation operators are used in an attempt to avoidlocal minima by preventing the population of chromosomes from becoming too similar to each other, thus slowing or even stopping convergence to the global optimum. This reasoning also leads most EAs to avoid only taking thefittest of the population in generating the next generation, but rather selecting a random (or semi-random) set with a weighting toward those that are fitter.[1]
The following requirements apply to all mutation operators used in an EA:[2][3]
For different genome types, different mutation types are suitable. Some mutations are Gaussian, Uniform, Zigzag, Scramble, Insertion, Inversion, Swap, and so on.[4][5][6] An overview and more operators than those presented below can be found in the introductory book by Eiben and Smith[7] or in.[3][8]
The mutation of bit strings ensue through bit flips at random positions.
Example:
| 1 | 0 | 1 | 0 | 0 | 1 | 0 |
| ↓ | ||||||
| 1 | 0 | 1 | 0 | 1 | 1 | 0 |
The probability of a mutation of a bit is, where is the length of the binary vector.[9] Thus, a mutation rate of per mutation and individual selected for mutation is reached.
Many EAs, such as theevolution strategy[10][11] or the real-codedgenetic algorithms,[12][13][8] work with real numbers instead of bit strings. This is due to the good experiences that have been made with this type of coding.[8][14]
The value of a real-valued gene can either be changed or redetermined. A mutation that implements the latter should only ever be used in conjunction with the value-changing mutations and then only with comparatively low probability, as it can lead to large changes.
In practical applications, the respective value range of the decision variables to be changed of the optimisation problem to be solved is usually limited. Accordingly, the values of the associated genes are eachrestricted to an interval. Mutations may or may not take these restrictions into account. In the latter case, suitable post-treatment is then required as described below.

A real number can be mutated usingnormal distribution by adding the generated random value to the old value of the gene, resulting in the mutated value:
In the case of genes with a restricted range of values, it is a good idea to choose the step size of the mutation so that it reasonably fits the range of the gene to be changed, e.g.:
The step size can also be adjusted to the smaller permissible change range depending on the current value. In any case, however, it is likely that the new value of the gene will be outside the permissible range of values. Such a case must be considered a lethal mutation, since the obvious repair by using the respective violated limit as the new value of the gene would lead to a drift. This is because the limit value would then be selected with the entire probability of the values beyond the limit of the value range.
The evolution strategy works with real numbers and mutation based on normal distribution. The step sizes are part of thechromosome and are subject to evolution together with the actual decision variables.[15][16]
One possible form of changing the value of a gene while taking its value range into account is the mutationrelative parameter change of the evolutionary algorithm GLEAM (General Learning Evolutionary Algorithm and Method),[17] in which, as with the mutation presented earlier, small changes are more likely than large ones.

First, an equally distributed decision is made as to whether the current value should be increased or decreased and then the corresponding total change interval is determined.Without loss of generality, an increase is assumed for the explanation and the total change interval is then. It is divided into sub-areas of equal size with the width, from which sub-change intervals of different size are formed:
Subsequently, one of the sub-change intervals is selected in equal distribution and a random number, also equally distributed, is drawn from it as the new value of the gene. The resulting summed probabilities of the sub-change intervals result in the probability distribution of the sub-areas shown in the adjacent figure for the exemplary case of. This is not a normal distribution as before, but this distribution also clearly favours small changes over larger ones.
This mutation for larger values of, such as 10, is less well suited for tasks where the optimum lies on one of the value range boundaries. This can be remedied by significantly reducing when a gene value approaches its limits very closely.
For both mutation operators for real-valued numbers, the probability of an increase and decrease is independent of the current value and is 50% in each case. In addition, small changes are considerably more likely than large ones. Formixed-integer optimization problems, rounding is usually used.
Mutations of permutations are specially designed for genomes that are themselvespermutations of aset. These are often used to solve combinatorial tasks.[8][18][19] In the two mutations presented, parts of the genome are rotated or inverted.
The presentation of the procedure[19] is illustrated by an example on the right:
| Procedure | Example | |
| * Let a permutation be given. | ||
| * Select a partial list, i.e. a start index and an end index in, which are both natural numbers between 0 and. Choose the number of positions by which the partial list should be rotated, where. The start index can also be after the end index. Then the partial list simply starts again from the beginning (periodic boundary condition). This is necessary so that the permutation probability in the genome is the same everywhere and is not greater in the middle than at the edges. | ,, | |
| * Copy to and rotate the partial list by positions to the right. | ||
| * is then the mutated genome. |
The presentation of the procedure[18] is illustrated by an example on the right:
| Procedure | Example | |
| * Let a permutation be given. | ||
| * Select a partial list, i.e. a start index and an end index in, which are both natural numbers between 0 and, where. This condition causes the mutation to always produce a genotypically altered chromosome. The start index can also be after the end index. Then the partial list simply starts again from the beginning (periodic boundary condition). This is necessary so that the permutation probability in the genome is the same everywhere and is not greater in the middle than at the edges. | , | |
| * Copy to and invert the partial list. | ||
| * is then the mutated genome. |
The requirement raised at the beginning for mutations, according to which small changes should be more probable than large ones, is only inadequately fulfilled by the two permutation mutations presented, since the lengths of the partial lists and the number of shift positions are determined in an equally distributed manner. However, the longer the partial list and the shift, the greater the change in gene order.
This can be remedied by the following modifications. The end index of the partial lists is determined as the distance to the start index:
where is determined randomly according to one of the two procedures for the mutation of real numbers from the interval and rounded.
For therotation, is determined similarly to the distance, but the value is forbidden.
For theinversion, note that must hold, so for the value must be excluded.
{{citation}}: CS1 maint: work parameter with ISBN (link){{citation}}: CS1 maint: work parameter with ISBN (link){{citation}}: CS1 maint: work parameter with ISBN (link)