Genetic Algorithm
Genetic Algorithm
If we were to use binary-coded representations we would first need to develop a mapping function form our genotype representation (binary string) to our phenotype representation (our CS). This can be done using the following mapping function:
d(ub,lb,l,chrom) = (ub-lb) decode(chrom)/2l-1 + lb
The parameter, l, determines the accuracy (and resolution of our search). What happens when l is increased (or decreased)?
Individual
Chromosome: 00101 Fitness = ?????
Individual
Chromosome: 00101 Fitness = 1.35
d(2,1,5,00101) = 1.16
f(1.16) = 1.35
The Fitness Assignment Process for Binary Coded Ch ro mosomes (ub=2, lb=1, l=5 )
Individual
Chromosome: 1.16 Fitness = ?????
Individual
Chromosome: 1.16 Fitness = 1.35
f(1.16) = 1.35
This type of selection is similar to using a roulette wheel where the fitness of an individual is represented as proportionate slice of wheel. The wheel is then spun and the slice underneath the wheel when it stops determine which individual becomes a parent.
pi = sfi / sfj Roulette Wheel Selection can be performed using the subjective fitnesses. One disadvantage associated with linear rank selection is that the population must be sorted on each cycle.
Crossover is usually the primary operator with mutation serving only as a mechanism to introduce diversity in the population. However, when designing a GA to solve a problem it is not uncommon that one will have to develop unique crossover and mutation operators that take advantage of the structure of the CSs comprising the search space.
Example:
Parent 1: XX|XXXXX Parent 2: YY|YYYYY Offspring 1: X X Y Y Y Y Y Offspring 2: Y Y X X X X X
Example:
Parent 1: XX|XXX|XX Parent 2: YY|YYY|YY Offspring 1: X X Y Y Y X X Offspring 2: Y Y X X X Y Y
Example:
Parent 1: XXXXXXX Parent 2: YYYYYYY Offspring 1: X Y X Y Y X Y Offspring 2: Y X Y X X Y X
If a chromosome contains more than one gene, then this operator can be applied to each gene with a probability of Pmp.
Of course, if a chromosome contains more than one gene then this operator can be applied to each gene with a probability of Pblx-0.0.
Of course, if a chromosome contains more than one gene then this operator can be applied to each gene with a probability of Pblx-.
An Example of Sing le-point Crossover Between the Third and Fourth Genes with a Mutation Rate of 0.01 Applied to Binary Coded Ch ro mosomes
Fitness Fit: 0.109 Fit: 0.697 Fit: 1.790 Fit: 0.090 Fit: 0.238 Fit: 2.531
Fitness Fit: 2.839 Fit: 2.054 Fit: 0.806 Fit: 2.736 Fit: 1.793 Fit: 0.458
Fitness Fit: 0.109 Fit: 0.697 Fit: 1.793 Fit: 0.090 Fit: 0.238 Fit: 2.531
Fitness Fit: 0.109 Fit: 0.697 Fit: 1.790 Fit: 0.090 Fit: 0.238 Fit: 2.531
Fitness Fit: 0.109 Fit: 2.839 Fit: 1.790 Fit: 2.054 Fit: 0.238 Fit: 2.531
Is repeated until a stopping criterion is reached Notice that on each cycle the steady-state GA will make two function evaluations while a generational GA will make P (where P is the population size) function evaluations. Therefore, you must be careful to count only function evaluations when comparing generational GAs with steady-state GAs.
But does this really tell us how SGAs search? Do SGAs allow us to get something (implicit parallelism) for nothing (perhaps a Free Lunch)? This lecture was based on: G. Dozier, A. Homaifar, E. Tunstel, and D. Battle,
"An Introduction to Evolutionary Computation" (Chapter 17), Intelligent Control Systems Using Soft Computing Methodologies, A. Zilouchian & M. Jamshidi (Eds.), pp. 365-380, CRC press. (can be found at: www.eng.auburn.edu/~gvdozier/chapter17.doc)