2. Overview of Topics
1. Biological inspiration
2. What is evolutionary computing (EC)
3. General outline of the evolutive algorithm (EA)
4. Genetic algorithm (GA) overview
5. SGA technical summary
6. SGA reproduction cycle
7. SGA operators
8. Practical Application Example:
“It is not the strongest of the
species that survives, nor the most
intelligent, but the one most
responsive to change.”
3. Biological Inspiration
● To understand biological processes
properly, we must first have an
understanding of the cell
● Human bodies are made up of
trillions of cells
● Each cell has a core structure
(nucleus) that contains your
chromosomes
● Additionally, each of our 23
chromosomes are made up of tightly
coiled strands of deoxyribonucleic
acid (DNA)
The Origin of
Species (1859)
4. Biological Inspiration
● Reproduction involves
recombination of genes
from parents and then small
amounts of mutation (errors)
in copying
● The fitness of an organism is
how much it can reproduce
before it dies
● Here is an example of the
passing of chromosomes
within human reproduction
5. What is evolutionary computing (EC)
● Evolution of species:
○ Natural selection
○ Genetic operators
● Biological sciences provide inspiration and
terminology
6. General Outline of EA
Population
Offspring
Parents
Parent selection
Recombination
Mutation
Survivor selection
Initialization
Termination
7. Genetic algorithm (GA) overview
● Originally developed by John Holland (1975).
● Genetic Algorithm’s have 2 essential components:
○ “Survival of the fittest”
○ Genetic Diversity
● The genetic algorithm (GA) is a search heuristic that
mimics the process of natural evolution.
● Attributed features:
○ Not too fast
8. Genetic algorithm (GA) overview
● Holland’s original GA is now known as the simple
genetic algorithm (SGA).
● Other GAs use different:
○ Representations
○ Mutations
○ Crossovers
○ Selections mechanisms
● Applications:
○ Optimization and Search Problems
9. The Simple GA
● Has been subject of many (early) studies
○ Still often used as benchmark for novel GAs
● Shows many shortcomings, e.g.
○ Representation is too restrictive
○ Mutation & crossovers only applicable for bit-string & integer
representations
○ Selection mechanism sensitive for converging populations with
close fitness values
○ Generational population model (step 5 in SGA repr. cycle) can be
improved with explicit survivor selection
10. SGA technical summary
Representation Binary strings
Recombination N-point or uniform
Mutation Bitwise bit-flipping with fixed
probability
Parent selection Fitness-Proportionate
Survivor selection All children replace parents
speciality Emphasis on crossover
11. SGA reproduction cycle
1. Select parents for the mating pool (size of mating pool
= population size)
2. Shuffle the mating pool
3. For each consecutive pair apply crossover with
probability pc , otherwise copy parents
4. For each offspring apply mutation (bit-flip with
probability pm independently for each bit)
5. Replace the whole population with the resulting
offspring
12. SGA operators: Point crossover
● Choose a random point on the two parents
● Split parents at this crossover point
● Create children by exchanging tails
● Pc typically in range (0.6, 0.9)0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Parents
Children
13. SGA operators: Mutation
● Alter each gene independently with a probability pm
● pm is called the mutation rate
○ Typically between 1/pop_size and 1/ chromosome_length
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 1 0 0 1 0 1 1 0 0 0 1 0 1 1 0 0 1
Child
Parent
14. SGA operators: Selection
● Main idea: better individuals get higher chance
○ Chances proportional to fitness
○ Implementation: roulette wheel technique
■ Assign to each individual a part of the roulette wheel
■ Spin the wheel n times to select n individuals
A
3/6 = 50%
B
1/6 =
17%
C
2/6 = 33%
fitness(A) = 3
fitness(B) = 1
fitness(C) = 2
15. N-Queen Problem
● N-Queen dates back to the 19th century (studied by
Gauss)
● Classical combinatorial problem, widely used as a
benchmark because of its simple and regular
structure.
● Problem involves placing N queen on a N x N
chessboard such that no queen can attack any other.
16. N-Queen Problem
This problem contains three constraints:
1. No two queens can share a same row.
2. No two queens can share a same column.
3. No two queens can share a same diameter.
17. N-Queen Problem: Cycle
Initialize Population
Parent Selection
Satisfy
Constraints
Children
Mutation
Insert Children
Select The Best
ThenElse
n + 1
generation
23. Take a look at
● N-Queen report
● N-Queen source code at GitHub.
● Eiben, A. E. y Smith, J. E., (2015), Introduction to
Evolutionary Computing, Springer, 2da. Edición, ISBN:
978-3-540-40184-1
● Mitchell, M., (2014), An Introduction to Genetic
Algorithms, MIT Press
● Goldberg, D. E., (2007), Genetic Algorithms in Search,
Optimization, and Machine Learning, Addison-Wesley
Publishing Company, Inc., 2007, ISBN: 0201157675.