chapter 9 e volutionary c omputation i : g enetic a lgorithms

14
CHAPTER 9 CHAPTER 9 E E VOLUTIONARY VOLUTIONARY C C OMPUTATION OMPUTATION I I : : G G ENETIC ENETIC A A LGORITHMS LGORITHMS •Organization of chapter in ISSO –Introduction and history –Coding of –Standard GA operations –Steps of basic GA algorithm –Extensions to basic GA algorithm –Numerical examples Slides for Introduction to Stochastic Search and Optimization (ISSO) by J. C. Spall

Upload: baris

Post on 14-Jan-2016

40 views

Category:

Documents


3 download

DESCRIPTION

Slides for Introduction to Stochastic Search and Optimization ( ISSO ) by J. C. Spall. CHAPTER 9 E VOLUTIONARY C OMPUTATION I : G ENETIC A LGORITHMS. Organization of chapter in ISSO Introduction and history Coding of  Standard GA operations Steps of basic GA algorithm - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CHAPTER 9 E VOLUTIONARY C OMPUTATION I :  G ENETIC  A LGORITHMS

CHAPTER 9CHAPTER 9

EEVOLUTIONARYVOLUTIONARY CCOMPUTATIONOMPUTATION II: : GGENETIC ENETIC AALGORITHMSLGORITHMS

•Organization of chapter in ISSO–Introduction and history

–Coding of –Standard GA operations

–Steps of basic GA algorithm

–Extensions to basic GA algorithm

–Numerical examples

Slides for Introduction to Stochastic Search and Optimization (ISSO) by J. C. Spall

Page 2: CHAPTER 9 E VOLUTIONARY C OMPUTATION I :  G ENETIC  A LGORITHMS

9-2

Background: Evolutionary Computation Background: Evolutionary Computation

• Evolutionary computation (EC) methods are based on population population of solutions– Each iteration involves propagating all elements of the

population– Each member of population (“chromosome”) corresponds

to one value of

• Genetic algorithms (GAs) are most popular form of EC• Early work in 1950s and 1960s; influential 1975 book by

John Holland laid foundation for modern implementations• Dramatic increase in activity in mid-1980s• Population-based structure well suited to parallel

processing– But infeasible in some real-time applications

Page 3: CHAPTER 9 E VOLUTIONARY C OMPUTATION I :  G ENETIC  A LGORITHMS

9-3

Background: EC (cont’d)Background: EC (cont’d)

• Motivation for EC: Evolution seems to work well in nature.…perhaps it can be used in optimization

• Three main types of EC–Genetic Algorithms (Chap. 9

of ISSO)–Evolution Strategies (Chap. 10)–Evolutionary Programming

(Chap. 10)

• Many other types of EC exist (ant colony, particle swarm, differential evolution, etc.)

Initial Population

Selection

Reproduction

Mutation

NextIteration

(Generation)

Prototype EC Method

Page 4: CHAPTER 9 E VOLUTIONARY C OMPUTATION I :  G ENETIC  A LGORITHMS

Desirable Performance for GA with Desirable Performance for GA with Population of 12 Candidate SolutionsPopulation of 12 Candidate Solutions

9-4

Page 5: CHAPTER 9 E VOLUTIONARY C OMPUTATION I :  G ENETIC  A LGORITHMS

9-5

Role of GAs in Global ProblemsRole of GAs in Global Problems• GA largely motivated for globalglobal search/optimization problems

– Global problem generally very difficult

– GAs (and related) have long history of success in global problems

– Some global problems essentially impossible to solve

• Much solid research and applications with GAs

• Unfortunately, more misrepresentations, dubious claims, and “hype” than other methods. For example, GA software ads:

– “…“…can handle the most complex problems, including can handle the most complex problems, including problems unsolvable by any other method.” problems unsolvable by any other method.”

– “…“…uses GAs to solve uses GAs to solve anyany optimization problem!” optimization problem!”

• No clear indication of problem class(es) for which GAs are superior to other methods

Page 6: CHAPTER 9 E VOLUTIONARY C OMPUTATION I :  G ENETIC  A LGORITHMS

9-6

Fitness Function and Coding of Fitness Function and Coding of • Need to define “fitness function” to be maximized• Fitness function may depend on or on coded form of • Common choice is L() when algorithm works directly with • Other choices desirable in some applications

– Add positive constant to ensure fitness always 0– Rescaling to avoid extreme values that can cause instabilities

due to selection step

• Coding of : Binary bit and real-number (floating point) representation of are most common forms– Bit representation applies to each element of for each of the

members of the population (e.g., [0 1 1 0…1 0]) – Real-number “coding” (i.e., no coding of ) becoming popular

due to effectiveness in applications

