200 likes | 214 Views
Learn about solving function optimization problems using simple genetic algorithms, including representation, fitness evaluation, selection, genetic operations, experiments, test functions, and result analysis. Understand the framework, genetic operations, and termination conditions. Gain insights on maximizing and minimizing objective functions with fitness evaluation. Explore various test functions like Rastrigin’s, Ackley’s, and Schwefel’s to improve optimization techniques.
E N D
Optimization Problem with Simple Genetic Algorithms 2000. 9. 27 Cho, Dong-Yeon (dycho@scai.snu.ac.kr)
Function Optimization Problem • Example
Representation – Binary String • Code length
Framework of Simple GA Generate Initial Population Fitness Function Evaluate Fitness Termination Condition? Yes Best Individual No Select Parents Crossover, Mutation Generate New Offspring
Initial Population • Initial population is randomly generated.
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.
Selection • Fitness proportional (roulette wheel) selection • The roulette wheel can be constructed as follows. • Calculate the total fitness for the population. • Calculate selection probability pk for each chromosome vk. • Calculate cumulative probability qk for each chromosome vk.
Procedure: Selection • Generate a random number r from the range [0,1]. • If r q1, then select the first chromosome v1; else, select the kth chromosome vk (2 k pop_size) such that qk-1< r qk.
Genetic Operations • Crossover • One point crossover • Crossover rate pc • Procedure: Crossover • Select two parents. • Generate a random number rc from the range [0,1]. • If rc< pc then perform undergo crossover. • Mutation • Mutation alters one or more genes with a probability equal to the mutation rate pm.
Experiments • Various experimental setup • Termination condition: maximum_generation • 2 pop_size (large, small) 5 parameter settings 10 runs • Parameter setting (pc, pm) • Elitism • The best chromosome of the previous population is just copied. • At least two test functions • Example function given here (*) - maximization • Rastrigin’s function –minimization • Ackley’s function – minimization • Schwefel’s (sine root) function – minimization
Test Functions • Rastrigin’s function
Ackley’s function • Schwefel’s (sine root) function
Results • For each test function • Result table for the best solution and your analysis • fopt, (xopt, yopt), chromosomeopt among whole runs • Fitness curve for the run where the best solution was found.
References • Source Codes • Simple GA code • GA libraries • Web sites • Books • Genetic Algorithms and Engineering Design, Mitsuo Gen and Runwei Cheng, pp. 1-15, John Wiley & Sons, 1997.
제출 • 제출 마감 (10월 25일, 수): 두 가지 모두 제출 • 제출물 • Source code, 실행 file • Source에 적절한 comment 작성 • File들은 e-mail이나 diskette에 제출 • 보고서: 반드시 인쇄물로 제출 • 여러 가지 실험 설정에 대한 결과 • 실험 결과를 다양한 형식으로 표현하여 분석하고 그 결과를 기술한다. • 실행 환경 명시