Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Genetic Algorithm.

Similar presentations


Presentation on theme: "The Genetic Algorithm."— Presentation transcript:

1 The Genetic Algorithm

2 HMS Beagle: The Voyage of the Beagle (1831-36)
What’s This?

3 Charles Darwin ( ) Who’s This?

4 Darwin’s Finches

5 Charles Darwin from The Voyage of the Beagle
“The most curious fact is the perfect gradation in the size of the beaks in the different species of Geospiza…. Seeing this gradation and diversity of structure in one small, intimately related group of birds, one might really fancy that from an original paucity of birds in this archipelago, one species had been taken and modified for different ends”

6 Differential Reproduction
The Tragic Tale of Green Beetles

7 Mendelian Inheritance
We want a cat with with black spots and a black tail The Mating Pool Mendelian Inheritance

8 (With apologies to Gregor Mendel)
Mates Selected

9 (and thanks to Dr. Sara Ganzerli)
The Offspring (and thanks to Dr. Sara Ganzerli)

10 The Genetic Algorithm Developed Widely Applied
John Holland, University of Michigan (~1975) Widely Applied Daniel Goldberg (1989) Metaphor of natural selection applied to optimization problems

11 Truss Bridge

12 Truss Optimization: 64 Bars

13 Optimize? Minimize the Volume of the Truss
sum(X-Sectional Area of Member X Length) NP-Complete* *Overbay, S., Ganzerli, S., De Palma, P, Brown, A., Stackle, P. (2006). Trusses, NP- Completeness, and Genetic Algorithms. Proceedings of the 17th Analysis and Computation Specialty Conference. St. Louis, MO.

14 A Simpler Problem: Word Guess
User thinks of a word Passes the word to the GA Keeper GA guesses the word

15 Elements of GA Idea: Representation selects key items of object for computation Chromosome Representation of a candidate solution Specs for an individual truss A word Gene An element of a chromosome Specs for a member A letter Population Set of chromosomes Specs for a set of trusses Set of letter strings representing candidate solutions

16 Initialize the Population
Idea: Starting point for speciation Randomly generate a set of chromosomes Randomly generate specifications for trusses Randomly generate letter strings of the given size

17 How Large? Large Enough to Incorporate Genetic Diversity
Divisible by 2 64 seems to work

18 Rank Fitness Idea: Members of the population have characteristics that better suit them for reproduction Function over the population used to rank the population Truss: The smaller the cross-sectional area, the higher the fitness Word Guess: Proximity to correct word

19 match.com for trusses or words (or whatever)
Pair match.com for trusses or words (or whatever)

20 Zero Population Growth
Idea: Food supply (and memory) cannot tolerate unlimited population growth Suppose current population is max: m Current population produces n offspring Reduce m + n candidate solutions to m Example: m = 64 Select 32 population members to survive Group them into 16 breeding pairs Allow each to produce 2 children

21 Selecting Mating Population
Idea: Differential Reproduction Random: Any PP (potential parent) could reproduce Truncation Selection Top half: survive and reproduce Bottom half: die Stochastic: Spin a roulette wheel Each element has a slot Size of slot is proportional to 1) fitness 2) probability of being chosen to reproduce

22 Pairing Idea: Maximize the fitness of offspring Top-Down Tournament
While ( < 16 mating pairs) { Do twice: Randomly select subset of the population Select 1 parent at random from subset Add parents to set of mating pairs } Many Others

23 Mate Idea: Children preserve parents’ genetic information
Genetic Recombination Target: Chipolte Many Algorithms Illustrated: single point crossover PA: CHIP OTLE PB: CHIX LOTL CA: CHIP LOTL CB: CHIX OTLE

24 Mutation (and genetic drift)
Idea: Population can get stuck in a local minimum Simulates: chemical mutagens radiation copying errors random loss of population members Randomly perturb a fraction of the population

25 Convergence Idea: No further improvement is possible (within acceptable cost) Stop after a fixed number of iterations Stop when a known solution is found Stop when m% of the population is within n standard deviations of the mean fitness

26 Putting It Together: The GA Loop
GA(population) { Initialize(population) //generate population ComputeCost(population) //compute fitness Sort(population) //rank while (population not converged on a good-enough solution) SelectBreeders(population) //who reproduces? Pair(breeders) //love and marriage Mate(population) //genetic recombination Mutate(population) //jar from local minima Sort(population) //rank TestConvergence(population) //stop? }

27 The Vanity Press Finding a Route A World with Infinite Resources
Evolving Rockets Evolving Pictures Learning to Walk


Download ppt "The Genetic Algorithm."

Similar presentations


Ads by Google