logistics
play

Logistics Checkpoint 1 -- Framework Due Friday, Dec 22nd. Group - PDF document

The Classic Genetic Algorithm 1 Logistics Checkpoint 1 -- Framework Due Friday, Dec 22nd. Group accounts Need one for you project? Let me know. Dropboxes open 24/7 Operators are standing by 2 1 Logistics Grad


  1. The Classic Genetic Algorithm 1 Logistics  Checkpoint 1 -- Framework  Due Friday, Dec 22nd.  Group accounts…  Need one for you project? Let me know.  Dropboxes open 24/7  Operators are standing by… 2 1

  2. Logistics  Grad Report  Will need topics first week after we return from break (Jan 11th). 3 Plan for today  The Classic Genetic Algorithms  Questions before we start 4 2

  3. Evolutionary Algorithms  An EA uses some mechanisms inspired by biological evolution: reproduction, mutation, recombination, natural selection and survival of the fittest.  Candidate solutions to the optimization problem play the role of individuals in a population, and the cost function determines the environment within which the solutions "live".  Evolution of the population then takes place after the repeated application of the above operators. 5 Classic Genetic Algorithms  Some history  Introduced by John Holland (U of Mich) in 1975.  “Adaptation in natural and artificial systems”  Not the first to “apply” evolution to computation  However, is the origin of the framework in which we have described. 6 3

  4. Evolutionary Computation process Initialize population Select individuals for crossover (based on fitness function Crossover Mutation Insert new offspring into population Are stopping criteria satisfied? Finish 7 Classic Genetic Algorithms  Goals:  Define an application independent algorithm based on evolution.  Explore processes of evolution  Framework for analysis 8 4

  5. Evolutionary Algorithms  To use evolutionary algorithms your must:  Define your problem  Define your genotype  Identify your phenotype  Define the genotype -> phenotype translation  Define crossover and mutation operators  Define fitness  Determine selection criteria  Set population parameters 9 What made GAs unique 1. Universal Genetic Codes 10 5

  6. Bit strings  Classic GA representation GENE 0 1 1 1 0 1 0 1 CHROMOSOME 11 Bit strings  Can use to represent any phenotype 0 1 1 1 0 1 0 1 integer color … whatever float List Question of whether genetic mapping is required was mute 12 6

  7. Grey coding  a binary numeral system where two successive values differ in only one digit.  Named after Frank Grey (Bell Labs) who invented it to prevent spurious output from electromechanical switches. 13 Grey coding  Three digit grey codes:  Dec Gray Binary  0 000 000  1 001 001  2 011 010  3 010 011  4 110 100  5 111 101  6 101 110  7 100 111 14 7

  8. What made GAs unique Universal Genetic Codes 1. Multi-Parent Reproduction 2. 15 Bit strings  Easy to define crossover and mutation 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 0 1 1 1 0 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 0 1 1 Does not introduce any new allele 16 8

  9. What made GAs unique Universal Genetic Codes 1. Multi-Parent Reproduction 2. “fitness proportional” selection 3. 17 Selection Classic GAs use “fitness proportional”  selection: For each generation:  Compute fitness u(i) for each individual i 1. Define selection probabilities p(i) proportional to u(i). 2. Generate m offspring (using crossover / mutation) by 3. probabilistically choosing parents (Parents can be chosen more than once). Select only the offspring to survive. 4. 18 9

  10. Selection  Individuals only live for one generation  Compete to reproduce  No elitism  Parental suitability based on fitness  The more fit you are, the more likely you are to be chosen as a parent.  Avg fitness is not necessarily increasing  Good parents can produce bad children. 19 What made GAs unique Universal Genetic Codes 1. Multi-Parent Reproduction 2. “fitness proportional” selection 3. Problem independent 4. 20 10

  11. Problem independence  Mechanism for evolution defined in a general manner  To apply:  Genetic mapping from bit string  Define fitness.  Advantage:  Theoretic study of why and how well GAs work. 21 Top 5 misconceptions about this course. Only cover GAs 1. Will have an awfully hard final exam 2. Hey, aren’t you Prof Anderson? 3. Will cover an awful lot of theory (leading to 4. an awful final exam) Long PBS documentaries will be shown each 5. class. 22 11

  12. Some GA Theory  Goals:  Holland’s motivations  Intuitive idea of why GAs work  Taste of formal analysis of Gas  Discussion derived from [Michalewicz], Chapter 3. 23 Schemata Analysis  Schema:  Built by adding a * (don’t care) symbol to the set of valid gene values  Represents all bit strings that match on all positions except those with * 24 12

  13. Schemata Analysis  Schema:  Example: ( *111100100 )  Matches (0111100100) and (1111100100)  Example: ( *1*1100100)  Matches (0111100100) , (1111100100) and  Matches (0101100100) , (1101100100) 25 Schemata Analysis  Schema:  Any schema can match 2 r strings where r is the number of * in the schema.  Each string can be matched by 2 m schemas where m is the length of the string. 26 13

  14. Schema properties  Order of a Schema:  The order of a schema, o(S) is the number of “fixed” (I.e. non-don’t care positions)  Defining Length  Defines the “compactness” of a schema  The defining length, δ (S) is the distance between the first and last fixed position in the schema  Schemas with a single fixed position has δ (S) = 0. 27 Schema properties  S 1 = (***001*110)  S 2 = (****00**0*)  S 3 = (11101**001)  o(S 1 ) = 6 δ (S 1 ) = 10-4 = 6  o(S 2 ) = 3 δ (S 2 ) = 9-5 = 4  o(S 3 ) = 8 δ (S 1 ) = 10-1 = 9 28 14

  15. More schema properties  Strings / generation  ξ (S, t) = number of strings in a population at time t, that match schema S.  Fitness  eval(S,t) = average fitness for all strings that match schema S at time t. 29 Selection  Step 1 is to be selected as a parent.  Probability, p i of individual i being chosen is proportional to fitness.  p i = eval (v i ) / F(t) Where v i is the individual eval (v i ) is its fitness F(t) is total fitness for all individuals at time t. 30 15

  16. Selection of a schema  Probability for an individual matching schema S to get chosen as a parent:  eval (S, t) / F(t)  Number of strings matched by a schema in current generation:  ξ (S, t)  Number of parents to be selected = pop_size 31 Selection of a schema  Number of parents matching the schema for the next generation is:  ξ (S, t+1) = ξ (S, t) • pop_size • (eval (S, t) / F(t))  Letting F a = average fitness of all in generation  F a = F(t) / pop_size  Then  ξ (S, t+1) = ξ (S, t) • (eval (S, t) / F a (t)) 32 16

  17. Selection of a schema  Let’s consider this  ξ (S, t+1) = ξ (S, t) • (eval (S, t) / F a (t))  Observations:  Number of strings in a schema grows based on ratio of total fitness to average fitness.  Good schemas get more members in next generation  Bad schemas don’t. 33 One small problem  Selection is non-elitist.  We only chose parents, not offspring.  Must consider what the operations of crossover and mutation do to the chances of a schema surviving.  Questions so far? 34 17

  18. Crossover  Using standard one point crossover.  Illustate using example:  v 1 = (111011111010001000110000001000110)  This matches schemas  S 0 = (****111**************************)  S 1 = (111****************************10) 35 Crossover  v 1 = (111011111010001000110000001000110)  v 2 = (000101000010010101001010111111011)  Producing offspring:  (111011111010001000111010111111011)  (000101000010010101000000001000110) 36 18

  19. Crossover  Producing offspring:  (111011111010001000111010111111011)  (000101000010010101000000001000110)  Schemas:  S 0 = (****111**************************) δ (S 0 ) = 2  S 1 = (111****************************10) δ (S 1 ) = 32 Note:  S 0 survives, S 1 does not 37 Crossover  Observation:  Defining length of a schema has much to do with survivability due to crossover.  In fact, if crossover site is selected uniformly over entire string (with length m), the probably of destruction due to crossover:  p d (S) = δ (S 0 ) / (m-1)  Probablility of survival:  p s (S) = 1 - p d = 1 - ( δ (S) / (m-1)) 38 19

  20. Mutation  Using standard mutation operator.  Illustate using example:  v 1 = (111011111010001000110000001000110)  This matches schemas  S 0 = (****111**************************)  As long as mutation point is a don’t care the schema new individual will remain in the schema. 39 Mutation  Standard mutation operator, randomly choose a gene and flip the bit.  From survivability of the schema,  Schema survives if the flipped bit is an *.  Probability of the flipped bit being * can be approximated using the order (o(S)) of the schema.  The higher the order, the higher the probably of schema destruction. 40 20

Recommend


More recommend