Documente Academic
Documente Profesional
Documente Cultură
Genetic Algorithm
Page 2
Genetic Algorithm
Page 3
Genetic Algorithm
On the picture we can see a human cell with all metaphase chromosome ordered
by size and an other attribute
metaphase: the state of gen dividing when the chromosomes are situated in the plane of the equator of
cell.
Page 4
Genetic Algorithm
Genetic Algorithm
Genetic Algorithm
Page 7
Genetic Algorithm
Biological Background
(natural secection)
Page 8
Genetic Algorithm
Genetic Algoritm
(in Technical Tasks)
Page 9
Genetic Algorithm
Genetic Algoritm
(in Technical Tasks)
Page 10
Genetic Algorithm
Indirect methods
Newton
Evolutionary algorithms
Evolutionary strategies
Centralized
Simulated annealing
Dynamic programming
Genetic algorithms
Parallel
Page 11
Enumerative techniques
Distributed
Sequential
Steady-state
Generational
Genetic Algorithm
Page 12
Genetic Algorithm
_initialize population;
_evaluate population;
while Termination_Criteria_Not_Satisfied
{
Genetic Algorithm
selected
parents
modified
children
parents
initialization
population
deleted
members
modification
evaluated
children
evaluation
discard
Page 14
Genetic Algorithm
population
Bit strings
Real numbers
Permutations of element
Lists of rules
Program elements
... any data structure ...
Page 15
(0110001011010011100)
(43.2, -33.1, ... 0.0, 89.2)
(E11, E3, E7, ... E1, E15)
(R1, R2, R3, ... R22, R23)
(genetic, programming)
Genetic Algorithm
linear decoding
parameter range
Page 16
x=26+13*(4/31) = 27.68
Genetic Algorithm
Page 17
Genetic Algorithm
x1
Page 18
Genetic Algorithm
representation by graph
Page 19
Genetic Algorithm
selected
parents
parents
population
Parents are selected at random with selection
chances biased in relation to chromosome
evaluations (fitness function).
Page 20
Genetic Algorithm
Page 21
Genetic Algorithm
Page 22
Genetic Algorithm
F[pv5]
F[pv6]
F[pv3]
F[pv2
]
F[pv1]
F[pv7]
F[pv8]
area = fitness(x7,y7)
Page 23
Genetic Algorithm
Genetic Algorithm
Genetic Algorithm
modification
modified children
Page 26
Genetic Algorithm
Modification; Crossover
cut
P1
P2
(0 1 1 0 1 0 0 0)
(1 1 0 1 1 0 1 0)
(1 1 0 0 1 0 0 0)
(0 1 1 1 1 0 1 0)
Ch1
Ch2
Page 27
Genetic Algorithm
Modification; Mutation
random selected positions
Before:
(1 0 1 1 0 1 1 0)
After:
(0 1 1 0 0 1 1 0)
Before:
After:
Page 28
Genetic Algorithm
modified
children
evaluation
Page 29
Genetic Algorithm
discard
Generational GA:
entire populations (fully) replaced with each iteration
Steady-state GA:
a few members replaced each generation
Page 30
Genetic Algorithm
Cycle of Reproduction
Page 31
Genetic Algorithm
Page 32
Genetic Algorithm
A Simple Example
The Travelling Salesman Problem (TSP):
We search the summa of distance between the
towns with the next conditions:
we can visit every town only ones
we have to minimize the full distance
(summa distance between the towns in a
given sequence)
Page 33
Genetic Algorithm
Representation of TSP
Representation is an ordered list of city
numbers known as an order-based GA.
1) Oulu
3) Velence
2) Budapest 4) Singapur
CityList1
CityList2
Page 34
5) Peking
6) London
7) Tokio
8) New York
(3 5 7 2 1 6 4 8)
(2 5 7 6 8 1 3 4)
Genetic Algorithm
Crossover of TSP
Crossover combines inversion and recombination:
random selected positions
Parent2
*
*
(3 5 7 2 1 6 4 8)
(2 5 7 6 8 1 3 4)
Child
(5 8 7 2 1 6 3 4)
Parent1
Page 35
Genetic Algorithm
Mutation of TSP
Mutation involves reordering of the list:
random selected positions
Before:
*
*
(5 8 7 2 1 6 3 4)
After:
(5 8 6 2 1 7 3 4)
Page 36
Genetic Algorithm
Page 37
Genetic Algorithm
Genetic Algorithm
Page 39
Genetic Algorithm
Page 40
Genetic Algorithm
Representation of MVFN
The chromosome is coded with a vector of real
numbers.
x = { -20.0, +12.0 }
y = { -30.0, +100.0 }
range of search x
range of search y
chromosome(1)
chromosome(2)
Page 41
Genetic Algorithm
Crossover of MVFN
Parent(1)= [x(1), y(1)];
{1-a}*x(2),
{1-a}*y(2) ]
+ a*x(2),
+ a*y(2) ]
/ type!!! /
/ ranges!!! /
/ ranges!!! /
Genetic Algorithm
Mutation of MVFN
The mutation a randomly selected element value
changing randomly:
a,b = random numbers with range {0..1} / type!!! /
c = constant { for example = 0.25 }
Before: [ x1, y1 ]
After: [ x1 + (x1max - x1min)*c*a,
y1 + (y1max - y1min)*c*a ]
Page 43
/ ranges!!! /
/ ranges!!! /
Genetic Algorithm
f ( x ) = (b a )
0
Page 44
if a x b
otherwise
Genetic Algorithm
e x
f (x) =
0
Page 45
for 0 x
otherwise
Genetic Algorithm
y
f ( x ) =
e
2
( x ) 2
y=
2 2
Page 46
Genetic Algorithm
Page 47
Genetic Algorithm
Genetic Algorithm
f ( x ) = 20 x[ i ] 5.0
i =1
Page 49
Genetic Algorithm
i =1
Page 50
Genetic Algorithm
Genetic Algorithm
Page 52
Genetic Algorithm
representation of information
population size, mutation rate, ...
selection, deletion policies
crossover, mutation operators
Termination Criteria
Performance, scalability
Solution is only as good as the evaluation
function (often hardest part)
Page 53
Genetic Algorithm
Page 54
Genetic Algorithm
Many ways to speed up and improve a GAbased application as knowledge about problem
domain is gained.
Easy to exploit previous or alternate solutions.
Flexible building blocks for hybrid applications.
Substantial history and range of use.
Page 55
Genetic Algorithm
When to Use a GA
Page 56
Genetic Algorithm
Application Type
Control
Design
Scheduling
Robotics
trajectory planning
Machine Learning
Signal Processing
Game Playing
Combinatorical
Optimization
Page 57
Genetic Algorithm
Page 58
Genetic Algorithm