Logistics Checkpoint 1 -- Framework Genotypes and Phenotypes Due Friday, Dec 22nd. Group accounts… Need one for you project? Let me know. Few solo acts… Logistics Logistics Grad Report This week: Will need topics first week after we return Wednesday’s office hour (2-4) canceled from break (Jan 11th). Thursday’s class (2-4) will start at 2:15. Plan for today Evolutionary Algorithms Genotypes and Phenotypes 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 Questions before we start function determines the environment within which the solutions "live". Evolution of the population then takes place after the repeated application of the above operators. 1
Evolutionary Computation process Evolutionary Algorithms To use evolutionary algorithms your must: Initialize Define your problem population Define your genotype Select individuals for crossover (based on fitness function Identify your phenotype Crossover Define the genotype -> phenotype translation Mutation Define crossover and mutation operators Insert new offspring Define fitness into population Determine selection criteria Are stopping criteria satisfied? Set population parameters Finish The Problem The Problem Parameters values that define a particular instance of the problem parameters Solution output solution Problem This is the realization of the individual (phenotype) The solution has a number of traits/variables Output This is the result of applying the solution to the problem. The output will get judged for fitness. Fitness Population fitness Individual individuals Phenotype Genotype output parameters problem Fitness 2
The individual The individual The individual consists of: Genotype genetic material Individual DNA Phenotype Phenotype Genotype Realization/manifestation of the genetic material List of traits / variables. This is the solution passed to the Problem Genetic Mapping Genetic Produces solution (set of traits) from genetic material (basic data structure) Mapping Genotype Phenotype Genotype is a basic data structure or Phenotype represents a solution to a type problem General -- very non-specific Very problem specific Genetic material that gets manipulated Manifestation of genetic material. in crossover / mutation. Some genetic vocabulary Some genetic vocabulary Genotype Gene the specific genetic makeup of an unit of heredity in every living organism. A individual, in the form of DNA. Together subsection of the genotype that can be isolated and identified to have some function. with the environmental variation that influences the individual, it codes for the Allele phenotype of that individual. Value for a specific gene. Genome Chromosome A specific instance of a genotype Collection of genes. 3
Some genetic vocabulary Genotypes Phenotype Example data types total physical appearance and constitution Bit strings or a specific manifestation of a trait, such Arrays as size, eye color, or behavior that varies Trees between individuals. Lists Matrices Bit strings Bit strings Classic GA representation Can use to represent any phenotype GENE 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 integer color … whatever float CHROMOSOME List Bit strings Arrays Easy to define crossover and mutation Representing set of parameters Unlike bit strings 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 Each “gene” has meaning in and of itself 1 0 1 1 1 0 1 1 10 21 36 12 7 9 62 1 0 1 1 1 1 1 0 1 0 1 1 1 1 0 1 1 4
Arrays Trees Easy to define crossover / mutation Representing hierarchical data Program structure 10 21 36 12 7 9 62 1 10 21 36 12 7 9 62 1 a 27 62 96 2 72 19 6 16 b c d 10 21 36 12 72 19 6 16 10 21 36 12 10 9 62 1 e f g Trees Lists Easy to define crossover / mutation Variable sized crossover mutation … Before crossover Before mutation After crossover After mutation Lists Matricies For multidimensional data Easy to define crossover / mutation 0 1 2 3 0 1 2 3 � 0 1 1 0 � � 10 19 26 32 � � � � � 10 11 12 0 1 0 0 14 1 0 62 0 1 3 � � � � � 1 1 1 1 � � 11 31 47 99 � 10 1 2 11 12 � � � � 0 0 1 0 12 30 3 18 � � � � Bitwise Integer valued 5
Matrices Genotypes Easy to define crossover and mutation Summary Basic � 0 0 1 0 � � 0 1 1 1 � � � 0 0 1 1 � � � � � � Simple 0 0 0 0 0 1 1 1 0 0 1 1 � � � � � � � 0 0 1 1 � � 1 1 1 1 � � 0 0 1 1 � Easy to define crossover and mutation � � � � � � 0 0 1 0 0 0 1 1 � � � � 0 0 1 1 � � � 0 1 1 1 � � 0 1 1 1 � � � � � Questions 0 1 1 1 0 1 1 1 � � � � 1 � 1 1 1 1 � � 1 1 0 1 � � � � � 0 0 1 1 0 0 1 1 � � � � Genetic Mapping Bad Mojo What if you have a bad instance of a genotype. Fix during genetic mapping (repair) Individual Disallow during crossover / mutation Phenotype Genotype (designer operators) Eliminate during evaluation. Genetic Mapping Genetic Mapping Traveling Salesman Problem Responsible for taking a basic generic Instance: genome and turn it into a problem-specific N cities with distances between pairs of solution. cities May require some “genetic repair” Said another way: Complete graph with n vertices such that all Questions? edges are labeled with a cost value Break? 6
Traveling Salesman Problem Traveling Salesman Problem Output: Solution: Distance traveled to complete the tour. Tour of the cities such that each city is visited once. Let’s look at some genotype-phenotype pairs Said another way: for TSP A permutation of the cities. From [Larranaga, et. al. 1999] Ordered list of the cities Recall: Is this a large search space? Phenotype == ordered tour of the cities n cities = n! permutation TSP - Path Representation TSP - Path Representation Tour is represented as an ordered list Most intuitive and common genotype. (or array) of the cities. But it has it’s problems: Order in array == order of visitation. If city i is the jth element of the array, city 3 2 4 1 7 5 8 6 3 2 4 1 7 5 8 6 i is the jth city to be visited. Eg. 8 7 6 5 4 3 2 1 3 2 4 1 7 5 8 6 3 2 4 1 4 3 2 1 3 2 4 1 3 5 8 6 Tour: 3-2-4-1-7-5-8-6 Not valid tours!!! TSP - Path Representation TSP - Path Representation GeneRepair [Mitchell, et.al.] 1 2 3 4 5 6 7 8 Keep a corrective template with a valid tour. Identify duplicate cities 3 2 4 1 3 7 5 8 6 Use template to replace duplicate cities. 7
TSP - Path Representation TSP - binary representation Genetic Mapping responsible for doing Classic GA approach the repair on a “bad genome” Each city encoded by a string of length log 2 (n) -- chromosomes? Complete genome is concatination of cities Most approaches that use the path in order. representation use designer Complete genome has length n log 2 (n) crossover/mutation operators Assure valid offspring. TSP -- binary representation TSP -- binary representation Example Similar problem with repair. i City i i City i (000 001 010 011 011 101) 1-2-3-4-5-6 1 000 4 011 (101 100 011 010 001 000) 6-5-4-3-2-1 2 001 5 100 3 010 6 101 (000 001 010 010 001 000) 1-2-3-3-2-1 Tour: 1-2-3-4-5-6 (000 001 010 011 100 101) Duplicate cities TSP -- binary representation TSP - Adjacency Representation Genetic Mapping: Tour is represented as an array of n cities. Decode binary -> city. City j is listed in position i, if and only if, Perform repair for “bad genome”. the tour leads from city i to city j. (Allows for schematic analysis) 8
TSP - Adjacency Representation TSP - Adjacency Representation Example: Has same problem as others PLUS ( 3 5 7 6 2 4 1 8) 3 5 7 6 4 8 2 1 3 1 2 4 1 3 7 2 5 4 6 8 8 6 7 5 TSP - ordinal representation TSP - Adjacency Representation Note: Tour is represented as an array of n cities. Same phenotype as path representation Different Genetic Mapping. The ith element is a number in the range from 1 to (n - i + 1) There exists an ordered list of cities to use as a reference point. …and here’s another one TSP - ordinal representation TSP - ordinal representation Example Complex? Perhaps, but std. crossover works! C = ( 1 2 3 4 5 6 7 8 9 ) Genome: 1 1 2 1 4 1 3 1 1 1-2-4-3-8-5-9-6-7 1 1 2 1 4 1 3 1 1 5-1-7-8-9-4-6-3-2 5 1 5 5 5 3 3 2 1 1 2 4 3 8 5 9 6 7 1-2-4-3-9-7-8-6-5 1 1 2 1 5 3 3 2 1 9
Recommend
More recommend