Presentation is loading. Please wait.

Presentation is loading. Please wait.

A First Course in Genetic Algorithms

Similar presentations

Presentation on theme: "A First Course in Genetic Algorithms"— Presentation transcript:

1 A First Course in Genetic Algorithms
Tim Watson G6.71

2 What is a GA? Evolutionary Algorithm
Create random population of possible solutions in the form of bitstrings See how good each one is (test fitness) Produce next generation (fitter are more likely to get into next generation) Crossover, mutate and make next generation the current one

3 What can they do? Schedule Barcelona Olympics Aircraft Design
Dynamic Routing in Networks Robot Arm Trajectory Planning Lab Task Scheduling for US Navy Aircraft Missile Evasion Evolving aNN Architecture Parameter Tuning for Sonar Systems Conformational Analysis of DNA

4 Example: Onemax Initial population: 100 000 110
Calculate fitness: 110 3 Reproduce: 110 100 110 Crossover & Mutate: 101 010

5 Biological Terminology
Genes etc. Gene Locus (plural loci) Allele (also called gene value) (Pleiotropic gene) Genotype (Chromosome) Phenotype Fitness Landscape

6 GA Theory Schema Theorem Building Block Hypothesis
GA searches schemata in parallel 10 represents 10, 1#, #0 and ## The theorem is rubbish! Building Block Hypothesis Good, small sequences are found and recombined to form good solutions No Free Lunch Theorem

7 GA Parameters Population Size Chromosome Size Crossover Rate
Static or Dynamic? Chromosome Size Fixed or Variable? Crossover Rate One-point, two-point or uniform? Mutation Rate Fitness Function Termination Criteria

8 Prediction Test! What happens to the population statistics in a standard GA with random fitness, no crossover, no mutation and chromsize equals 16? Best, Worst, Mean , Std. Dev., column counts Best=17, Worst=1, Mean=9ish, Std. Dev. constant-ish, pop converges randomly.

9 Reproduction in GAs Need selective pressure for reproduction to improve the population fitness None leads to random walk (slow) Some leads to geometric growth of best (fast) Infinite populations select individuals on relative fitness: fit/mean(fit) Finite populations also affected by how many copies are already present

10 Types of Selection Fitness-Proportionate Rank-Order Tournament Elitism
Fitness scaling based on raw fitness where if fita < fitb then scaled(fita)  scaled(fitb) Scaling can be altered dynamically Rank-Order Tournament Elitism

11 Initialising the Population
Uniformly at random Best Guesses Converged to Best Known From Real World Hybrid

12 Mutation Goal of selection: survival of the fittest
Goal of mutation: explore lost or never seen alleles Random reset versus bit flip Reset rate = ½ bit flip rate Mutation as a spring In infinite time every possible population visited an infinite number of times Alternative to mutation: complement

13 Crossover Goal: to try out different combinations of good bits of individuals Crossover point One-point Two-point N-point Uniform

14 Crossover (2) Closer genes are less likely to be split by crossover
AB###### probability of split with one-point crossover = 1/7 A######B probability of split = 1 Local maxima can occur (e.g. for onemax) 11011 fit= 00100 fit= All children have lower fitness than parents

15 Design Decisions If genes are linked then the representaion of an individual ought to keep them close together Get the balance right: Popsize too small  premature convergence Popsize too large  too slow to compute Mutation rate too low  not enough exploring Mutation rate too high  too much noise

Download ppt "A First Course in Genetic Algorithms"

Similar presentations

Ads by Google