1 / 43

Introduction to Genetic Algorithm and Some Experience Sharing

Introduction to Genetic Algorithm and Some Experience Sharing. Outline. Introduction Genetic Algorithm (GA) Evolutionary Procedure Some Experience Discussion Conclusion. Introduction. Introduction. Presented by John Holland in 1975 Mimicking the Natural Selection and Natural Genetics

messerd
Download Presentation

Introduction to Genetic Algorithm and Some Experience Sharing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Genetic Algorithm and Some Experience Sharing

  2. Outline • Introduction • Genetic Algorithm (GA) Evolutionary Procedure • Some Experience Discussion • Conclusion

  3. Introduction

  4. Introduction • Presented by John Holland in 1975 • Mimicking the Natural Selection and Natural Genetics • A Numerical Optimization Method of Global Search • Suited to Large Scale and Complicated System Riddle with Some Local Minimum • Exploitation and exploration • Near-optimal Solution

  5. y=x2 × Introduction o

  6. Introduction • GA’s Form: • Binary Genetic Algorithm • Continuous Parameter Genetic Algorithm

  7. GA Evolutionary Procedure

  8. Define chromosome formation and fitness function Create initial population Evaluate fitness value Test stopping criterion Select Stop Crossover Mutate The flow chart of genetic algorithm

  9. Define chromosome formation and fitness function P1 Q1 system, experiment, equation,... P2 Q2 P3 : : QM PN chromosome=[P1, P2, P3, ...,PN] P1, P2, P3, ...,PN: gene fitness function or cost function Chromosome formation and fitness choice are depending on problem

  10. Define chromosome formation and fitness function fitness function: Represent pros and cons of a chromosome. fitness function=-cost function or fitness function=1/cost function

  11. Define chromosome formation and fitness function binary GA: quantization and encode 11010110|00100110| …|10100101 P1, P2, P3, ...,PN real number chromosome=[11010110|00100110|…|10100101] PN P1 P2 continuous parameter GA: chromosome=[P1, P2, P3, ...,PN]

  12. Define chromosome formation and fitness function chromosome formation continuous parameter GA: chromosome=[x, y] binary GA: chromosome=[11000101|01111001] cost function C C=-h or C=1/h fitness function f f=-C or 1/C EX: h y x x, y: space coordinate input h: height output

  13. Create Initial Population • Generate chromosomes of first generation. • Determine the number of chromosome K at every generation. • Random generated • Methods: • Generate K initial chromosomes to evolve directly. • Generate L initial chromosomes, in which L>K. Choose best K to evolve.

  14. Select • Determine parents chromosomes to mate. • Select procedure: Rank according to fitness Select appropriate members into mating pool Select appropriate parents from mating pool  Send to mate.

  15. Rank n<=K 1 2 Rank mating pool 3 n K :: :: Select n better chromosomes K Generated by initialization or mate Select parents to mate Select

  16. Rank 1 pair pair pair :: 2 3 To mate K mating pool Select Mechanism A method selecting parents from the mating pool. Method 1: Paring from top to bottom

  17. Select Mechanism Method 2: Random Paring Random generate two parents from the mating pool to mate. The selected probability for each chromosome is the same. The procedure does not stop until K/2 pairs parents are generated.

  18. Select Mechanism Method 3: Weighted Random Paring (a). Rank weighting: The selected probability is determined according to their rank. Ex. n=6 Selected probability n: the number of chromosome in the mating pool i : rank

  19. Select Mechanism Method 3: Weighted Random Paring (b). Cost weighting: The selected probability is calculated from the cost of the chromosome. Ex. n=6 Selected probability Pi i : rank

  20. Select Mechanism Method 4: Tournament selection Two chromosomes are selected randomly. The chromosome which fitness is better selected as parent. Ex. n=6 Hint: numerical represents the rank of the chromosome

  21. Crossover (Mating) • A GA operation creating one or more temporary offspring from the parents selected in the mating pool. • Exploitation and exploration • Crossover type: • single-point crossover • two-point crossover • uniform crossover • blending crossover (continuous parameter GA)

  22. crossover point parent1 0011011001110011 parent2 1001101011001001 offspring1 0011011011001001 offspring2 1001101001110011 Crossover (Mating)-binary GA single-point crossover:

  23. crossover point parent1 0011011001110011 parent2 1001101011001001 offspring1 0011101011110011 offspring2 1001011001001001 Crossover (Mating)-binary GA two-point crossover:

  24. parent1 0011011001110011 parent2 1001101011001001 mask0011011000111010 offspring1 0001001001001001 offspring2 1011111011110011 Crossover (Mating)-binary GA uniform crossover:

  25. crossover point parent1 = [Pm1,Pm2,Pm3,Pm4,Pm5,Pm6, …, PmN] parent2 = [Pd1,Pd2,Pd3, Pd4,Pd5,Pd6, …,PdN] offspring1 = [Pm1,Pm2,Pm3, Pd4,Pd5,Pd6, …,PdN] offspring2 = [Pd1,Pd2,Pd3, Pm4,Pm5,Pm6, …, PmN] Crossover-continuous parameter GA single-point crossover:

  26. crossover point parent1 = [Pm1,Pm2, Pm3,Pm4, Pm5,Pm6, …, PmN] parent2 = [Pd1,Pd2, Pd3, Pd4, Pd5,Pd6, …,PdN] offspring1 = [Pm1,Pm2, Pd3,Pd4, Pm5,Pm6, …,PmN] offspring2 = [Pd1,Pd2, Pm3,Pm4, Pd5,Pd6, …, PdN] Crossover-continuous parameter GA two-point crossover:

  27. parent1 = [Pm1,Pm2, Pm3,Pm4, Pm5,Pm6, …, PmN] parent2 = [Pd1,Pd2, Pd3, Pd4, Pd5,Pd6, …,PdN] mask= [1 0 1 1 0 0 … 1] offspring1 = [Pd1,Pm2, Pd3,Pd4, Pm5,Pm6,…,PdN] offspring2 = [Pm1,Pd2, Pm3,Pm4, Pd5,Pd6,…, PmN] Crossover-continuous parameter GA uniform crossover:

  28. parent1 = [Pm1,Pm2,Pm3,Pm4,Pm5,Pm6, …, PmN] parent2 = [Pd1, Pd2, Pd3, Pd4, Pd5, Pd6, …, PdN] offspring= [Pnew1,Pnew2, Pnew3,Pnew4, Pnew5,Pnew6, …,PnewN] =random number on interval [0, 1] for i-th gene in the offspring Pmi=the i-th gene in the mother chromosome Pdi=the i-th gene in the father chromosome Crossover-continuous parameter GA blending crossover:

  29. Mutation • Operation on temporary offspring from crossover • Escape from the local minimum and explore other zone. • Avoid pre-maturity • Low mutation rate (typically 1%~20%) • For binary GA, the mutated bit will be flip. (10, 01) • For continuous parameter GA, the mutated gene will be replaced by an arbitrary value.

  30. Mutation-binary GA temporary offspring generated by crossover mutation rate=5% 12×14× 0.05≒8 mutation

  31. chromosome10=[9.3469, 7.9025] chromosome10=[3.5746, 7.9025] chromosome23=[8.6750, 2.7271] chromosome23=[8.6750, 5.5496] Mutation-continuous parameter GA 0<=x<=10 Chromosome=[x,y] temporary offspring generated by crossover 0<=y<=10 mutation rate=4% 24×2× 0.04≒2

  32. Stopping Criterion (a) A pre-set number of iterations. (b) The same best chromosome is selected repeated for successive iterations. (c) A acceptable solution is obtained.

  33. Rank sent to next generation directly 1 2 n n 3 : : : n : : : generated by GA operation K-n K present generation next generation Elitism Permit some better chromosomes surviving into next generation.

  34. Elitism Advantage: • Fast convergence • Better solution • Lower computation load Drawback: • Pre-maturity (Easy sink into the local minimum)

  35. Some Experience Discussion

  36. Elitism or non-Elitism? Comparison of GA with elitism and GA without elitism Ex. Find F(x,y)=xsin(4x)+1.1ysin(2y) minimum value, 0<=x, y<=10 Binary GA Chromosome=[x,y] x,y: encode by 10bits Population size=40 Ngood=20 Crossover rate=0.6 Mutation rate=0.1 Iteration number=100 Run number=30

  37. Size of population More chromosomes: • Advantage • Better solution • Drawback • Larger computation load Less chromosomes: • Advantage • Lighter computation load • Drawback • Worse solution

  38. Size of population Ex. Find F(x,y)=xsin(4x)+1.1ysin(2y) minimum value, 0<=x, y<=10 Binary GA Chromosome=[x,y] x,y: encode by 10bits Ngood=population*0.4 Crossover rate=0.6 Mutation rate=0.05 Iteration number=50 Elitism Run number=30 population size

  39. Selection mechanism • Paring from top to bottom • Random Paring • Rank weighting (ˇ) • Cost weighting • Tournament selection (ˇ)

  40. Which crossover is better? binary GA: uniform crossover Continuous parameter GA: blending crossover

  41. The number of iteration Best choice

  42. Conclusion The selection of GA operators and parameters is depend on problem.

  43. Thank you for your attention

More Related