genetic algorithms czech technical university in prague, faculty of electrical engineering ondřej...
TRANSCRIPT
Genetic AlgorithmsCzech Technical University in Prague, Faculty of Electrical Engineering
Ondřej Vaněk, Agent Technology Center
ZUI 2011
Evolution in nature
• Population of individuals
• Each individual has a fitness (how good he performs in nature)
• The individuals are selected based on the fitness
• They breed by combining genetic information
• New population with a few mutated individuals
• Old population is replaced by the new one.
Evolution in nature
• Population of individuals
• Each individual has a fitness (how good he performs in nature)
• The individuals are selected based on the fitness
• They breed by combining genetic information
• New population with a few mutated individuals
• Old population is replaced by the new one.
Genetic algorithms
Candidate Solutions
Candidate Problem
Solution representation
• Candidate Solution – member of a set of possible solutions to a given problem (does not have to be reasonable, it just satisfies the constraints).
• Population – a set of candidate solutions.• Fitness - a measure of performance of a solution.
– Function– Algorithm– Black Box
Explanation of Terms
1. Initialization2. Selection3. Reproduction
a. Crossoverb. Mutation
4. Replacement5. Termination
Algorithm Template
1. Initialization2. Selection3. Reproduction
a. Crossoverb. Mutation
4. Replacement5. Termination
Algorithm Template - Initialization
Create the initial population of candidate solutions
How large should the population be?
Generate Randomly? How?
Incorporate domain knowledge?
Cover range of solutions, problem
dependent
Uniform distributionSeed in promising
areas
YES!
1. Initialization2. Selection3. Reproduction
a. Crossoverb. Mutation
4. Replacement5. Termination
Algorithm Template - Initialization
Select the promising candidates for reproduction or survival
How many should I choose?
Choose Randomly? How?
Size of the population should remain
constant
Roulette wheel selection, sampling,…
1. Initialization2. Selection3. Reproduction
a. Crossoverb. Mutation
4. Replacement5. Termination
Algorithm Template - Initialization
Combine the selected candidates to produce an offspring
I am afraid it will break some good
candidatesHow to reproduce?
What are the parallels with the nature?
Don’t be Schemes are here to
save you…
1-,2-point crossover, uniform, arithmetic, …
Meiosis, genetic recombination
1. Initialization2. Selection3. Reproduction
a. Crossoverb. Mutation
4. Replacement5. Termination
Algorithm Template - Initialization
Which one is better?
Problem dependent
1. Initialization2. Selection3. Reproduction
a. Crossoverb. Mutation
4. Replacement5. Termination
Algorithm Template - Initialization
How much to mutate?
High mutation rate = random searchzero mutation rate = can stuck in local minima
1. Initialization2. Selection3. Reproduction
a. Crossoverb. Mutation
4. Replacement5. Termination
Algorithm Template - Initialization
Place new offspring into the current population
Generate completely new ones?Replace all?
You can (initialization phase)…
Elitism, generations, keep 20%,…
1. Initialization2. Selection3. Reproduction
a. Crossoverb. Mutation
4. Replacement5. Termination
Algorithm Template - Initialization
When the optimum is reached, terminate the algorithm
What to do next?How will I find out?
I am done, restart algorithm, …
Eps-optimum, value of the best candidate, …