Professional Documents
Culture Documents
Amoozesh Genetic & TSP
Amoozesh Genetic & TSP
payam_csut@yahoo.com
: .
Traveling Salesman Problem . TSP
.
.
:
Gene Chromosome Allele Encoding Population Evaluation Fitness Selection Crossover Mutation
Decoding Generation Parent
1. Encoding :
) (Representation
1960
1975
Holland .
.1 ) : (gene .
.2 ) : (allele .
) ( First Population
.3 ) : (choromosome
.
Encoding , Evaluation ,
) .( binary
Crossover , Mutation
.
13 1 1 0 1
) ( 4
9 1001
2. Evaluation :
:
) (Figure 1 crossover
crossover
(Figure 2) .
x
) (First Population .
4. Mutation :
.
f(a)=3 f(b)=5
Mutation
a Fitness a
) ( allele
3. Crossover :
(Figure 3).
2 ) ( .
) (
) (Selected
.
5. Decoding :
.
Crossover
encoding.
Mutation
Crossover .
Crossover
decoding
) random(
.
)(c
)(b
)(a
(a ) . (.
(b ) ( point ) ( random .
(c ) ( .
Child
Chromosome
Crossover
Point
Mother Chromosome
Father
Chromosome
100|10110
10110110
10010011
100000|10
10110110
10000000
10|101110
11101110
10110110
10110|110
11101110
10110110
)(Figure 1
Child
Chromosome
Cross
Point 2
Cross
Point 1
Mother
Chromosome
Father
Chromosome
100|1011|1
10110110
10010011
10000|110
10110110
10000000
10|10|0110
11101110
10110110
)(Figure 2
)(Figure 3
:
.7
) ( New Generation
:
.8
.1
n
l.
.2
fitness
.3
) fitness
(
.4
crossover
.5
mutation p
.6
n
. evaluation
fitness . selection
fitness
parent .
crossover mutation
.
fitness
) ( new generation .
) : p (quality) q
evaluation .
(.
) selection ( 3
parent
;
selection Roulette Wheel Selection
parent fitness .
) ( Figure 4 .
fitness
x=2 4 x=0
2 x=2
x= 0 .
Fitness
Chromosome
20
10110110
10000000
15
11101110
10010011
12
10100010
f(3) = 6
3 0011
f(8) = -19
8 1000
: f(x) = -x + 6x -3 .
0 x 15
x N .
crossover .4
crossover .
:
encoding .1
0 x 15
0010
point = 3
1001
0011
1000
. 15
1 1 1 1
) ( l =4 .
mutation .5
: mutation
Evaluation .2
fitness
) f(x .
) 0 1 1 0 = (6
)1 1 0 1 = (13
point = 2
0010
1001
fitness
n .
)
( x = 6 .
parent .
) ( far
.
evaluation
quality.
fitness
fitness min
Max
. fitness
fitness
.
.
.
. 1 fitness
] [0 , 15
selection
.
) .
(.
mutation .
. 2 Super - Subject
. ) (
. n
n .
n
:
.
! n .
) : ( Windowing fitness
! n . n
fitness .
fitness
)(None-Polynomial
TSP
.
) : ( Exponential fitness
) (Polynomial .
) (fitness + 1 .
) : ( Linear Transformation
) .(Greedy
fitness.
f2 = a ( f1 ) + b
.
.
) : ( Linear Normalization 10
100 90 ... 10
10 .
Greedy
Nearset Neighbor .
Distribution
) ( n
) ( .
TSP
1931 . Euler
1759
TSP .
.
.
) G(v,e
)( .
.
.
.
.
Crossover .2
TSP
.
1234|567|8
8521|567|7
Encoding .1
encoding
crossover :
1 i j i
j 0.
v1 = 1 2 3 4 | 3 6 4 | 8
v2 = 8 5 2 1 | 5 6 7 | 7
0 1
v1 5 7
3 4 .
encoding .
v2 3 4 5 7
.
PMX
3 5 6 6 4 7
crossover .
:
1 3 3
2 2 1 .
.
v = 1234
12573648
83215674
crossover
.
2 3 4
. .
crossover
1234 2341.
v = 3124
1 3 3
2 2 4 4 2
encoding 1234
1 2 3 4 1
.
:
12345678
. 3412 1
85213647
3 1 2 4
2 .
v1 :
parent :
v1 = 1 - - - - - - -
48135762
47563821
parent
.
1 8
8
crossover .
8 2 1 v1 7 6 2 v2
:
:
43576
v1 = 1 - - - - - - 8
45381
7 4
crossover
v1 = 1 - 4 - - - 7 8
v1 = 5 7 6 8 2 1 4 3
v2 = 3 8 1 7 6 2 4 5
v1
.
Crossover Metrix .
crossover .
parent
fitness, parent
.
Order Crossover PMX
.
.
:
135|762|48
563|821|47
:
v1 = - - - | 8 2 1| - v2 = - - - | 7 6 2| - crossover
parent .
crossover
crossover . :
1
1 . 1
1 .
1 .
.
) Grefenstette (1981 crossover
parent .
.
:
v1 = 1 2 3 4 5 6
v2 = 3 6 4 2 1 5
parent 1
3
.
a a b c b
1 .
a a b c a
b c .
.
parent
parent
crossover
parent .
:
parent .
crossover
123|456
crossover .
364|215
crossover
.
Heuristic Crossover
v1 = 1 2 3 | 6 4 5
parent
v2 = 3 6 4 | 1 2 5
.
.
crossover
:Mutation .3
) (2 - opt .
) (a , b ) (c , d
4
) (c , d ) (a , c ) (d , b .
a b c d
b c .
) (3 - opt
30 PMX
498 Order Crossover
425 . Cycle Crossover
517 .
) 30( 420
Order Crossover .
Matrix Crossover .
crossover 30
50 75 100 318 420 426 535
. ) (a , b )(c , d
629 42154 . 2
) (e , f
.
) (or - opt ) (2 - opt.
crossover
crossover mutation
) ( 2 - opt
mutation crossover .
. n
Mutation
.
mutaion .
.
Heuristic Algorithm .
Heuristic Algorithm ( 2 opt )mutation
.
:TSP
encoding
crossover mutation TSP
.
.
TSP
Heuristic Crossover
. crossover
encoding
crossover
( 2 opt )mutation .
Heuristic Information .
PMX crossover
mutation . 33
TSP .
10
. 100 210 .
Matrix
TSP
Heuristic Information
TSP
.
:
[1]. Kylie Bryant , Genetic Algorithm and the Traveling Salesman Problem , Hervey Mudd college , 2000
[2]. Dr Alex Rogers , CM2408 Symbolic Al Lecture 8 Introduction to Genetic Algorithms ,December 2002
[3]. Mehrdad Dianati , Insop Song , Mark Treiber , An Introduction to Genetic Algorithms and Evolution Strategies ,
University of Waterloo , Canada , 2002
[4]. Jean Philippe , Ph.D , Genetic Algorithm Viewer : Demonstration of a Genetic Algorithm , May 2000
[5]. Eric Krevice Prebys , The Genetic Algorithm in Computer Science , 1997
[6]. Marcin L. Pilat and Tony White , Using Genetic Algorithms to Optimize ACS-TSP , School of Computer Science,
Carleton University , Canada , 2000
[7]. Genetic Algorithm , Beasly Bull Martin , October 2000
[8]. Dr. George Magoulas , Some problems are too difficult to solve , CS3018S
[9]. Byung-In Kim , Jae-Ik Shim , Min Zhang , Comparison of TSP Algorithms , December 1998
[10]. Chia-Hsuan Yeh , Graduate Course An Introduction to Genetic Algorithms , Goldberg , 1989