Heuristics: Genetic Algorithm 2: Unterschied zwischen den Versionen

Aus Operations-Research-Wiki
Wechseln zu: Navigation, Suche
[unmarkierte Version][unmarkierte Version]
(Introduction)
Zeile 17: Zeile 17:
 
<math>s_6=0100110000 \qquad \color{red}f(s_6)=3</math>
 
<math>s_6=0100110000 \qquad \color{red}f(s_6)=3</math>
  
        <math>\color{red}\sum_{i=1}^{6}f(s_i)=34</math>
+
<math>\color{red}\sum_{i=1}^{6}f(s_i)=34</math>
 +
 
 +
       
 +
 
 +
The new population after performing selection:
 +
 
 +
<math>s_1'=1111010101 \quad(s_1)</math>
 +
 
 +
<math>s_2'=1110110101 \quad(s_3)</math>
 +
 
 +
<math>s_3'=1110111101 \quad(s_5)</math>
 +
 
 +
<math>s_4'=0111000101 \quad(s_2)</math>
 +
 
 +
<math>s_5'=0100010011 \quad(s_4)</math>
 +
 
 +
<math>s_6'=1110111101 \quad(s_5)</math>
 +
 
 +
We only perform a crossover for the pairs <math>(s_1',s_2')</math> and <math>(s_5',s_6')</math>
 +
 
 +
Crossover-points: 2 and 5
 +
 
 +
Before crossover:
 +
 
 +
<math>s_1'=11\color{green}11010101 \color{black}\qquad s_5'=01000\color{green}10011</math>
 +
 
 +
<math>s_2'=11\color{red}10110101 \color{black}\qquad s_6'=11101\color{red}11101</math>
 +
 
 +
After crossover:
 +
 
 +
<math>s_1''=11\color{red}10110101 \color{black}\qquad s_5''=01000\color{red}11101</math>
 +
 
 +
<math>s_2''=11\color{green}11010101 \color{black}\qquad s_6''=11101\color{green}10011</math>
 +
 
 +
Before applying mutation:
 +
 
 +
<math>s_1''=11101\color{red}1\color{black}0101 \qquad s_2''=1111\color{red}0\color{black}1010\color{red}1</math>
 +
 
 +
<math>s_3''=11101\color{red}1\color{black}11\color{red}0\color{black}1 \qquad s_4''=0111000101</math>
 +
 
 +
<math>s_5''=0100011101 \qquad s_6''=11101100\color{red}1\color{black}1</math>
 +
 
 +
After applying mutation:
 +
 
 +
<math>s_1'''=11101\color{red}0\color{black}0101 \qquad s_2'''=1111\color{red}1\color{black}1010\color{red}0</math>
 +
 
 +
<math>s_3'''=11101\color{red}0\color{black}11\color{red}1\color{black}1 \qquad s_4'''=0111000101</math>
 +
 
 +
<math>s_5'''=0100011101 \qquad s_6'''=11101100\color{red}0\color{black}1</math>
 +
 
 +
<math>s_1'''=11101\color{red}0\color{black}0101 \qquad f(s_1''')=6</math>
 +
 
 +
<math>s_2'''=1111\color{red}1\color{black}1010\color{red}0 \color{black}\qquad f(s_2''')=7</math>
 +
 
 +
<math>s_3'''=11101\color{red}0\color{black}11\color{red}1\color{black}1 \qquad f(s_3''')=8</math>
 +
 
 +
<math>s_4'''=0111000101 \qquad f(s_4''')=5</math>
 +
 
 +
<math>s_5'''=0100011101 \qquad f(s_5''')=5</math>
 +
 
 +
<math>s_6'''=11101100\color{red}0\color{black}1 \qquad f(s_6''')=6</math>
 +
 
 +
<math>\sum_{i=1}^{6}f(s_i''')=37</math>
 +
 
 +
 
 +
Improvement of 9 percent

Version vom 24. Juni 2013, 21:35 Uhr


Inhaltsverzeichnis

Introduction

We toss a fair coin 60 times and get the following initial population:

Fehler beim Parsen (http://mathoid.testme.wmflabs.org Serverantwort ist ungültiges JSON.): \color{red}\sum_{i=1}^{6}f(s_i)=34



The new population after performing selection:

We only perform a crossover for the pairs and

Crossover-points: 2 and 5

Before crossover:

After crossover:

Before applying mutation:

After applying mutation:

Fehler beim Parsen (http://mathoid.testme.wmflabs.org Serverantwort ist ungültiges JSON.): \sum_{i=1}^{6}f(s_i''')=37


Improvement of 9 percent