Page 7: CHAPTER 9 E VOLUTIONARY C OMPUTATION I :  G ENETIC  A LGORITHMS

9-7

Standard GA OperationsStandard GA Operations• Selection Selection is the mechanism by which the “parents” are

chosen for producing offspring to be passed into next generation – Selection tends to pick best population elements as parents

• Elitism Elitism passes best chromosome(s) to next generation intact– Elite chromosomes also eligible for selection as parents– Inclusion of elitism critical to practical performance of GA

(Holland’s original formulation did not include elitism)

• CrossoverCrossover takes parent-pairs from selection step and creates offspring

• MutationMutation makes “slight” random modifications to some or all of the offspring in next generation

• Selection, crossover, and mutation discussed below, followed by the basic steps of a GA….

Page 8: CHAPTER 9 E VOLUTIONARY C OMPUTATION I :  G ENETIC  A LGORITHMS

9-8

SelectionSelection• Parent selection methods based on probability of selection

being increasing function of fitness

• Roulette-wheel selectionRoulette-wheel selection is common method– Probability an individual is selected is equal to its fitness divided

by the total fitness in the population

• Problem: Selection probability highly dependent on units and scaling for fitness function– May cause premature convergence to local optima

• Rank selection Rank selection and tournament selectiontournament selection methods reduce sensitivity to choice of fitness function– More robust: Only compare which chromosomes are better, not

relative magnitudes of fitness functions

– Often produce better practical results (see, e.g., examples in Sect. 9.7 of ISSO)

Page 9: CHAPTER 9 E VOLUTIONARY C OMPUTATION I :  G ENETIC  A LGORITHMS

9-9

CrossoverCrossover• Crossover provides means of “mixing” two parents (from

selection step) to provide two offspring• For given parents, crossover occurs with specified

probability 1– Else, parents placed directly into next generation (clones)

• Examples of crossover operator:

A. One-point crossoverB. Two-point crossover

Page 10: CHAPTER 9 E VOLUTIONARY C OMPUTATION I :  G ENETIC  A LGORITHMS

9-10

MutationMutation

• Mutation operator introduces spontaneous variability (as in random search algorithms)

• Mutation generally makes only small changes to solution

• Bit-based coding and real (floating point) coding require different type of mutation

– Bit-based mutation generally involves “flipping” bit(s)

– Real-based mutation often involves adding small (Monte Carlo) random vector to chromosomes

• Example below shows mutation on one element in chromosome in bit-based coding:

Page 11: CHAPTER 9 E VOLUTIONARY C OMPUTATION I :  G ENETIC  A LGORITHMS

9-11

Essential Steps of Basic GAEssential Steps of Basic GA(Noise-Free Measurements)(Noise-Free Measurements)

Step 0 (initialization)Step 0 (initialization) Randomly generate initial population of N (say) chromosomes and evaluate fitness function.

Step 1 (parent selection)Step 1 (parent selection) Set Ne = 0 if elitism strategy is not

used; 0 < Ne < N otherwise. Select with replacement

NNe parents from full population.

Step 2 (crossover)Step 2 (crossover) For each pair of parents identified in step 1, perform crossover on parents at a randomly chosen splice point (or points if using multi-point crossover) with probability Pc.

Page 12: CHAPTER 9 E VOLUTIONARY C OMPUTATION I :  G ENETIC  A LGORITHMS

9-12

Essential Steps of GA (cont’d)Essential Steps of GA (cont’d)

Step 3 (replacement and mutation)Step 3 (replacement and mutation) Replace the non-elite N Ne chromosomes with the current population of

offspring from step 2. Perform mutation on the bits with a small probability Pm .

Step 4 (fitness and end test)Step 4 (fitness and end test) Compute the fitness values for the new population of N chromosomes. Terminate the algorithm if stopping criterion or budget of fitness function evaluations is met; else return to step 1.

Page 13: CHAPTER 9 E VOLUTIONARY C OMPUTATION I :  G ENETIC  A LGORITHMS

9-13

Examples of GAs in Examples of GAs in ISSOISSO

• Section 9.7 of ISSO includes several numerical examples– Usual caveats regarding caution in drawing general

inferences; summary of examples below

• Example 9.4: unimodal function with p = 10– GA with real coding outperforms GA with bit coding w/ noise-

free loss measurements; real and bit coding similar with noisy measurements

• Example 9.5: multimodal function with p = 2 and noise-free loss measurements– Plot of function on next slide

– GA outperforms SA with injected randomness

• Example 9.6: issues with traveling salesperson problem– Fundamental issue is to ensure legal tours

Page 14: CHAPTER 9 E VOLUTIONARY C OMPUTATION I :  G ENETIC  A LGORITHMS

9-14

Loss Function for Example 9.5Loss Function for Example 9.5