Genetic Algorithm
Genetic Algorithm
ALGORITHM
General Introduction to GAs
Genetic algorithms (GAs) are a technique to solve
problems which need optimization.
History of GAs:
• Evolutionary computing evolved in the 1960s.
• GAs were created by John Holland in the mid-1970s.
Biological Background (1) – The
Cell
Every cell is a complex of many small
“factories”
working together.
The center of this all is the cell nucleus.
The nucleus contains the genetic
information.
Biological Background (2) – Chromosomes
Genetic information is stored in the chromosomes.
Mitosis is the
copying genetic same
to
information
exchange of information.
offspring: there new
Mitosis is the is normal
way of growing no of
multicell structures, like
organs.
Biological Background (5) – Reproduction
Meiosis is the basis of
sexual reproduction.
In reproduction two
gametes conjugate to a
zygote wich will become the
new
Hencindividual.
genetic
e information is
share tobetween
order create new the
offspring.
d parents in
Biological Background (6) – Natural
Selection
The origin of species: “Preservation of favorable
variations and rejection of unfavorable variations.”
space). 1.5
has a
fitness value, depending 0.5
on the problem
definition. 0
0
1000
100 200 300 400 500 600 700 800 900
Chromosome A 1011001011001110010
Chromosome B 1111111000000001111
1
🞭 Permutation Encoding – Useful in ordering problems such as the
Traveling Salesman Problem (TSP). Example. In TSP, every
chromosome is a string of numbers, each of which represents
a city to be visited.
Chromosome A 1 5 3 2 6 4 7 9 8
Chromosome B 8 5 6 7 2 3 1 4 9
ENCODING METHODS (CONTD.)
🞭 Value Encoding – Used in problems where
complicated values, such as real numbers, are used and where
binary encoding would not suffice.
Good for some problems, but often necessary to develop some specific crossover and
mutation techniques for these chromosomes.
(forward)
ENCODING METHODS (CONTD.)
This encoding is used mainly for evolving programs or expressions,
i.e. for Genetic programming. Every chromosome is a tree
of some objects, such as values/arithmetic operators or
commands in a programming language.
( do_until step
(+ x (/ wall )
5 y)
)
SELECTION TECHNIQUES
Roulette Selection
Rank Selection
Tournament Selection
HOW IT WORKS ?
ROULETTE WHEEL SELECTION
Chromosome
1
Chromosome
2
Chromosome
3
Chromosome
4
All you have to do is spin the ball and grab the chromosome at the point it stops
HOW TO SIMULATE ROULETTE
WHEEL SELECTION SCHEME ?
Suppose there are 10 chromosomes...
Evaluate the fitness function of all the
chromosomes
Arrange the chromosomes in the descending
order of their fitness values…(If u r going to
maximize the objective function).
Let say Pc = 0.8. Then select the best 8
chromosomes from the entire population.
That means select the first 8 chromosomes.
Now these chromosomes will be paired up
randomly and then they will crossover.
CROSSOVER
How it works ?
Several methods ….
Genetic Algorithm – Crossover (Single
Point)
Choose a random point on the two
parents.
Generalization of 1 point.
UNIFORM CROSSOVER
METHODS
Each gene (bit) is selected randomly
from one of the corresponding genes of the parent
chromosomes
1. Function
Optimization
2. System
Identification
3. Channel
Equalization