GA Selection Strategies for TSP Optimization
GA Selection Strategies for TSP Optimization
Abstract—A genetic algorithm (GA) has several genetic The different selection strategy used in the GA process
operators that can be modified to improve the performance of will significantly affect the performance of the algorithm
particular implementations. These operators include parent differently. This study is intended to examine the
selection, crossover and mutation. Selection is one of the performance of GA when using different selection strategy
important operations in the GA process. There are several ways
specifically in solving the travelling salesman problem
for selection. This paper presents the comparison of GA
performance in solving travelling salesman problem (TSP) (TSP). TSP is a classical example of a NP-hard
using different parent selection strategy. Several TSP instances combinatorial optimization problem. Many production and
were tested and the results show that tournament selection scheduling problems can be reduced to a simple concept that
strategy outperformed proportional roulette wheel and rank- there is a salesman who must travel from city to city, visiting
based roulette wheel selections, achieving best solution quality each city exactly once and returning to the home city [2]. It
with low computing times. Results also reveal that tournament
and proportional roulette wheel can be superior to the rank-
is possible for the salesman to select the orders of the cities
based roulette wheel selection for smaller problems only and visited so that the total distances travelled in his tour is as
become susceptible to premature convergence as problem size small as possible which will apparently save him time and
increases. money [2]. Although TSP is conceptually simple, it is
difficult to obtain an optimal solution. The main difficulty of
Index Terms— Genetic algorithm, Selection, Travelling this problem is the enormous number of possible tours; (n-
salesman problem, Optimization
1)!/2 for symmetric n cities tour. As the number of cities in
the problem increases, the numbers of permutations of valid
tours are also increase. It is this factorial growth that makes
I. INTRODUCTION
the task of solving the TSP immense even for modest n sized
than proportional roulette wheel selection. Julstrom [5] in TSP [10]. The TSP consists a number of cities, where
investigated the computing time efficiency of two types of each pair of cities has a corresponding distance. The aim is
rank-based selection probabilities; linear ranking and to visit all the cities such that the total distance travelled will
exponential ranking probabilities and compared with be minimized. Obviously, a solution, and therefore a
tournament selection. He pointed that tournament selection chromosome which represents that solution to the TSP, can
is preferred over rank-based selection because repeated be given as an order, that is, a path, of the cities.
tournament selection is faster than sorting the population to The procedure for solving TSP can be viewed as a
assign rank-based probabilities. In addition, Mashohor et al. process flow given in Fig. 1. The GA process starts by
[6] evaluated the performance of PCB inspection system supplying important information such as location of the city,
using three GA selection method; deterministic, tournament maximum number of generations, population size,
and roulette wheel and discovered that deterministic has the probability of crossover and probability of mutation. An
ability to reach the highest maximum fitness with lowest initial random population of chromosomes is generated and
number of generations for all test images. This is then the fitness of each chromosome is evaluated. The population
followed by roulette wheel and tournament selection. is then transformed into a new population (the next
Goh et al. [7] in his work entitled sexual selection for “generation”) using three genetic operators: selection,
genetic algorithms focused on the selection stage of GA and crossover and mutation. The selection operator is used to
examined common problems and solution methods for such choose two parents from the current generation in order to
selection schemes. He proposed a new selection scheme procreate a new child by crossover and/or mutation. The
called sexual selection and compared the performance with new generation contains a higher proportion of the
commonly used selection methods in solving the Royal road characteristics possessed by the „good‟ members of the
problem, the open shop scheduling and the job shop previous generation and in this way good characteristics are
scheduling problem. He claimed that the proposed selection spread over the population and mixed with other good
scheme performed either on-par or better than roulette wheel characteristics. After each generation, a new set of
selection on average when no fitness scaling is used. The chromosomes where the size is equal to the initial population
new scheme also performed better on average when size is evolved. This transformation process from one
compared to tournament selection in the more difficult test generation to the next continues until the population
cases when no scaling is used. Apart from that, Goldberg converges to the optimal solution, which usually occurs
and Deb [8] did comprehensive studies on proportional, when a certain percentage of the population (e.g. 90%) has
ranking, tournament and Genitor (steady state) selection the same optimal chromosome in which the best individual is
schemes on the basis of solutions to differential equations. taken as the optimal solution.
Their studies have been performed to understand the
expected fitness ratio and convergence time. They found
that ranking and tournament selection outperformed
proportional selection in terms of maintaining steady
pressure toward convergence. They further demonstrated
that linear ranking selection and stochastic binary
tournament selection have identical expectations, but
recommended binary tournament selection because of its
more efficient time complexity.
(with higher fitness) have a greater probability of being population because they lost a tournament.
selected for mating or mutate, but that worse members of the
population still have a small probability of being selected,
and this is important to ensure that the search process is
global and does not simply converge to the nearest local
optimum. Different selection strategies have different
methods of calculating selection probability. The differing
selection techniques all develop solutions based on the
principle of survival of the fittest. Fitter solutions are more
likely to reproduce and pass on their genetic material to the Fig. 3. Procedure for tournament selection
next generation in the form of their offspring. There are
three major types of selection schemes will be discussed and
B. Proportional Roulette Wheel Selection
experimented in this study; tournament selection, roulette
wheel, and rank-based roulette wheel selection. The In proportional roulette wheel, individuals are selected
subsequent section will describe the mechanism of each with a probability that is directly proportional to their fitness
strategy. A more detailed of selection method can be found values i.e. an individual‟s selection corresponds to a portion
of a roulette wheel. The probabilities of selecting a parent
in [8, 11, 12, 13].
can be seen as spinning a roulette wheel with the size of the
A. Tournament Selection segment for each parent being proportional to its fitness.
Tournament selection is probably the most popular Obviously, those with the largest fitness (i.e. largest segment
selection method in genetic algorithm due to its efficiency sizes) have more probability of being chosen. The fittest
and simple implementation [8]. In tournament selection, n individual occupies the largest segment, whereas the least fit
individuals are selected randomly from the larger have correspondingly smaller segment within the roulette
wheel. The circumference of the roulette wheel is the sum of
population, and the selected individuals compete against
all fitness values of the individuals. The proportional
each other. The individual with the highest fitness wins and
roulette wheel mechanism and the algorithm procedure are
will be included as one of the next generation population.
depicted in Fig. 4 and Fig. 5 respectively. In Fig. 4, when the
The number of individuals competing in each tournament is wheel is spun, the wheel will finally stop and the pointer
referred to as tournament size, commonly set to 2 (also attached to it will point on one of the segment, most
called binary tournament). Tournament selection also gives a probably on one of the widest ones. However, all segments
chance to all individuals to be selected and thus it preserves have a chance, with a probability that is proportional to its
diversity, although keeping diversity may degrade the width. By repeating this each time an individual needs to be
convergence speed. Fig. 2 illustrates the mechanism of chosen, the better individuals will be chosen more often than
tournament selection while Fig. 3 shows the procedure for the poorer ones, thus fulfilling the requirements of survival
tournament selection. The tournament selection has several of the fittest. Let f1, f2,…, fn be fitness values of individual 1,
advantages which include efficient time complexity, 2,…, n. Then the selection probability, P i for individual i is
especially if implemented in parallel, low susceptibility to define as,
takeover by dominant individuals, and no requirement for
pi
fitness scaling or sorting [8, 12]. fi (1)
n
j 1 j
f
Moreover, it is difficult to use this selection scheme on For linear rank-based selection, the biasness could be
3.5
3.4
10-city
9
8
20-city lowest traveling distance in the tour. Therefore it can be
3.3 7
3.2
6 conclude that tournament selection is more appropriate for
3.1
Distance
Distance
5
3
2.9
ranking
proportional
4
tournament
proportional RW
small size problem while rank-based roulette wheel can be
3
2.8
2.7
tournament
2
ranking used to solve larger size problem. There is always a trade-off
2.6 1
2.5 0 between computation time and the solution quality. If
0 10 20 30 40 0 50 100 150
Generations Generations solution quality is the main concern and computation time is
14
12
30-city
18
16
40-city still negotiable, then rank-based selection strategy is the best
10
14
12
choice.
Distance
Distance
8 10
6
ranking
proportional
8
tournament
proportional
Future work could be to evaluate the interaction between
6
4
2
tournament
4
ranking
selection pressure and selection strategies. For example,
2
0
0 50 100 150 200 250 300
0
0 200 400 600 800
instead of using binary tournament, we could vary the
Generations Generations
tournament size to increase the selection pressure. Future
50 2.5
45
burma14 bay29 work could also extend the model to include precedence
2
40
1.5
constraint TSP. Precedence constraint can increase problem
Distance
Distance
35 tournament
proportional 1
tournament
proportional
complexity and may results in a different convergence
30
25
ranking
0.5
ranking
behavior, which could lead to a conclusion on whether a
20
0 20 40 60
0
0 200 400 600 800
superior selection method exists without regard to problem
Generations Generations
size and complexity.
2.5 1.6
dantzig42 eil51
1.4
2
1.5
1.2
1
REFERENCES
Distance
Distance
50
100 [5]
50
0 0
Probabilities and Tournaments, Department of Computer Science, St.
10-city 20-city 30-city 40-city burma14 bay29 dantzig42 eil51 Cloud State University, 1999
[6] S. Mashohor, J. R. Evans, T. Arslan, Elitist Selection Schemes for
Fig. 10. Iteration time comparisons Genetic Algorithm based Printed Circuit Board Inspection System,
Department of Electronics and Electrical Engineering, University of
Edinburgh, 974 – 978, 2005
[7] K. S. Goh, A. Lim, B. Rodrigues, Sexual Selection for Genetic
VI. CONCLUSIONS Algorithms, Artifial Intelligence Review 19: 123 – 152, Kluwer
In this paper we have described three types of selection Academic Publishers, 2003
[8] D.E. Goldberg and K. Deb, A comparative analysis of selection
strategy in the GA procedure to solve TSP and compare schemes used in genetic algorithms, in: G.J.E. Rawlins (Ed.),
their performance in terms of solution quality and number of Foundations of Genetic Algorithms, Morgan Kaufmann, Los Altos,
generations to come out with the best solution. From the 1991, pp.69–93.
[9] J. H. Holland, Adaptation in natural and artificial systems, The
results of experiment on eight TSP instances, it can be University of Michigan press, 1975
conclude that the quality of solution improved with rank- [10] P. Larranaga, C. M. H. Kuijpers, R. H. Murga, I. Inza, S. Dizdarevic,
based roulette wheel selection scheme. We have found Genetic algorithms for the Travelling Salesman Problem: A Review
optimal solutions for every TSP instance we have tried of Representations and Operators, Artificial Intelligence Review 13:
129 – 170, 1999
except for eil51, to within 0.9% deviation of a known [11] Handbook of Evolutionary Computation, IOP Publishing Ltd. and
optimal solution. GA cannot be expected reliably to find Oxford University Press, 1997
optimum solutions, but it can yield excellent near optimal [12] T. Blickle, L. Thiele, A Comparison of Selection Schemes used in
Genetic Algorithms. TIK-Report, Zurich, 1995
solutions, which are adequate for most practical problems [13] J. E. Baker, “Adaptive selection methods for genetic algorithm,”
where input data are only approximate. The results also Proceeding of an International Conference on Genetic Algorithms
revealed that the GA based tournament selection is more and Their Applications, 100 – 111, 1985
[14] D. Whitley, “The genitor algorithm and selection pressure: Why rank-
efficient in obtaining minimum total distance with less based allocation of reproductive trials is the best,” In Proceeding of
number of generation and fastest iteration time compared to the 3rd International Conference on Genetic Algorithms, 1989
the other two strategies. However, this is only applicable for [15] G. Reinelt, TSPLIB – A Travelling Salesman Problem Library. ORSA
Journal on Computing, Vol.3, No.4, 376 – 384, 1991
small problem size (i.e. 10-city, 20-city and burma14). As
[16] K. De Jong, W. M. Spears, “Using Genetic Algorithms to Solve NP
the size of problem increase, tournament selection as well as Complete Problems,” Proceedings of the Third International
proportional roulette wheel becomes susceptible to Conference on Genetic Algorithm, Morgan Kaufman, Los Altos, CA,
premature convergence. Rank-based selection on the other 124 – 132, 1989
hand continues to explore the search space and reaching the