Jump to content

Mutation (evolutionary algorithm): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
DGent (talk | contribs)
No edit summary
 
(35 intermediate revisions by 20 users not shown)
Line 1: Line 1:
{{Short description|Genetic operation used to add population diversity}}{{Evolutionary algorithms}}
'''Mutation''' is a [[genetic operator]] used to maintain [[genetic diversity]] from one generation of a population of [[genetic algorithm]] [[chromosome (genetic algorithm)|chromosomes]] to the next. It is analogous to biological [[mutation]]. Mutation alters one or more gene values in a chromosome from its initial state. In mutation, the solution may change entirely from the previous solution. Hence GA can come to better solution by using mutation. Mutation occurs during evolution according to a user-definable mutation probability. This probability should be set low. If it is set too high, the search will turn into a primitive random search.
'''Mutation''' is a [[genetic operator]] used to maintain [[genetic diversity]] of the [[chromosome (genetic algorithm)|chromosomes]] of a population of an [[evolutionary algorithm]] (EA), including [[genetic algorithms]] in particular. It is analogous to biological [[mutation]].


The classic example of a mutation operator involves a probability that an arbitrary [[bit]] in a [[genome (genetic algorithm)|genetic sequence]] will be changed from its original state. A common method of implementing the mutation operator involves generating a [[random variable]] for each bit in a sequence. This random variable tells whether or not a particular bit will be modified. This mutation procedure, based on the biological [[point mutation]], is called single point mutation. Other types are inversion and floating point mutation. When the gene encoding is restrictive as in permutation problems, mutations are swaps, inversions, and scrambles.
The classic example of a mutation operator of a binary coded genetic algorithm (GA) involves a probability that an arbitrary [[bit]] in a [[genome (genetic algorithm)|genetic sequence]] will be flipped from its original state. A common method of implementing the mutation operator involves generating a [[random 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 biological [[point 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 GAs is preserving and introducing diversity. Mutation should allow the algorithm to avoid [[local minimum|local minima]] by preventing the population of chromosomes from becoming too similar to each other, thus slowing or even stopping evolution. This reasoning also explains the fact that most GA systems avoid only taking the [[Fitness function|fittest]] of the population in generating the next but rather a random (or semi-random) selection with a weighting toward those that are fitter.<ref>{{cite web
The purpose of mutation in EAs is to introduce diversity into the sampled [[Population model (evolutionary algorithm)|population]]. Mutation operators are used in an attempt to avoid [[local minimum|local 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 the [[Fitness function|fittest]] 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.<ref>{{cite web
| accessdate = 2011-04-07
| accessdate = 2011-04-07
| location = http://www.obitko.com/
| publisher = Marek Obitko
| publisher = Marek Obitko
| title = XI. Crossover and Mutation
| title = XI. Crossover and Mutation
| url = http://www.obitko.com/tutorials/genetic-algorithms/crossover-mutation.php}}</ref>
| url = http://www.obitko.com/tutorials/genetic-algorithms/crossover-mutation.php}}</ref>


The following requirements apply to all mutation operators used in an EA:<ref>{{Cite book |last1=Eiben |first1=A.E. |url=http://link.springer.com/10.1007/978-3-662-44874-8 |title=Introduction to Evolutionary Computing |last2=Smith |first2=J.E. |date=2015 |publisher=Springer |isbn=978-3-662-44873-1 |series=Natural Computing Series |location=Berlin, Heidelberg |pages=31–32 |chapter=Variation Operators (Mutation and Recombination) |doi=10.1007/978-3-662-44874-8 |s2cid=20912932}}</ref><ref name=":3">{{Cite book |last1=Bäck |first1=Thomas |url=https://www.worldcat.org/oclc/45730387 |title=Evolutionary computation. Vol. 1, Basic algorithms and operators |last2=Fogel |first2=David B. |last3=Whitley |first3=Darrell |last4=Angeline |first4=Peter J. |publisher=CRC Press |year=1999 |isbn=0-585-30560-9 |editor-last=Bäck |editor-first=Thomas |location=Boca Racon |pages=237–255 |language=en |chapter=Mutation operators |oclc=45730387 |editor-last2=Fogel |editor-first2=David B. |editor-last3=Michalewicz |editor-first3=Zbigniew}}</ref>
For different genome types, different mutation types are suitable:
# every point in the search space must be reachable by one or more mutations.
# there must be no preference for parts or directions in the search space (no drift).
# small mutations should be more probable than large ones.


For different genome types, different mutation types are suitable. Some mutations are Gaussian, Uniform, Zigzag, Scramble, Insertion, Inversion, Swap, and so on.<ref>{{Citation |last=Mirjalili |first=Seyedali |title=Genetic Algorithm |date=2019 |url=https://doi.org/10.1007/978-3-319-93025-1_4 |work=Evolutionary Algorithms and Neural Networks: Theory and Applications |pages=43–55 |editor-last=Mirjalili |editor-first=Seyedali |access-date=2023-05-26 |series=Studies in Computational Intelligence |volume=780 |place=Cham |publisher=Springer International Publishing |language=en |doi=10.1007/978-3-319-93025-1_4 |isbn=978-3-319-93025-1|s2cid=242047607 }}</ref><ref>{{Cite journal |last1=Harifi |first1=Sasan |last2=Mohamaddoust |first2=Reza |date=2023-05-01 |title=Zigzag mutation: a new mutation operator to improve the genetic algorithm |url=https://doi.org/10.1007/s11042-023-15518-3 |journal=Multimedia Tools and Applications |language=en |doi=10.1007/s11042-023-15518-3 |s2cid=258446829 |issn=1573-7721}}</ref><ref>{{Cite journal |last1=Katoch |first1=Sourabh |last2=Chauhan |first2=Sumit Singh |last3=Kumar |first3=Vijay |date=2021-02-01 |title=A review on genetic algorithm: past, present, and future |url=https://doi.org/10.1007/s11042-020-10139-6 |journal=Multimedia Tools and Applications |language=en |volume=80 |issue=5 |pages=8091–8126 |doi=10.1007/s11042-020-10139-6 |issn=1573-7721 |pmc=7599983 |pmid=33162782}}</ref> An overview and more operators than those presented below can be found in the introductory book by Eiben and Smith<ref>{{Cite book |last1=Eiben |first1=A.E. |url=http://link.springer.com/10.1007/978-3-662-44874-8 |title=Introduction to Evolutionary Computing |last2=Smith |first2=J.E. |date=2015 |publisher=Springer |isbn=978-3-662-44873-1 |series=Natural Computing Series |location=Berlin, Heidelberg |pages=49–78 |chapter=Representation, Mutation, and Recombination |doi=10.1007/978-3-662-44874-8|s2cid=20912932 }}</ref> or in.<ref name=":3" /><ref name=":0">{{Cite book |last=Michalewicz |first=Zbigniew |url=http://link.springer.com/10.1007/978-3-662-02830-8 |title=Genetic Algorithms + Data Structures = Evolution Programs |date=1992 |publisher=Springer Berlin Heidelberg |isbn=978-3-662-02832-2 |series=Artificial Intelligence |location=Berlin, Heidelberg |doi=10.1007/978-3-662-02830-8 |s2cid=33272042}}</ref>
* '''Bit string mutation'''
::The mutation of bit strings ensue through bit flips at random positions.


== Bit string mutation ==
::Example:
The mutation of bit strings ensue through bit flips at random positions.
::{|

Example:
{|
|1 || 0 || 1 || 0 || 0 || 1 || 0
|1 || 0 || 1 || 0 || 0 || 1 || 0
|-
|-
Line 24: Line 29:
|}
|}


::The probability of a mutation of a bit is <math>\frac{1}{l}</math>, where <math>l</math> is the length of the binary vector. Thus, a mutation rate of <math>1</math> per mutation and individual selected for mutation is reached.
The probability of a mutation of a bit is <math>\frac{1}{l}</math>, where <math>l</math> is the length of the binary vector.<ref>{{Cite book |last1=Eshelman |first1=Larry J. |url=https://www.worldcat.org/oclc/45730387 |title=Evolutionary computation. Vol. 1, Basic algorithms and operators |publisher=CRC Press |year=1999 |isbn=0-585-30560-9 |editor-last=Bäck |editor-first=Thomas |location=Boca Racon |pages=68 |language=en |chapter=Mutation and Crossover |oclc=45730387 |editor-last2=Fogel |editor-first2=David B. |editor-last3=Michalewicz |editor-first3=Zbigniew}}</ref> Thus, a mutation rate of <math>1</math> per mutation and individual selected for mutation is reached.


== Mutation of real numbers ==
* '''Flip Bit'''
Many EAs, such as the [[evolution strategy]]<ref>{{Cite book |last=Rechenberg |first=Ingo |title=Evolutionsstrategie – Optimierung technischer Systeme nach Prinzipien der biologischen Evolution |publisher=Frommann-Holzboog |year=1973 |isbn=3-7728-0373-3 |language=de |type=PhD thesis}}</ref><ref>{{Cite book |last=Schwefel |first=Hans-Paul |title=Numerische Optimierung von Computermodellen |date=1977 |publisher=Birkhäuser Verlag. Translation: Numerical optimization of computer models, Wiley, Chichester, 1981 |isbn=0-471-09988-0 |location=Basel |language=de |trans-chapter= |type=PhD thesis |oclc=8011455}}</ref> or the real-coded [[Genetic algorithm|genetic algorithms]],<ref>{{Citation |last=Wright |first=Alden H. |title=Genetic Algorithms for Real Parameter Optimization |date=1991 |url=https://www.sciencedirect.com/science/article/pii/B9780080506845500161 |series=Foundations of Genetic Algorithms |volume=1 |pages=205–218 |editor-last=Rawlins |editor-first=Gregory J. E. |publisher=Elsevier |language=en |doi=10.1016/b978-0-08-050684-5.50016-1 |isbn=9780080506845 |access-date=2023-01-02}}</ref><ref>{{Citation |last1=Eshelman |first1=Larry J. |title=Real-Coded Genetic Algorithms and Interval-Schemata |date=1993 |url=https://linkinghub.elsevier.com/retrieve/pii/B9780080948324500180 |work=Foundations of Genetic Algorithms |volume=2 |pages=187–202 |publisher=Elsevier |language=en |doi=10.1016/b978-0-08-094832-4.50018-0 |isbn=978-0-08-094832-4 |access-date=2023-01-01 |last2=Schaffer |first2=J. David}}</ref><ref name=":0" /> work with real numbers instead of bit strings. This is due to the good experiences that have been made with this type of coding.<ref name=":0" /><ref>{{Cite journal |last1=Herrera |first1=F. |last2=Lozano |first2=M. |last3=Verdegay |first3=J.L. |date=1998 |title=Tackling Real-Coded Genetic Algorithms: Operators and Tools for Behavioural Analysis. |url=http://link.springer.com/10.1023/A:1006504901164 |journal=Artificial Intelligence Review |volume=12 |issue=4 |pages=265–319 |doi=10.1023/A:1006504901164|s2cid=6798965 }}</ref>
This mutation operator takes the chosen genome and inverts the bits

(i.e. if the genome bit is 1, it is changed to 0 and vice versa).
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 decision variables to be changed of the optimisation problem to be solved are usually limited. Accordingly, the values of the associated genes are each [[Restriction (mathematics)|restricted]] to an interval <math>[x_{\min}, x_{\max}]</math>. Mutations may or may not take these restrictions into account. In the latter case, suitable post-treatment is then required as described below.

=== Mutation without consideration of restrictions ===
[[File:Standard deviation diagram (decimal comma).svg|thumb|Example of a normally distributed random variable. Note that the given proportions of the subranges add up to 99.8 % and not 100 % due to rounding.]]
A real number <math>x</math> can be mutated using [[normal distribution]] <math>\mathcal{N}(0,\sigma)</math> by adding the generated random value to the old value of the gene, resulting in the mutated value <math>x'</math>:<blockquote><math>x' = x + \mathcal{N}(0, \sigma)</math></blockquote>In the case of genes with a restricted range of values, it is a good idea to choose the step size of the mutation <math>\sigma</math> so that it reasonably fits the range <math>[x_{\min}, x_{\max}]</math> of the gene to be changed, e.g.:<blockquote><math>\sigma = \frac{x_\text{max} - x_\text{min}}{6}</math></blockquote>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 <math>x'</math> 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 the [[Chromosome (genetic algorithm)|chromosome]] and are subject to evolution together with the actual decision variables.<ref>{{Cite book |last=Schwefel |first=Hans-Paul |url=https://www.researchgate.net/publication/220690578_Evolution_and_Optimum_Seeking |title=Evolution and optimum seeking |date=1995 |publisher=Wiley |isbn=978-0-471-57148-3 |series=Sixth-generation computer technology series |location=New York |pages=105-151 |language=en |chapter=Evolution Strategies for Numerical Optimization}}</ref><ref>{{Citation |last1=Schwefel |first1=Hans-Paul |last2=Rudolph |first2=Günter |title=Contemporary Evolution Strategies |date=1995 |work=Conf. Proc. of the Third European Conference on Artificial Life (ECAL'95) |publisher=Springer |isbn=978-3-540-59496-3 |editor-last=Morán |editor-first=F. |location=Berlin, New York |pages=893–907 |URL=https://www.researchgate.net/publication/221531222_Contemporary_Evolution_Strategies |editor-last2=Moreno |editor-first2=A. |editor-last3=Merelo |editor-first3=J.J. |editor-last4=Chacón |editor-first4=P.}}</ref>

=== Mutation with consideration of restrictions ===
One possible form of changing the value of a gene while taking its value range <math>[x_{\min}, x_{\max}]</math> into account is the mutation ''relative parameter change'' of the evolutionary algorithm GLEAM (General Learning Evolutionary Algorithm and Method),<ref>{{Citation |last1=Blume |first1=Christian |last2=Jakob |first2=Wilfried |title=GLEAM - An Evolutionary Algorithm for Planning and Control Based on Evolution Strategy |date=2002 |url=https://publikationen.bibliothek.kit.edu/170053025/3814288 |work=Conf. Proc. of Genetic and Evolutionary Computation Conference (GECCO 2002) |volume=Late Breaking Papers |pages=31–38 |access-date=2023-01-01 }}</ref> in which, as with the mutation presented earlier, small changes are more likely than large ones.
[[File:Probabilty distribution of the muatation relative parameter change.png|thumb|264x264px|Distribution of probabilities for k=10 sub-areas of the total change interval. The sub-areas each cover 1/k of the width of the total change interval.]]
First, an equally distributed decision is made as to whether the current value <math>x</math> 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 <math>[x, x_\max]</math>. It is divided into <math>k</math> sub-areas of equal size with the width <math>\delta</math>, from which <math>k</math> sub-change intervals of different size are formed:
:<math>i</math>-th sub-change interval: <math>[x, x + \delta \cdot i]</math> with
:<math>\delta = \frac{(x_\text{max} - x)}{k}</math> and <math>i = 1, \dots, k</math>
Subsequently, one of the <math>k</math> sub-change intervals is selected in equal distribution and a random number, also equally distributed, is drawn from it as the new value <math>x'</math> of the gene. The resulting summed probabilities of the sub-change intervals result in the probability distribution of the <math>k</math> sub-areas shown in the adjacent figure for the exemplary case of <math>k=10</math>. 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 <math>k</math>, 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 <math>k</math> when a gene value approaches its limits very closely.

== Mutation of permutations ==
Mutations of permutations are specially designed for genomes that are themselves [[Permutation|permutations]] of a [[Set (mathematics)|set]]. These are often used to solve combinatorial tasks.<ref name=":0" /><ref name=":1">{{Cite book |last1=Eiben |first1=A.E. |url=https://link.springer.com/10.1007/978-3-662-44874-8 |title=Introduction to Evolutionary Computing |last2=Smith |first2=J.E. |date=2015 |publisher=Springer |isbn=978-3-662-44873-1 |series=Natural Computing Series |location=Berlin, Heidelberg |pages=69–70 |language=en |chapter=Mutation for Permutation Representation |doi=10.1007/978-3-662-44874-8|s2cid=20912932 }}</ref><ref name=":2">{{Cite book |last1=Yu |first1=Xinjie |url=http://link.springer.com/10.1007/978-1-84996-129-5 |title=Introduction to Evolutionary Algorithms |last2=Gen |first2=Mitsuo |date=2010 |publisher=Springer |isbn=978-1-84996-128-8 |series=Decision Engineering |volume= |location=London |pages=286–288 |language=en |chapter=Mutation Operators |doi=10.1007/978-1-84996-129-5}}</ref> In the two mutations presented, parts of the genome are rotated or inverted.

=== Rotation to the right ===
The presentation of the procedure<ref name=":2" /> is illustrated by an example on the right:
{|
|''Procedure''
| &nbsp;&nbsp;
| ''Example''
|-
| * Let a permutation be given.
| &nbsp;&nbsp;
| <math>P_0 = \left( A,B,C,D,E,F,G \right)</math>
|-
| * Select a partial list, i.e. a start index <math>i</math> and an end index <math>j</math> in <math>P_0</math>, which are both natural numbers between 0 and <math>\left|P_0\right|-1</math>. Choose the number of positions <math>k</math> by which the partial list should be rotated, where <math>0 < k < |P_0|</math>. The start index can also be after the end index. Then the partial list simply starts again from the beginning ([[Periodic boundary conditions|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.
| &nbsp;&nbsp;
| <math>i = 5</math>, <math>j = 1</math>, <math>k = 1</math>
|-
| * Copy <math>P_0</math> to <math>P_1</math> and rotate the partial list by <math>k</math> positions to the right.
| &nbsp;&nbsp;
| <math>P_1 = \left( \underline {G,A},C,D,E,\underline {B,F} \right)</math>
|-
| * <math>P_1</math> is then the mutated genome.
| &nbsp;&nbsp;
| <math>P_1 = \left( G,A,C,D,E,B,F \right)</math>
|}

=== Inversion ===
The presentation of the procedure<ref name=":1" /> is illustrated by an example on the right:
{|
|''Procedure''
| &nbsp;&nbsp;
|''Example''
|-
| * Let a permutation be given.
| &nbsp;&nbsp;
| <math>P_0 = \left( A,B,C,D,E,F,G \right)</math>
|-
| * Select a partial list, i.e. a start index <math>i</math> and an end index <math>j</math> in <math>P_0</math>, which are both natural numbers between 0 and <math>\left|P_0\right|-1</math>, where <math>i \ne j</math>. 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 conditions|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.
| &nbsp;&nbsp;
| <math>i = 5</math>, <math>j = 1</math>
|-
| * Copy <math>P_0</math> to <math>P_1</math> and invert the partial list.
| &nbsp;&nbsp;
| <math>P_1 = \left( \underline {G,F},C,D,E,\underline {B,A} \right)</math>
|-
| * <math>P_1</math> is then the mutated genome.
| &nbsp;&nbsp;
| <math>P_1 = \left( G,F,C,D,E,B,A \right)</math>
|}


=== Variants with preference for smaller changes ===
* '''Boundary'''
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 mutation operator replaces the genome with either lower or upper bound randomly.
This can be used for integer and float genes.


This can be remedied by the following modifications. The end index <math>j</math> of the partial lists is determined as the distance <math>d</math> to the start index <math>i</math>:
* '''Non-Uniform'''
:<math>j = (i+ d) \bmod \left|P_0\right|</math>
The probability that amount of mutation will go to 0 with the next generation is increased by using non-uniform mutation operator. It keeps the population from stagnating in the early stages of the evolution. It tunes solution in later stages of evolution. This mutation operator can only be used for integer and float genes.
where <math>d</math> is determined randomly according to one of the two procedures for the mutation of real numbers from the interval <math>\left[0, \left|P_0\right| - 1\right]</math> and rounded.


For the ''rotation'', <math>k</math> is determined similarly to the distance <math>d</math>, but the value <math>0</math> is forbidden.
* '''Uniform'''
This operator replaces the value of the chosen gene with a uniform random value selected between the user-specified upper and lower bounds for that gene. This mutation operator can only be used for integer and float genes.


For the ''inversion'', note that <math>i \ne j</math> must hold, so for <math>d</math> the value <math>0</math> must be excluded.
* '''Gaussian'''
This operator adds a unit Gaussian distributed random value to the chosen gene. If it falls outside of the user-specified lower or upper bounds for that gene, the new gene value is clipped. This mutation operator can only be used for integer and float genes.


==See also==
==See also==
* [[Evolutionary algorithm]]s
* [[Genetic algorithm]]s
* [[Genetic algorithm]]s


Line 50: Line 124:


==Bibliography==
==Bibliography==
* John Holland, Adaptation in Natural and Artificial Systems, University of Michigan Press, Ann Arbor, Michigan. 1975. ISBN 0-262-58111-6.
* John Holland (1975). ''Adaptation in Natural and Artificial Systems'', PhD thesis, [[University of Michigan Press]], Ann Arbor, Michigan. {{ISBN|0-262-58111-6}}.
* {{Cite book |last=Schwefel |first=Hans-Paul |title=Evolution and Optimum Seeking |publisher=John Wiley & Sons |year=1995 |isbn=0-471-57148-2 |location=New York |language=en |URL=https://www.researchgate.net/publication/220690578_Evolution_and_Optimum_Seeking}}
* {{Cite book |last=Davis |first=Lawrence |title=Handbook of genetic algorithms |date=1991 |publisher=Van Nostrand Reinhold |isbn=0-442-00173-8 |location=New York |oclc=23081440}}
* {{Cite book |last1=Eiben |first1=A.E. |url=https://link.springer.com/10.1007/978-3-662-44874-8 |title=Introduction to Evolutionary Computing |last2=Smith |first2=J.E. |date=2015 |publisher=Springer |isbn=978-3-662-44873-1 |series=Natural Computing Series |location=Berlin, Heidelberg |language=en |doi=10.1007/978-3-662-44874-8|s2cid=20912932 }}
* {{Cite book |last1=Yu |first1=Xinjie |url=http://link.springer.com/10.1007/978-1-84996-129-5 |title=Introduction to Evolutionary Algorithms |last2=Gen |first2=Mitsuo |date=2010 |publisher=Springer |isbn=978-1-84996-128-8 |series=Decision Engineering |volume= |location=London |language=en |doi=10.1007/978-1-84996-129-5}}
* {{Cite book |last=De Jong |first=Kenneth A. |title=Evolutionary computation : a unified approach |date=2006 |publisher=MIT Press |isbn=978-0-262-25598-1 |location=Cambridge, Mass. |language=en |oclc=69652176}}
* {{Cite book |url=https://www.worldcat.org/oclc/45730387 |title=Evolutionary computation. Vol. 1, Basic algorithms and operators |date=1999 |publisher=Institute of Physics Pub |isbn=0-585-30560-9 |editor-last=Fogel |editor-first=David B. |location=Bristol |oclc=45730387 |editor-last2=Bäck |editor-first2=Thomas |editor-last3=Michalewicz |editor-first3=Zbigniew}}


{{DEFAULTSORT:Mutation (Genetic Algorithm)}}
{{DEFAULTSORT:Mutation (Genetic Algorithm)}}
{{Evolutionary computation}}
[[Category:Genetic algorithms]]
[[Category:Evolutionary algorithms|+]]

Latest revision as of 10:10, 27 December 2024

Mutation is a genetic operator used to maintain genetic diversity of the chromosomes of a population of an evolutionary algorithm (EA), including genetic algorithms in particular. It is analogous to biological mutation.

The classic example of a mutation operator of a binary coded genetic algorithm (GA) involves a probability that an arbitrary bit in a genetic sequence will be flipped from its original state. A common method of implementing the mutation operator involves generating a random 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 biological point 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 sampled population. Mutation operators are used in an attempt to avoid local 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 the fittest 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]

  1. every point in the search space must be reachable by one or more mutations.
  2. there must be no preference for parts or directions in the search space (no drift).
  3. small mutations should be more probable than large ones.

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]

Bit string mutation

[edit]

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.

Mutation of real numbers

[edit]

Many EAs, such as the evolution strategy[10][11] or the real-coded genetic 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 decision variables to be changed of the optimisation problem to be solved are usually limited. Accordingly, the values of the associated genes are each restricted 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.

Mutation without consideration of restrictions

[edit]
Example of a normally distributed random variable. Note that the given proportions of the subranges add up to 99.8 % and not 100 % due to rounding.

A real number can be mutated using normal 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 the chromosome and are subject to evolution together with the actual decision variables.[15][16]

Mutation with consideration of restrictions

[edit]

One possible form of changing the value of a gene while taking its value range into account is the mutation relative 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.

Distribution of probabilities for k=10 sub-areas of the total change interval. The sub-areas each cover 1/k of the width of the total change interval.

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:

-th sub-change interval: with
and

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.

Mutation of permutations

[edit]

Mutations of permutations are specially designed for genomes that are themselves permutations of a set. These are often used to solve combinatorial tasks.[8][18][19] In the two mutations presented, parts of the genome are rotated or inverted.

Rotation to the right

[edit]

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.   

Inversion

[edit]

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.   

Variants with preference for smaller changes

[edit]

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 the rotation, is determined similarly to the distance , but the value is forbidden.

For the inversion, note that must hold, so for the value must be excluded.

See also

[edit]

References

[edit]
  1. ^ "XI. Crossover and Mutation". Marek Obitko. Retrieved 2011-04-07.
  2. ^ Eiben, A.E.; Smith, J.E. (2015). "Variation Operators (Mutation and Recombination)". Introduction to Evolutionary Computing. Natural Computing Series. Berlin, Heidelberg: Springer. pp. 31–32. doi:10.1007/978-3-662-44874-8. ISBN 978-3-662-44873-1. S2CID 20912932.
  3. ^ a b Bäck, Thomas; Fogel, David B.; Whitley, Darrell; Angeline, Peter J. (1999). "Mutation operators". In Bäck, Thomas; Fogel, David B.; Michalewicz, Zbigniew (eds.). Evolutionary computation. Vol. 1, Basic algorithms and operators. Boca Racon: CRC Press. pp. 237–255. ISBN 0-585-30560-9. OCLC 45730387.
  4. ^ Mirjalili, Seyedali (2019), Mirjalili, Seyedali (ed.), "Genetic Algorithm", Evolutionary Algorithms and Neural Networks: Theory and Applications, Studies in Computational Intelligence, vol. 780, Cham: Springer International Publishing, pp. 43–55, doi:10.1007/978-3-319-93025-1_4, ISBN 978-3-319-93025-1, S2CID 242047607, retrieved 2023-05-26
  5. ^ Harifi, Sasan; Mohamaddoust, Reza (2023-05-01). "Zigzag mutation: a new mutation operator to improve the genetic algorithm". Multimedia Tools and Applications. doi:10.1007/s11042-023-15518-3. ISSN 1573-7721. S2CID 258446829.
  6. ^ Katoch, Sourabh; Chauhan, Sumit Singh; Kumar, Vijay (2021-02-01). "A review on genetic algorithm: past, present, and future". Multimedia Tools and Applications. 80 (5): 8091–8126. doi:10.1007/s11042-020-10139-6. ISSN 1573-7721. PMC 7599983. PMID 33162782.
  7. ^ Eiben, A.E.; Smith, J.E. (2015). "Representation, Mutation, and Recombination". Introduction to Evolutionary Computing. Natural Computing Series. Berlin, Heidelberg: Springer. pp. 49–78. doi:10.1007/978-3-662-44874-8. ISBN 978-3-662-44873-1. S2CID 20912932.
  8. ^ a b c d Michalewicz, Zbigniew (1992). Genetic Algorithms + Data Structures = Evolution Programs. Artificial Intelligence. Berlin, Heidelberg: Springer Berlin Heidelberg. doi:10.1007/978-3-662-02830-8. ISBN 978-3-662-02832-2. S2CID 33272042.
  9. ^ Eshelman, Larry J. (1999). "Mutation and Crossover". In Bäck, Thomas; Fogel, David B.; Michalewicz, Zbigniew (eds.). Evolutionary computation. Vol. 1, Basic algorithms and operators. Boca Racon: CRC Press. p. 68. ISBN 0-585-30560-9. OCLC 45730387.
  10. ^ Rechenberg, Ingo (1973). Evolutionsstrategie – Optimierung technischer Systeme nach Prinzipien der biologischen Evolution (PhD thesis) (in German). Frommann-Holzboog. ISBN 3-7728-0373-3.
  11. ^ Schwefel, Hans-Paul (1977). Numerische Optimierung von Computermodellen (PhD thesis) (in German). Basel: Birkhäuser Verlag. Translation: Numerical optimization of computer models, Wiley, Chichester, 1981. ISBN 0-471-09988-0. OCLC 8011455.
  12. ^ Wright, Alden H. (1991), Rawlins, Gregory J. E. (ed.), Genetic Algorithms for Real Parameter Optimization, Foundations of Genetic Algorithms, vol. 1, Elsevier, pp. 205–218, doi:10.1016/b978-0-08-050684-5.50016-1, ISBN 9780080506845, retrieved 2023-01-02
  13. ^ Eshelman, Larry J.; Schaffer, J. David (1993), "Real-Coded Genetic Algorithms and Interval-Schemata", Foundations of Genetic Algorithms, vol. 2, Elsevier, pp. 187–202, doi:10.1016/b978-0-08-094832-4.50018-0, ISBN 978-0-08-094832-4, retrieved 2023-01-01
  14. ^ Herrera, F.; Lozano, M.; Verdegay, J.L. (1998). "Tackling Real-Coded Genetic Algorithms: Operators and Tools for Behavioural Analysis". Artificial Intelligence Review. 12 (4): 265–319. doi:10.1023/A:1006504901164. S2CID 6798965.
  15. ^ Schwefel, Hans-Paul (1995). "Evolution Strategies for Numerical Optimization". Evolution and optimum seeking. Sixth-generation computer technology series. New York: Wiley. pp. 105–151. ISBN 978-0-471-57148-3.
  16. ^ Schwefel, Hans-Paul; Rudolph, Günter (1995), Morán, F.; Moreno, A.; Merelo, J.J.; Chacón, P. (eds.), "Contemporary Evolution Strategies", Conf. Proc. of the Third European Conference on Artificial Life (ECAL'95), Berlin, New York: Springer, pp. 893–907, ISBN 978-3-540-59496-3
  17. ^ Blume, Christian; Jakob, Wilfried (2002), "GLEAM - An Evolutionary Algorithm for Planning and Control Based on Evolution Strategy", Conf. Proc. of Genetic and Evolutionary Computation Conference (GECCO 2002), vol. Late Breaking Papers, pp. 31–38, retrieved 2023-01-01
  18. ^ a b Eiben, A.E.; Smith, J.E. (2015). "Mutation for Permutation Representation". Introduction to Evolutionary Computing. Natural Computing Series. Berlin, Heidelberg: Springer. pp. 69–70. doi:10.1007/978-3-662-44874-8. ISBN 978-3-662-44873-1. S2CID 20912932.
  19. ^ a b Yu, Xinjie; Gen, Mitsuo (2010). "Mutation Operators". Introduction to Evolutionary Algorithms. Decision Engineering. London: Springer. pp. 286–288. doi:10.1007/978-1-84996-129-5. ISBN 978-1-84996-128-8.

Bibliography

[edit]