Download presentation
Presentation is loading. Please wait.
Published byRegina Phelps Modified over 9 years ago
1
Chapter 4 GAs: Selected Topics
2
Premature Convergence Why GA cannot to find the optimal solutions in the practical applications? Coding problem Limit number of iterations Limit population size Super individuals Multiple copies
3
Combating Premature Convergence A.Sampling Mechanism
4
Characteristics of Function A.Termination Condition B.Population size C.Penalty
5
Exploitation and Exploration Exploreing the search space (population diversity) Too much random search no convergence Exploiting the best individuals (selective pressure) Too much Hillclimbing local search
6
Sampling Mechanism 1.Stochastic sampling Proportional selection Stochastic universal sampling 2.Deterministic sampling Truncation selection (T%) Block selection (s)
7
Stochastic Universal Sampling procedure Stochastic Universal Sampling begin sum 0; ptr rand(); for k 1 to pop_size do sum sum e k ; ‘expected value: while (sum > ptr) do select chromosome k; ptr ptr + 1; end
8
3.Mixed sampling Tournament selection (tournament size = 2) Boltzmann tournament Brindle’s remainder stochastic sampling 4.Others Elitist model Expected value model ( ) Elitist expected value model Crowding factor model (CF)
9
Ranking Linear ranking * Nonlinear ranking
10
Classification of Selection Strategies Dynamic vs. Static: The selection probabilities vary across generations. Dynamic (yes) proportionate selection Static (no) ranking
11
Extinctive vs. Preservative Guarantee each individual a non-zero selection probability. Preservative (yes) proportional selection Extinctive (no) truncation selection
12
Pure? Parents are allowed to reproduce in one generation only. Pure (yes) SGA, Not pure(no) SGA (Elite)
13
Generational? The set of parents is fixed until all offspring for the next generation are completely produced. Generational (yes) SGA; Not generational (no) tournament
14
Modified Genetic Algorithm (modGA) modGA_1, modGA_2 a two-step selection algorithm: “select-parents” and “select-dead” three groups of strings: parents, dead, neutral strings Stochastic universal sampling Avoid exact multiple copies Compare with SGA, Crowding Factor Mode, and Breeder GA (BGA) selection: dynamic, preservative, generational, elitist.
15
modGA_1 Algorithm Procedure modGA_1 begin t 0 initialize P(t) evaluate P(t) while (not termination-condition) do begin t t+1 select-parents from P(t-1) select-dead from P(t-1) form P(t): reproduce the parents evaluate P(t) end
16
modGA_2 Algorithm Procedure modGA_2 begin t 0 initialize P(t) evaluate P(t) while (not termination-condition) do begin t t+1 select r parents from P(t-1) select pop_size - r distinct chromosomes from P(t-1) and copy them to P(t) form P(t): r parents breed r offspring evaluate P(t) end
17
Characteristics of the function Scaling Linear scaling Sigma truncation Power law scaling
18
Window Scaling For maximum problem W : all individuals in the last W generations ( W >= 0 ) For minimum problem
19
Termination Condition Some number of evolution cycles Pre-defined value of fitness Some variation of individuals between different generations Some percentage of the converged alleles
20
Stopping criterion The optimum is reached! Limit on CPU resources: Maximum number of fitness evaluations Limit on the user’s patience: After some generations without improvement
21
Banach Fixpoint Theorem Let 1. be a complete metric space 2. be a contractive mapping. Then there has a unique fixpoint such that for any, where and.
22
A set together with is a metric space,, if, for any elements, If is a metric space and, is contractive iff there is a constant such that for all
23
The sequence of metric space is a Cauchy sequence iff for any there is such that for all,. A metric space is complete if any Cauchy sequence has a limit.
24
Contractive Mapping GA (CM-GA) Procedure CM-GA Begin t 0 Initialize P(t) Evaluate P(t) While (not termination-condition) do Begin (contractive mapping f ( P(t) ) P(t+1)) t t + 1 Select P(t) from P(t-1) Alter P(t) Evaluate P(t) if Eval( P(t-1)) >= Eval( P(t) ) ‘ then t = t - 1 End
25
CM-GA satisfies the assumptions of Banach fixpoint theorem: The distance The space of populations is a metric space. The metric space is complete. The iteration is contractive. CM-GA converges to population, which is a unique fixpoint in the space of all populations.
26
Population Size Too small converge too quickly Too large waste computational resources Varying population Size (GAVaPS)
27
Varying Population Size (GAVaPS) Procedure GAVaPS begin t = 0 initialize P(t) evaluate P(t) while (not termination-condition) do begin t = t+1 increase the age to each individual by 1 recombine P(t) ‘ evaluate P(t) ‘ p : reproduction ration remove from P(t) all individuals with age greater than their lifetime end ‘ end
28
Lifetime value: Proportional allocation Linear allocation Bi-linear allocation
29
Example Initial_size = 20 Reproduction ratio = 0.4 Mutation ratio =0.015 Crossover ratio = 0.65 Length of chromosome = 20 MaxLT =7 MinLT = 1 Termination = no progress for consecutive 20 generations Independent run = 20 times
33
GAVaPS(1): proportional GAVaPS(1): linear GAVaPS(1): bi-linear
34
Handling Constraints d b c a Solution Space
35
Penalty Strategy Rejecting/Death Strategy Repairing Strategy Modifying GA Strategy Penalty Strategy Others: Dynamic penalty functions Self-adaptive penalty function Combine penalty methods with repair algorithms
36
0-1 Knapsack Problem (example) A thief robbing a store finds n items; the ith item is worth P i dollars and weighs W i pounds, where P i and W i are integers. He wants to take as valuable a load as possible, but he can carry at most C pounds in his knapsack. What items should he take? (This is called the 0-1 knapsack problem because each item must either be taken or left behind; the thief cannot take a fractional amount of an item or take an item more than once.)
37
Problem Maximize Subject to
38
Penalty Strategy Penalty Function:
39
Penalty Strategies Penalty Functions: Logarithmic: Linear: Quadratic:
40
Repair Strategy Two different repair algorithms: Random repair Greedy repair (profit / weight)
41
Algorithm: Procedure Repair (x) begin knapsack-overfilled := false if then knapsack-overfilled := true while (knapsack-overfilled) do begin i := select an item from the knapsack remove the selected item from the knapsack: i.e. if then knapsack-overfilled := false end
42
Decoder Strategy Ordinal representation L = ( 1 2 3 4 5 6 ) v = ( 4 3 4 1 1 1 ) Two different decoding algorithms: Random decoding Greedy decoding (profit / weight)
43
Algorithm: Procedure Decode (x) begin build a list L of items WeightSum := 0 ProfitSum := 0 i := 1 while i <= n do begin j := x[i] remove the j-th item from the list L if WeightSum + W[j] <= C then begin WeigthSum := WeightSum + W[j] ProfitSum := ProfitSum + P[j] end i := i+1 end
45
Crossover One-point crossover Two-point crossover Multi-point crossover Segmented crossover Uniform crossover Gene pool recombination Simplex crossover
46
Messy Genetic Algorithm (mGA) Representation tag, length, redundant and contradictory v1 = ((7,1)(1,0)) v2 = ((3,1)(9,0)(3,1)(3,1)(3,1)) v3 = ((2,1)(2,0)(4,1)(5,0)(6,0)(7,1)(8,1)) overspecification – tie-breaking (first come, first serve) underspecification – probability / competitive templates Selection tournament Crossover splice & cut Mutation bit inversion
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.