230 likes | 522 Views
Introduction to Genetic Algorithms and Evolutionary Computation. Andrew L. Nelson Visiting Research Faculty University of South Florida. Overview. References Introduction Sample Application Formulation Genome Population Fitness Function Selection Propagation Worked Example
E N D
Introduction to Genetic Algorithms and Evolutionary Computation Andrew L. Nelson Visiting Research Faculty University of South Florida
Overview • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • Outline to the left • Current topic in red • Introduction • Algorithm Formulation • Example • Case Study Genetic Algorithms
References • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • Holland, J. J., Adaptation in Natural and Artificial Systems, University of Michigan Press, Ann Arbor Michigan, 1975. • D.B. Fogel, Evolutionary Computation, Toward a New Philosophy of Machine Intelligence, 2nd Ed., IEEE Press, Piscataway, NJ, 2000. • M. Mitchell, An Introduction to Genetic Algorithms, The MIT Press, Cambridge, Massachusetts, 1998. Genetic Algorithms
Introduction • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • Genetic Algorithms • Base on Natural Evolution • Stochastic Optimization • Stochastic Numerical Techniques • Evolutionary Computation • Artificial Life • Machine Learning • Artificial Evolution Genetic Algorithms
Introduction • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • Population of candidate solutions • Evaluate the quality of each solution • Survival (and reproduction) of the fittest • Crossover and Mutation Genetic Algorithms
Sample Application Domain • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • Finding the best path between two points in "Grid World" • Creatures in world: • Occupy a single cell • Can move to neighboring cells • Goal: Travel from the gray cell to the green cell in the shortest number of steps Genetic Algorithms
Algorithm Formulation • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • Components of a Genetic Algorithm: • Genome • Fitness metric • Stochastic modification • Cycles of generations • Many variations Genetic Algorithms
Genome • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • The genome is used represent candidate solutions • Fixed length Bitstrings • Holland • Traditional • Convergence theorems exist • Real-valued genomes • Artificial evolution • Difficult to prove convergence Genetic Algorithms
Genome • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • Example: Representation of a path through a square maze: • Representation: N=00, E=10, S=11,W=01 Genetic Algorithms
Population • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • Population, P is made up of individuals pn where N is the population size Genetic Algorithms
Fitness Function • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • F(p) called Objective Function • Example: Shortest legal path to goal • F(pn) = S(steps) Genetic Algorithms
Selection • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • Selection Methods of selection of the parents of the next generation of candidate solutions • Diverse methods • Probabilistic: • Chance of be selected is proportional to fitness • Greedy: • the fittest solutions are selected Genetic Algorithms
Propagation • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • The next generation is generated from the fittest members of the current population • Genetic operators: • Crossover (recombination) • Mutation Genetic Algorithms
Propagation: Crossover • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • Example: 1 point crossover • Two parents generate 1 offspring Genetic Algorithms
Propagation: Mutation • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • Example: Bitstring point mutation • Replace randomly selected bits with their complements • One parent generates one offspring Genetic Algorithms
Worked Example • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • World size: • 4X4 • Population size: • N = 4 • Genome: • 16 bits • Fitness: • F(p) = (8-Steps before reaching goal) – (squares from goal) • Propagation: Greedy, Elitist Genetic Algorithms
Ex: Initial Population • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • Initial Population P(0): 4 random 16-bit strings Genetic Algorithms
Ex: Fitness Calculation • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • Fitness calculations: • F(p1) = (8-8) – 4 = -4 • F(p2) = -5 • F(p3) = -6 • F(p4) = -4 Genetic Algorithms
Ex: Selection and Propagation • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • Select p1 and p4 as parents of the next generation, P(1) • Produce offspring using crossover and mutation Genetic Algorithms
Ex: Book Keeping... • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • The next generation is... Genetic Algorithms
Ex: Repeat for next Generation • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • Repeat: • F(p1) = -4 • F(p2) = -4 • F(p3) = 0 • F(p4) = -4 Genetic Algorithms
Case Study • References • Introduction • Sample Application • Formulation • Genome • Population • Fitness Function • Selection • Propagation • Worked Example • Case Study: Evolving Neural Controllers • Evolution of neural networks for autonomous robot control using competitive relative fitness evaluation Genetic Algorithms