Download presentation
Presentation is loading. Please wait.
Published byRandall Ryan Modified over 9 years ago
1
Solving Function Optimization Problems with Genetic Algorithms September 26, 2001 Cho, Dong-Yeon dycho@bi.snu.ac.kr 301-419, Tel: 880-1847
2
© 2001 SNU CSE Biointelligence Lab 2 Function Optimization Problem Example
3
© 2001 SNU CSE Biointelligence Lab 3 Representation – Binary String Code length
4
© 2001 SNU CSE Biointelligence Lab 4 Mapping from a binary string to real number Binary NumberDecimal Number x1x1 0000010101001010015417 x2x2 10111101111111024318
5
© 2001 SNU CSE Biointelligence Lab 5 Framework of Simple GA Generate Initial Population Evaluate Fitness Select Parents Generate New Offspring Termination Condition? Yes No Fitness Function Crossover, Mutation Best Individual
6
© 2001 SNU CSE Biointelligence Lab 6 Initial Population Initial population is randomly generated.
7
© 2001 SNU CSE Biointelligence Lab 7 Fitness Evaluation Procedure: Evaluation Convert the chromosome’s genotype to its phenotype. This means converting binary string into relative real values. Evaluate the objective function. Convert the value of objective function into fitness. For the maximization problem, the fitness is simply equal to the value of objective function. For the minimization problem, the fitness is the reciprocal of the value of objective function.
8
© 2001 SNU CSE Biointelligence Lab 8
9
9 Selection Fitness proportional (roulette wheel) selection The roulette wheel can be constructed as follows. Calculate the total fitness for the population. Calculate selection probability p k for each chromosome v k. Calculate cumulative probability q k for each chromosome v k.
10
© 2001 SNU CSE Biointelligence Lab 10 Procedure: Proportional_Selection Generate a random number r from the range [0,1]. If r q 1, then select the first chromosome v 1 ; else, select the kth chromosome v k (2 k pop_size) such that q k-1 < r q k. pkpk qkqk 10.111180 20.0975150.208695 30.0538390.262534 40.1650770.427611 50.0880570.515668 60.0668060.582475 70.1008150.683290 80.1109450.794234 90.1482110.942446 100.0575541.000000
11
© 2001 SNU CSE Biointelligence Lab 11 Tournament Selection Repeat below procedure two times Randomly draw a tournament of size t from the population with replacement. Choose fittest program to be parent.
12
© 2001 SNU CSE Biointelligence Lab 12 Genetic Operations Crossover One point crossover Crossover rate p c Procedure: Crossover Select two parents. Generate a random number r c from the range [0,1]. If r c < p c then perform undergo crossover. Mutation Mutation alters one or more genes with a probability equal to the mutation rate p m.
13
© 2001 SNU CSE Biointelligence Lab 13
14
© 2001 SNU CSE Biointelligence Lab 14 Test Functions Maximization (d=5)
15
© 2001 SNU CSE Biointelligence Lab 15 Minimization (d=5) Ackley’s function Rastrigin’s function Schwefel’s (sine root) function
16
© 2001 SNU CSE Biointelligence Lab 16 Experiments (Minimum Requirements) At least two test functions Maximization Problem One of the Minimization Problems Various experimental setup Termination condition: maximum_generation 2 Selection Method 3 settings 10 runs Proportional: Crossover and Mutation rate (p c, p m ) Tournament: Tournament size (t) Elitism The best chromosome of the previous population is just copied.
17
© 2001 SNU CSE Biointelligence Lab 17 Results For each test function Result table for the best solution and your analysis Present the optimal value and its input for the function. Both genotype and phenotype Draw a learning curve for the run where the best solution was found. ProportionalTournament Average SD BestWorst Average SD BestWorst Setting 1 Setting 2 Setting 3
18
© 2001 SNU CSE Biointelligence Lab 18
19
© 2001 SNU CSE Biointelligence Lab 19 References Source Codes Simple GA coding GA libraries (C, C++, JAVA, …) MATLAB Tool box Web sites Books Genetic Algorithms and Engineering Design, Mitsuo Gen and Runwei Cheng, pp. 1-15, John Wiley & Sons, 1997. Genetic algorithms in search, optimization, and machine learning, David E. Goldberg, Addison-Wesley, 1989.
20
© 2001 SNU CSE Biointelligence Lab 20 Pay Attention! Due (October 17, 2001): By the end of class Submission Source code and executable file(s) Proper comments in the source code Via e-mail Report: Hardcopy!! Running environments Results for many experiments with various parameter settings Analysis and explanation about the results in your own way
21
© 2001 SNU CSE Biointelligence Lab 21 Bonus Problems Maximization (d=30) 3-deceptive function Minimization (d=5) Rosenbrock’s function
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.