Lec2 Genetic Algorithm
Lec2 Genetic Algorithm
8) Conclusion
The 4-Queen Problem
Fortunately, one month later, the King requested the professor to solve
6-Queen problem. The professor thought that the King may request him
to solve 16-Queen problem within next 10 months.
The genetic algorithm is a method for solving both constrained and unconstrained
optimization problems that is based on natural selection, the process that drives
biological evolution.
John Holland introduced Genetic Algorithm (GA)
Darwin’s theory of evolution
GA: PROCEDURE
Pseudo-code of GA:
START
Generate the initial population
Compute fitness
REPEAT
Selection
Crossover
Mutation
Compute fitness
UNTIL population has converged
STOP
Formulation of Genetic John Holland introduced Genetic
Algorithm (GA)
Darwin’s theory of evolution
Algorithm
Chromosome of Mother: 3 8 5 7 1 6 1 5
Crossover: Chromosome of Father: 3 8 4 7 2 3 2 5
Chromosome of Mother: 3 8 5 7 1 6 1 5
Chromosome from Father: 3 8 4 7 2 3 2 5
Offspring 1: 3 8 4 7 1 6 1 5
Crossover point
Offspring2: 3 8 5 7 2 3 2 5
3 8 4 7 2 3 2 5
3 8 5 7 1 6 1 5
2 4 4 1 5 1 2 4
3 2 5 4 3 2 1 3
Mutation:
Before Mutation:
Offspring 1: Offspring2:
Offspring 1: 3 8 4 7 1 6 1 5
Offspring2: 3 8 5 7 2 3 2 5
After Mutation:
Offspring 1: 3 8 4 7 1 6 2 5
3 8 4 7 1 6 2 5 3 8 6 7 2 3 2 5
Offspring2: 3 8 6 7 2 3 2 5 Fitness=28-0=28 Fitness=28-7=21
GENETIC ALGORITHMS
• Fitness function: number of non-attacking pairs of queens (min = 0, max = 8 × 7/2 = 28)
• 24/(24+23+20+11) = 31%
• 23/(24+23+20+11) = 29% etc
Solution of 8-Queen Problem John Holland introduced Genetic
Algorithm (GA)
using Genetic Algorithm Darwin’s theory of evolution
The 4-Queen Problem
Initial Population
GA: ANALYSIS
Order crossover is similar to that of Two Point crossover,
but in the case of Order Crossover, a part from first parent
is copied to offspring chromosome and the remaining values
are placed in the offspring by the order by which they
appear in second parent.
PARTIALLY MAPPED CROSSOVER(PMX): It is
similar to that of two – point crossover. In this method, two crossover
points are chosen among two parents and the genes between two
crossover points are exchanged, while remaining genes are filled by
partial mapping.
CYCLE CROSSOVER (CX):
In cycle crossover, a gene from one parent will be copied into an offspring, but it should inherit the position
of the other parent.
SELECTION:
• Flip-Bit
• Swapping
Conclusion
Application areas of GA:
Game programming
Combinatorial optimization
Operational research
REFERENCES
• Fraser, Alex; Burnell, Donald (1970). Computer Models in Genetics. New York: McGraw-Hill.
• Crosby, Jack L. (1973). Computer Simulation in Genetics. London: John Wiley & Sons.
• UC Berkeley's Hans Bremermann, professor emeritus and pioneer in mathematical biology, has died at
69
• Fogel, David B. (editor) (1998). Evolutionary Computation: The Fossil Record. New York: IEEE Press.
• Barricelli, Nils Aall (1963). "Numerical testing of evolution theories. Part II. Preliminary tests of
performance, symbiogenesis and terrestrial life". Acta Biotheoretica (16): 99–126.
• How to easily find the optimal solution without exhaustive search using Genetic Algorithms
RESEARCH