real-coded genetic algorithms - purdue engineeringsudhoff/ee630/lecture04.pdfreal-coded genetic...
TRANSCRIPT
![Page 1: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/1.jpg)
Lecture 4:Real-Coded Genetic Algorithms
![Page 2: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/2.jpg)
2
Drawbacks of Binary Coded GAsHamming cliffs
Moving to a neighboring solution requires changing many bits which introduces encumbrance to the gradual search in the continuous search space
Example 0 1 1 1 1 1 0 0 0 0
![Page 3: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/3.jpg)
3
Drawback of Binary Coded GAs
Difficulty in achieving arbitrary precisionFixed string length limits the precision of the solutionAppropriate length of the string is not known a priori
Uneven schema importanceFor example, the schema 1*** is more significant than the schema ***1
![Page 4: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/4.jpg)
4
Real Coded GAsAlgorithm is simple and straightforward
Selection operator is based on the fitness values and any selection operator for the binary-coded GAs can be used
Crossover and mutation operators for the real-coded GAs need to be redefined
![Page 5: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/5.jpg)
5
Crossover Operators for Real Coded GAs
Single point crossoverLinear crossover Blend crossoverSimulated binary crossover
![Page 6: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/6.jpg)
6
Similar to the crossover operator used in the binary-coded GAs
According to the number of crossover points, there are also two-point, three-point and n-point crossover
Single-Point Crossover
Parent 1 0.21 0.550.83 0.260.98
Parent 2 0.17 0.340.42 0.770.24
Child 1
Child 2
Crossover point
0.21 0.550.83
0.260.980.17 0.340.42
0.770.24
![Page 7: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/7.jpg)
7
Single-Point Crossover
Problematic in the real-coded GAs.
x1
x2 P1
P2
![Page 8: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/8.jpg)
8
Linear CrossoverGiven the two parents x1 and x2, create three solutions 0.5x1+0.5x2, 1.5x1-0.5x2, and -0.5x1+1.5x2
Choose two best solutions among the five solutions and they become the children
P1 P2S1 S2 S3
x1 x2
C1 C2
![Page 9: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/9.jpg)
9
Given the two parents x1 and x2 where x1< x2, the blend crossover randomly selects a child in the range [ x1-α(x2-x1), x2+α(x2-x1)]
It is often suggested that a good choice of αis 0.5
Blend Crossover
P1 P2
x1 x2
C
x1 - α(x2 - x1) x2 + α(x2 - x1)
![Page 10: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/10.jpg)
10
Value
8345
Parent 1 1Parent 2
0 1 0 0 1 10 1 0 1 1 0 1
Crossover point
Avg. 64
Value
85
43
Child 1 1Child 2
0 1 0 1 0 10 1 0 1 0 1 1
Avg. 64
Simulated Binary Crossover (SBC)Simulates the single-point crossover
operator of the binary-coded GAs
![Page 11: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/11.jpg)
11
Properties of Binary Crossover
Gene values of children have same distance from the average gene value of parentsEach point of the chromosome has the same probability to be selected as a crossover pointThe crossover in the lower bit results in small change in the gene valueChildren are more likely to be near the parents
![Page 12: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/12.jpg)
12
Goal of SBC
Simulated binary crossover uses probability density function that simulates the single-point crossover in binary-coded GAs
![Page 13: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/13.jpg)
13
SBC Algorithm
Select two parents x1 and x2
Generate a random number u ∈ [0,1)Calculate β
where ηc is the distribution index
( )
⎪⎩
⎪⎨
⎧
⎟⎟⎠
⎞⎜⎜⎝
⎛−
≤= +
+
otherwise,)1(2
15.0 if,2
11
11
c
c
u
uuη
η
β
![Page 14: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/14.jpg)
14
SBC Algorithm (Cont.)
Compute offspring as
Note
( ) ( )[ ]( ) ( )[ ]21
new2
21new1
115.0115.0
xxxxxx
ββββ
++−=−++=
2221
new2
new1 xxxx +
=+
![Page 15: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/15.jpg)
15
SBC Distribution IndexLarge ηc tends to generate children closer to the parentsSmall ηc allows the children to be far from the parents
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2
Pro
babi
lity
dens
ity p
er o
ffspr
ing
0 0.1
Positions of offspring solutions
ηc = 2ηc = 5
![Page 16: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/16.jpg)
16
SBC With Similar Parents
P1 P2
C1 C2
![Page 17: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/17.jpg)
17
SBC With Different Parents
P1 P2C1 C2
![Page 18: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/18.jpg)
18
Mutation Operators for Real-Coded GAs
Random mutationNon-uniform MutationNormally distributed mutation
![Page 19: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/19.jpg)
19
Random mutation generates a solution randomly within the entire parameter range
Generated solution has no relationship to the original solution
Random Mutation
xmin x xmax xmin xnew xmax
![Page 20: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/20.jpg)
20
Alternate Random Mutation
The random mutation generates a solution randomly within a vicinity of the original solution
xmin x xmax xmin xnew xmaxx
![Page 21: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/21.jpg)
21
Non-uniform mutation is expressed as
τ takes -1 or 1, each with a probability of 0.5r is a random number in [0, 1]tmax is the maximum number of generationst is the current generation numberb is the design parameter
Non-Uniform Mutation
( ) ( )( )bttrxxxx max/1minmaxnew 1 −−−+= τ
![Page 22: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/22.jpg)
22
Non Uniform Mutation
xmin x xmax
![Page 23: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/23.jpg)
23
Non-Uniform Mutation
Mutated solution is more likely to be close to the original solutionAs the generation number increases, mutated solutions are generated closer to the original solutionIllegal mutated gene values are adjusted to make them feasible, that is, within the allowed range
![Page 24: Real-Coded Genetic Algorithms - Purdue Engineeringsudhoff/ee630/Lecture04.pdfReal-Coded Genetic Algorithms. 2 Drawbacks of Binary Coded GAs Hamming cliffs Moving to a neighboring solution](https://reader031.vdocuments.net/reader031/viewer/2022030720/5b0622697f8b9a41528eb191/html5/thumbnails/24.jpg)
24
Perturb the gene value using a zero-mean Gaussian distribution
Normally Distributed Mutation
xmin x xmax
xnew = x + N(0, σ)