Download presentation
Presentation is loading. Please wait.
Published byMatthew Sutton Modified over 9 years ago
1
Genetic Algorithms: Evolving Solutions to Problems
2
What is a Genetic Algorithm? Pool of possible solutions Randomly creates initial algorithms Relies on “survival of fittest” Uses mutation and crossover Follows a cycle of generations
3
What can GAs be used for? Any problem that solutions can be rated for levels of success Difficult optimization problems including NP-hard and NP-complete Problems with “building blocks” Problems with functions that are undefined or don’t exist
4
What are its accomplishments? Recreating technology like A-D converter, antennas Traveling Salesman Problem Knapsack Problem Outperforms hill-climbing and simulated- annealing
5
How is it different from other optimization algorithms? Hill-Climbing -Kangaroo hops to top of nearest mountain. Simulated-Annealing -Drunken kangaroo hops around randomly, sobers up, and hops uphill. Genetic Algorithm -Kangaroos are released and allowed to roam. Flood drowns kangaroos on low hills, survivors multiply.
6
What process does it follow?
7
How is a GA set up? Data for the problem is encoded in each member Method determined for making initial population Fitness function is determined Method of selection is chosen Genetic operators are chosen Population size, mutation probability
8
Million Monkeys Example 1 million monkeys try to write the word: “shakespeare” Data Encoding: string 11 characters long, character set 26 characters(a-z) Create Initial population: 20 random strings of the 26 allowed characters Fitness Function: Difference of each letter from correct letter Genetic Operators: Single Crossover, Mutation Selection: Top 50%
9
1st generation xgagqlqohxn62 uwifceuigqb65 ghhmvntcqqf67 tpcahvntllp72 mulhbkubxrf76 fihsoghlfoh77 qdnbnvedhov79 nmnxovhkaqv81 tanjxinrcqu85 ltlboligpsm89 rtufqrkeuoq91 rntdphpnxsk94 mfsqxcuucoj98 huvbcvwpmpr104 kcigyfpaxrx104 vgnqijaqxpw106 nyljlfhbyxr108 oxqblcqgylq113 oavxnemsvha120 gnqwkqusshy121 2 nd generation ghhmceuigqb56* nkifceuigqb58* tpcahvnrcqu61* wgagqlqohxn61 uwifceuigqb65 ghhmvntcqqf67 tpcahvntllp72 uwifcehlfoh72* tanjxincqqf73* fihsogtcqqf75* mulhbkubxrf76 qdnbnvedxrf76* fihsoghlfoh77 qdnbnvedhov79 nmnxovhkaqv81 xgnjxinrcqu83* tanjxinrcqu85 ltlboligpsm89 mulbnvedhov90* ltnxovhkaqv90* Crossover ghhmvntcggf and uwifceuiggb = ghhmceuiggb Mutation xgagglgohxn wgagglgohxn
10
Fitness Should reflect potential May need to provide constraints Penalties- Subtract from fitness Repairs- Repairs code outside const. Decoder- Change way of making algorithm, any individual is valid May need to be scaled
11
Selection Roulette- random by fitness, many spins Stochastic Universal Sampling- many pointers, One spin Ranking- proportional by fitness Tournament- random algorithms compete Aging- given time to live, no selection Crowding- new algorithms replace similar old Multiple copies of same algorithm Elitism- Best algorithms in next gen.
12
Crossover and Mutation Crossover can kill ideal solutions (1*****10) Single crossover is the worst Multi-point crossover Uniform crossover Genetic Diversity vs. Selective Pressure Incest Prevention/ Speciation Mutation better for diversity May not allow “supers” to breed
13
Messy Genetic Algorithms Provide data in an unorganized fashion (position, value) ((5,0) (9,1) (4,1) (2,0)) Crossover less damaging More genetic diversity Over-specification: May give too many values ((3,1) (4, 0) (3,0) (2,1) (1,1)) Under-specification: May not give enough values ((4,0) (2,1))
14
Plants and Eaters Example 16 possible states Able to “See” square directly in front of it 4 possible actions( turn left, turn right, move forward, move backward) Acts on current state and what it can “See” When it takes an action it sets a new state http://math.hws.edu/xJava/GA/
15
Questions?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.