Download presentation
Presentation is loading. Please wait.
1
Chapter 6: Genetic Algorithms
July 15, 2009 Rob Bilger
2
Overview History & Applications Biological Definition
Mathematical Definition Sample problem Overview
3
History “Modern” Heuristics Holland, 1960
Useful for complex objective functions If problems are too difficult to solve using current methods Referred to as “modern heuristics” even though developed over 30 years ago. But, it wasn’t until recently that it became more popular among Operations Researchers. Explain why problems become too big (too many variables, too many constraints); Bogs down the processor and chews up all of the memory on PC. History
4
Applications p-Median Problem Traveling Salesman problem (TSP)
Chapter 6, Facility Location text Traveling Salesman problem (TSP) Scheduling problems Referred to as “modern heuristics” even though developed over 30 years ago. But, it wasn’t until recently that it became more popular among Operations Researchers. Applications
5
Biological Definition
A random search technique designed to imitate the selective breeding or evolution of organisms It contains chromosomes, crossover, mutation, and the survival of the fittest principle Biological Definition
6
Biological Definition (cont’d)
Initially, there is a random pool (P, population) of solutions (chromosomes) P = 5 P = k * (n/p) where k > 1 Each chromosome (feasible solution) is typically encoded as a binary string Randomly generate the initial population set. Must meet the constraints of the problem. n = genes, 4 in this case; p = 2 in the example of the p-Median problem. K is used to eliminate risk. In the case of doing a binary example, a large k would eliminate the chance of having all 0’s in the last data point. Biological Definition (cont’d)
7
Biological Definition (cont’d)
Each of these chromosomes has a fitness value that corresponds to the objective function objective min = a+2b+3c+4d Next, two solutions (or parents) from this pool (population) are selected for mating to produce two new solutions (offspring) Also, state that you calculate the objective function given each candidate solution before you talk about ranking the objective values for the candidates in the population. Biological Definition (cont’d)
8
Biological Definition (cont’d)
How the offspring are produced is the core part of GA Rank objective function solutions, i probability for selection = 2i / [P(P+1)] where i = (worst) 1, 2, 3, ……. P (best) Parents are selected at random using these probabilities to ensure best Also, state that you calculate the objective function given each candidate solution before you talk about ranking the objective values for the candidates in the population. You want to rank them i=1 is worst, i=5 is best. Assign CDF based on this ordered ranking. Then when you randomly select two points, your probability of selecting the best two is greatest. When discussing how offspring are produced, you should talk about how the first generation is created randomly. When selecting the parents for the next generation, the higher probability for better candidate does not 'ensure' that they get selected, it only makes it more likely for 'good' parents to be selected. Biological Definition (cont’d)
9
Biological Definition (cont’d)
Copying parts of the parent chromosomes to the offspring is done by identifying a random crossover point Chromosome sections – after crossover point – are exchanged to create offspring Source: The book describes 4 methods for crossovers: Modified Basic Operator String-of-Change Operator Template Operator Backward-Crossover Operator Biological Definition (cont’d)
10
Biological Definition (cont’d)
Parents are replaced by the offspring to keep the population size constant Replacements are referred to as the new generation This technique can be repeated until a stopping criteria is satisfied: Fixed number of generations, or Quality of solution discovered Biological Definition (cont’d)
11
Biological Definition (cont’d)
Mutation rate, M = 1% typically Done to enrich the gene pool through diversification Randomly change one element Invasion frequency, IR% More intense version of mutation where randomly generated solutions replace IR% of the population every 1/IF generations. GA’s are best when there are a small number of constraints (or none) and a complicated objective function. This is why the book chose the p-Median problem to solve. Biological Definition (cont’d)
12
Mathematical Definition
P = size of initial population G = number of generations O = number of overlapping solutions M = mutation rate Ci = crossover operator I Zj = fitness value of solution j IF = frequency of invasions IR = % of population replaced by invasion Mathematical Definition
13
Sample Problem p-Median problem
Locate p facilities to minimize the demand weighted distance between each demand node and its assigned facility Min ΣΣ hi dij yij s.t. Σ xj = p Σ yij = 1 yij - xj ≤ 0 xi {0, 1} yij {0, 1} Sample Problem
14
Sample Problem p = 2 # of facilities to locate P = 6 population
n = 5 elements in solution (genes) Sample Problem
15
Closing Disadvantage of GA is the number of parameters involved:
Size of initial pool Method for selecting parents for mating The crossover operator The number of offspring to produce The replacement technique The mutation rate GA’s are best when there are a small number of constraints (or none) GA’s are best when there are a small number of constraints (or none) and a complicated objective function. This is why the book chose the p-Median problem to solve. Closing
16
Q & A Questions
17
What are the different crossover methods for creating new solution sets (offspring). Explain each.
Again using the p-Median example with P=6, p=2, and n=5 create a new generation of offspring using the Template Operator [ 1,0,1,0,1 ] and initial pool [0,1,1,0,0], [1,1,0,0,0], [0,0,1,0,1], [0,0,1,1,0], [1,0,0,0,1], [0,1,0,0,1] with i values of 1, 2, 3, 4, 5, 6 respectively. For purposes of this exercise assume parents for mating are randomly selected with i values 5, 6; 3, 5; and 4, 6. What problems do you notice with the new generation? Which crossover operator did the text choose for the p-Median problem? Why? Describe a problem that may arise from using one of the other crossover operators. Homework
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.