Using the Expanded IWO Algorithm to Solve the Traveling Salesman
Problem
Daniel Kostrzewa and Henryk Josiński
Institute of Informatics, Silesian University of Technology, Akademicka 16, Gliwice, Poland
Keywords: Traveling Salesman Problem, Expanded IWO Algorithm, Inver-over Operator.
Abstract: The Invasive Weed Optimization algorithm (IWO) is an optimization metaheuristic inspired by dynamic
growth of weeds colony. The authors of the present paper have expanded the strategy of the search space
exploration of the IWO algorithm introducing a hybrid method along with a concept of the family selection
applied in the phase of creating individuals. The goal of the project was to evaluate the expanded IWO
version (exIWO) as well as the original IWO by testing their usefulness for solving some test instances of
the traveling salesman problem (TSP) taken from the TSPLIB collection which allows to compare the
experimental results with outcomes reported in the literature. The results produced by other heuristic
algorithms as well as the methods based on the self-organizing maps served as the reference points.
1 INTRODUCTION
The Invasive Weed Optimization (IWO) algorithm
is an optimization metaheuristic, in which the
exploration strategy of the search space (similarly to
the evolutionary algorithm) is based on the
transformation of a complete solution into another
one. The authors of the original version of the
algorithm from University of Tehran were inspired
by observation of dynamic spreading of weeds and
their quick adaptation to environmental conditions
(Mehrabian and Lucas, 2006).
Usefulness of the IWO was confirmed for both
continuous and discrete optimization tasks. The
research was focused inter alia on minimization of
the multimodal functions and tuning of a second
order compensator (Mehrabian and Lucas, 2006),
antenna configurations (Mallahzadeh et al., 2008),
electricity market dynamics (Sahraei-Ardakani et al.,
2008), a recommender system (Sepehri Rad and
Lucas, 2007), and the join ordering problem for
database queries (Kostrzewa and Josiński, 2011).
The goal of the present paper is to introduce an
expanded version of the IWO (exIWO)
distinguished by the hybrid strategy of the search
space exploration proposed by the authors.
Evaluation of the suggested modification is based on
the solution of some test instances of the traveling
salesman problem (TSP) taken from the TSPLIB
collection (Reinelt, 1991) of the Research Group
Discrete and Combinatorial Optimization at the
Ruprecht-Karls-Universität Heidelberg (available at
www.iwr.uni-heidelberg.de/groups/comopt/software/
TSPLIB95/tsp/).
The overview of bibliography describing the
methods for solving the TSP would be unusually
spacious. Numerous studies related to the usage of
exhaustive, greedy, and evolutionary methods were
mentioned in (Michalewicz and Fogel, 2004),
whereas the IWO algorithm, according to the
authors’ knowledge, has never been used to this
purpose by other researchers.
The organization of this paper is as follows –
Section 2 contains a brief description of the modi-
fied IWO algorithm taking into serious consideration
the proposed hybrid method of the search space
exploration. Discussion of the transformations used
for creation of a new individual in case of the TSP is
presented in Section 3. Section 4 deals with proce-
dure of the experimental research along with its
results. The conclusions are formulated in Section 5.
2 DESCRIPTION OF THE
EXPANDED IWO ALGORITHM
The simplified pseudocode mentioned below
describes the exIWO algorithm by means of
451
Kostrzewa D. and Josi
´
nski H..
Using the Expanded IWO Algorithm to Solve the Traveling Salesman Problem.
DOI: 10.5220/0004224204510456
In Proceedings of the 5th International Conference on Agents and Artificial Intelligence (ICAART-2013), pages 451-456
ISBN: 978-989-8565-39-6
Copyright
c
2013 SCITEPRESS (Science and Technology Publications, Lda.)
terminological convention consistent with the
“natural” inspiration of its idea. Consequently, the
words “individual”, “plant”, and “weed” are treated
as synonyms.
Create the first population.
For each individual:
Compute the value of the fitness
function.
While the stop criterion is not
satisfied:
For each individual from the
population:
Compute the number of seeds.
For each seed:
Choose the dissemination
method.
Create a new individual.
Compute the value of its
fitness function.
Create a new population.
The population of initial solutions of the given
optimization task is randomly or greedily generated
over the search space. Next, the degree of
individuals’ adaptation to environmental conditions
is estimated by the value of their fitness function,
which at the same time determines the number of
seeds produced by each plant according to the
following formula:

minmax
minmax
minmin
ff
SS
ffSS
indind
,
(1)
where S
max
, S
min
denote maximum and minimum
admissible number of seeds generated, respectively,
by the best population member (characterized by
fitness f
max
) and by the worst one (fitness f
min
).
The seeds are scattered over the search space.
The hybrid strategy of the search space exploration,
proposed by the authors of the present paper, makes
use of the following component methods: dispersing,
spreading and rolling down. Probability values of
selection assigned to the particular methods form
parameters of the algorithm.
Construction of a new individual according to
the dispersing method is based on transformations
(see Section 3) performed on the copy of the parent
individual. The number of transformations equals to
the conventional distance between the parent
individual and the descendant in the search space.
The distance is described by normal distribution
with a mean equal to 0 and a standard deviation
truncated to nonnegative values. The standard
deviation is decreased in each algorithm iteration
(i.e. for each population) and computed for the
iteration iter,
max
,1 iteriter
according to the
following formula:

finfininit
m
iter
iter
iteriter
max
max
.
(2)
The total number of iterations (iter
max
), equivalent to
the total number of populations, can be either used
with the purpose of determination of the stop
criterion or can be estimated based on the stop
criterion defined as the execution time limit. The
symbols σ
init
, σ
fin
represent, respectively, initial and
final values of the standard deviation, whereas m is a
nonlinear modulation factor. A tendency to gradual
reduction of the distance for subsequent populations
resulting from the formula (2) accords with intention
of the authors of the original IWO algorithm version.
The spreading is a random disseminating seeds
over the whole of the search space. Therefore, this
operation is equivalent to the random construction of
new individuals.
The rolling down is based on the examination of
the neighborhood of the parent individual. In case of
discrete optimization task the neighborhood
comprises individuals that differ from the parent by
exactly one transformation, whereas for the
continuous optimization the term “neighbors” stands
for individuals located at the same randomly
generated distance from the considered one. The
best adapted individual is chosen from among the
determined number of neighbors, whereupon its
neighborhood is analyzed in search of the next best
adapted individual. This procedure is repeated k
times (k is a parameter of the method) giving the
opportunity to select the best adapted individual
found in the k-th iteration as a new one.
Creation of the next population is based on the
concept of the family selection. Each plant from the
first population is a protoplast of a separate family.
A family consists of a parent weed and its direct
descendants. According to the family selection rules
only the best individual of each family survives and
becomes member of the next population.
3 ADAPTATION OF THE
EXPANDED IWO TO THE TSP
The expanded IWO algorithm is a metaheuristic.
Hence, its application for solving a given
optimization task requires a formulation of a single
solution representation as well as a definition of
transformations used for creation of a new solution.
ICAART2013-InternationalConferenceonAgentsandArtificialIntelligence
452
From among significant concepts related to the
form of a single solution it is worthwhile to mention
three vector representations proposed in the
literature: path, ordinal, and adjacency as well as a
matrix representation (Michalewicz and Fogel,
2004). A plant used by the exIWO was designed
according to the simple and natural rule of the path
representation – a tour is an ordered list of cities (i.e.
expressed as a vector [2 3 9 4 1 5 8 6 7]) and the
order of visitation is determined by the order of
vector elements (2–3–9–4–1–5–8–6–7–2).
Specific character of weeds reproduction
mechanism functioning in the IWO implies rather
application of transformations based on a single
individual used as a sole parent. In case of the TSP
transformations are realized by means of operators.
Basic unary operators – inversion, insertion,
displacement, and reciprocal exchange – are
discussed in (Herdy, 1991). The inver-over operator
is admittedly based on the inversion of a segment of
cities, but the inverted segment is most often
determined by means of another individual which is
randomly selected from the same population. Due to
specific character of this operation a fragment of the
“second parent” is guaranteed to be a part of the
offspring. In this way the inver-over operator
combines features of unary as well as binary
techniques. However, very promising results
reported by its inventors (Tao and Michalewicz,
1998) decided on implementation of both –
inversion and inver-over – operators in the exIWO.
In case of the TSP the individuals from the first
population are greedily generated – the nearest city
will be visited as the next one.
4 EXPERIMENTAL RESEARCH
The goal of the experiments was to compare the
quality of solutions found by the exIWO with the
outcomes generated by other methods using 17 test
instances of the TSP taken from the TSPLIB
collection. As reference points served the results
presented in (DePuy et al., 2005), (DePuy et al.,
2002) and (Bai et al., 2006). The former study
presents application of the metaheuristic for
randomized priority search (Meta-RaPS), whereas
the latter discusses results achieved by means of the
self-organizing maps (SOM). Both papers include
comparison of the outcomes reported by other
researchers, who investigated methods from
different areas of artificial intelligence. Therefore
the exIWO algorithm operated on the same test
instances as those used in the aforementioned works.
It is worthwhile to mention that a number of cities is
included in the name of each test set (e.g., the route
described as “bier127” consists of 127 cities).
The workstation used for experiments is
described by the following parameters: 2×Intel Xeon
E5620 2.40 GHz, RAM 16 GB, MS Windows
Server 2008 R2 Datacenter 64-bit SP1.
Evaluation of solutions generated by particular
methods was based on 2 criteria – minimum and
average difference from optimal or best known
solution. Average values for the exIWO were
computed based on results of 100 experiments for
each test set.
Table 1 shows the minimum difference between
the solutions produced by the IWO variants (exIWO
and the original version) using inversion or the
inver-over operator and optimal or best known
solution for particular test instances expressed as a
percentage.
Table 1: Minimum difference between the solution
produced by one of the tested variants of the IWO
algorithm (exIWO and the original version) and optimal or
best known solution [%].
Test set exIWO IWO
Inversion Inver-over Inversion Inver-over
kroA100 0 0 0 0
kroB100 0 0 0 0
kroC100 0 0.096 0.096 0
kroD100 0.169 0 0.169 0.169
kroE100 0 0 0 0
bier127 0 0 0 0
eil51 0 0 0 0
eil76 0 0 0 0
kroA200 0.200 0.449 0.446 0.446
lin105 0 0 0 0
pcb442 1.554 1.829 1.544 1.916
pr107 0 0 0 0
pr136 1.588 2.265 1.130 2.585
pr152 0.294 0.455 0.277 0.563
rat195 0.689 0.861 0.732 0.646
rd100 0 0 0 0
st70 0 0 0.148 0.148
The optimal or best known solution was found
by the exIWO in case of 12 from among 17 test
instances.
Average run times of the exIWO implementation
in Java for 10000 iterations (equivalent to the
number of populations) are included in Table 2. The
number of individuals in a single population depends
on the number of cities in a test set – for routes with
less than 150 cities a single population contains 200
individuals, in other cases – 50. The best exIWO
results reported in all tables were achieved for
UsingtheExpandedIWOAlgorithmtoSolvetheTravelingSalesmanProblem
453
particular test instances using different values of
other algorithm parameters (a nonlinear modulation
factor m, probabilities of selection of dispersing,
spreading and rolling down, maximum and
minimum admissible number of seeds S
max
, S
min
,
initial and final values of the standard deviation σ
init
,
σ
fin
). Only the number k of neighborhoods examined
during the rolling down remained equal to 2 in the
most successful exIWO experiments.
Table 2: Average run times of the exIWO variants [s].
Test set Inversion Inver-over
Number of
individuals
kroA100 58.8 59.9 200
kroB100 62.2 62.7 200
kroC100 67.1 67.6 200
kroD100 70.9 68.8 200
kroE100 74.1 73.0 200
bier127 89.4 89.5 200
eil51 24.4 28.9 200
eil76 38.3 39.6 200
kroA200 35.5 25.6 50
lin105 62.8 61.6 200
pcb442 69.6 51.9 50
pr107 70.2 68.8 200
pr136 79.6 90.6 200
pr152 27.1 20.4 50
rat195 37.1 23.2 50
rd100 58.1 59.6 200
st70 47.8 43.1 200
The average run times of both exIWO variants
are similar in most cases.
Tables 3-6 present average difference from
optimal or best known solution for the chosen
methods expressed as a percentage. Test instances
considered in Table 3 belong to the Kro?100
collection (the question mark substitutes for one of
the following symbols {A, B, C, D, E}), whereas
results of the optimization methods other than
exIWO were taken from (DePuy et al., 2005) and
(DePuy et al., 2002). Particular names represent the
following approaches: Meta-RaPS TSP – a Meta-
heuristic for Randomized Priority Search, Priority
rule based on the simple TSP heuristics – cheapest
insertion and node insertion, GRASP – Greedy Ran-
domized Adaptive Search Procedure – all algorithms
were described in (DePuy et al., 2005), Christofides
& 2opt 3opt, Convex hull & 3opt, NN & 2opt 3opt
(“NN” denotes “Nearest Neighbor”), 2opt 3opt
algorithms using local search methods (Lawler et al.
1985), Lin-Kernighan algorithm (Padberg and
Rinaldi, 1991), Modified Lin-Kernighan algorithm
(Mak and Morton, 1993), CCAO – Convex hull,
Cheapest insertion, Angle selection and Or-opt – a
heuristic which exploits geometrical properties of
symmetric Euclidean TSP (Golden and Stewart,
1985), Triangul. – a Delaunay triangulation-based
heuristic (Krasnogor et al., 1995), I^3 a composite
heuristic consisting of 3 phases: construction of an
Initial envelope, Insertion of the remaining vertices,
and Improvement procedure (Renaud et al., 1996),
P-SEC, F-SEC – a Preliminary and a Full Subpath
Ejection Chain method, respectively (Rego, 1998).
Abbreviations related to the IWO variants have the
following meanings – “inv” denotes inversion, whe-
reas “i-o” represents the inver-over operator. The
underlined values outperform results produced by
the exIWO.
Table 3: Average difference from optimal or best known
solution for the chosen methods mentioned in (DePuy et
al., 2005), (DePuy et al., 2002) and variants of the IWO
based on the Kro?100 test sets [%].
Method A B C D E
Meta-RaPS
TSP
0 0.25 0 0 0.17
Priority rule 0.5 2.46 0.82 1.43 1.1
GRASP 0 0.55 0.31 0.42 0.37
Christofides
& 2opt 3opt
2.51 1.4 1.53 0.17 3.03
Convex hull
& 3opt
0.37 1.46 1.06 0.04
2.46
NN & 2opt
3opt
0.14 1.46 1.06 0.73 2.46
2opt 3opt 0.81 1.44 0.53 1.74 0.18
Lin-
Kernighan
0.26 0
0.7 0.17 0.16
Modif. Lin-
Kernighan
0 0.17 0 0 0.21
CCAO 0 0.97 0.5 0.97 2.54
Triangul. 0.51 2.13 2.79 3.81 2
I^3 0 0.9 0.5 2 2.6
P-SEC 0 0.32 0.02 0.75 0.33
F-SEC 0 0 0 0 0
exIWO inv 0 0.01 0.24 0.49 0.19
exIWO i-o 0 0.01 0.25 0.51 0.20
IWO inv 0 0.01 0.25 0.54 0.20
IWO i-o 0 0.01 0.24 0.54 0.21
Results presented in Tables 4-6 are related to the
SOM-based methods and were taken from (Bai et
al., 2006) and compared with outcomes produced by
the IWO variants. Particular acronyms represent the
following approaches: PKN – Pure Kohonen
Network (Hueter, 1988) and (Fort, 1988), GN
Guilty Net (Burke and Damany, 1992), AVL – the
procedure of Angéniol, de la Croix Vaubois and Le
Texier (Angéniol et al., 1988), KL, KG – 2 variants
of the Kohonen Network Incorporating Explicit
Statistics (KNIES) – Local and Global, respectively
ICAART2013-InternationalConferenceonAgentsandArtificialIntelligence
454
(Aras et al., 1999), SETSP – SOM Efficiently
applied in the TSP (Vieira et al., 2003), MGSOM
the Modified Growing ring SOM approach for TSP
(Bai et al., 2006).
Table 4: Average difference from optimal or best known
solution for the SOM-based methods and variants of the
IWO – part I [%].
Method bier127 eil51 eil76 kroA200
PKN 3.322 4.202 6.171 5.311
GN 31.181 10.493 14.182 34.058
AVL 3.713 4.108 6.190 5.540
KL 2.762 2.864 4.981 2.836
KG 3.079 2.864 5.483 3.667
SETSP 1.850 2.221 4.234 3.119
MG SOM 1.097 1.398 3.384 1.972
exIWO
inv
0.061 0.099 0.338 0.757
exIWO i-o 0.069 0.127 0.292 0.716
IWO inv 0.090 0.131 0.346 0.749
IWO i-o 0.097 0.129 0.323 0.747
Table 5: Average difference from optimal or best known
solution for the SOM-based methods and variants of the
IWO – part II [%].
Method lin105 pcb442 pr107 pr136
PKN 6.921 0.454 7.343
GN 7.584 81.661
AVL 6.487 17.472 1.791 6.893
KL 1.985 11.072 0.734 4.531
KG 1.291 10.447 0.425 5.147
SETSP 1.301 10.160 0.409 4.400
MG SOM 0.028 8.577 0.172 2.154
exIWO
inv
0.070 2.580 0 3.768
exIWO i-o 0.033 3.011 0 3.834
IWO inv 0.078 2.713 0.001 3.993
IWO i-o 0.106 3.199 0.001 3.895
The column “avg” in Table 6 includes average
values computed on all 12 test sets taken into
account in Tables 4-6.
The exIWO variants produce results which
outperform the most of the outcomes of the SOM-
based methods with the exception of the MGSOM in
case of 3 test instances.
In the majority of cases solutions obtained by the
exIWO are slightly better than those of the original
version.
Similarity of both exIWO variants concerns not
only the run times but the minimum and average
differences from optimal or best known solution as
well.
Table 6: Average difference from optimal or best known
solution for the SOM-based methods and variants of the
IWO – part III [%].
Method pr152 rat195 rd100 st70 avg
PKN 1.523 – – 2.637
GN 42.817 10.382 11.956
AVL 1.302 15.420 4.498 2.711 6.344
KL 0.968 12.238 2.095 1.511 4.048
KG 1.285 11.916 2.622 2.326 4.213
SETSP 1.169 11.192 2.601 1.600 3.688
MG
SOM
0.741
5.984 1.172 1.183 2.322
exIWO
inv
0.863 1.721 0.127 0.533 0.905
exIWO
i-o
0.924 1.868 0.105 0.594 0.969
IWO inv 0.943 1.857 0.123 0.624 0.971
IWO i-o 0.944 2.055 0.153 0.636 1.024
The average difference from optimal or best
known solution for both exIWO variants computed
on all 17 test instances mentioned in this paper
amounts to 0.741 % in case of the inver-over
operator and 0.693 % for the inversion.
5 CONCLUSIONS
The authors of the present paper have modified the
IWO metaheuristic introducing a hybrid strategy of
the search space exploration as well as a concept of
the family selection. Analysis of the exIWO results
presented in this paper enables to expect solutions of
good quality in a reasonable amount of time. It is
also worth mentioning that each iteration of the
exIWO generates a population of individuals
representing feasible tours.
The experiments revealed the usefulness of the
exIWO algorithm for solving discrete optimization
tasks and confirmed the concept of using
randomness as a mechanism to avoid local optima.
The method can compete with other heuristics,
although the influence of the hybrid strategy
components (dispersing, spreading, rolling down) on
the solution found by the exIWO requires further
research at present the algorithm takes part in the
World TSP Challenge (www.tsp.gatech.edu/world/
index.html) and in the Mona Lisa TSP Challenge
(www.tsp.gatech.edu/data/ml/monalisa.html).
ACKNOWLEDGEMENTS
All tests were performed using the computer server
UsingtheExpandedIWOAlgorithmtoSolvetheTravelingSalesmanProblem
455
funded by the Ministry of Science and Higher
Education, Poland, Grant No. N N516 265835.
Authors would like to thank Dr Bożena Małysiak-
Mrozek and Dr Dariusz Mrozek from the Institute of
Informatics, Silesian University of Technology,
Gliwice, Poland for the possibility to perform
calculations on this computer.
REFERENCES
Angéniol, B., de la Croix Vaubois, G., Le Texier, J.Y.,
1988. Self-organizing feature maps and the travelling
salesman problem. In Neural Networks 1(4). Elsevier.
Aras, N., Oommen, B.J., Altinel, I.K., 1999. Kohonen
network incorporating explicit statistics and its
application to the travelling salesman problem. In
Neural Networks 12(9). Elsevier.
Bai, Y., Zhang, W., Jin, Z., 2006. A new self-organizing
maps strategy for solving the traveling salesman
problem. In Chaos, Solitons & Fractals. Elsevier.
Burke, L.I., Damany, P., 1992. The guilty net for the
traveling salesman problem. In Computers &
Operations Research 19(3-4). Elsevier.
DePuy, G.W., Moraga, R.J., Whitehouse G.E., 2005.
Meta-RaPS: a simple and effective approach for
solving the traveling salesman problem. In
Transportation Research Part E. Elsevier.
DePuy, G.W., Moraga, R.J., Whitehouse G.E., 2002.
Using the Meta-RaPS approach to solve combinatorial
problems. In Proceedings of the 2002 Industrial
Engineering Research Conference.
Fort, J.C., 1988. Solving combinatorial problem via self-
organizing process: An application of the Kohonen
algorithm to the traveling salesman problem. In
Biological Cybernetics 59(1). Springer.
Golden, B.L., Stewart, W.R., 1985. Empirical analysis of
heuristics. In Lawler, E.L., Lenstra, J.K., Rinnooy
Kan, A.H.G., Shmoys, D.B., 1985. The Traveling
Salesman Problem: A Guided Tour of Combinatorial
Optimization. John Wiley & Sons.
Herdy, M., 1991. Application of the Evolution Strategy to
Discrete Optimization Problems. In Lecture Notes in
Computer Science 496. Springer.
Hueter, G.J., 1988. Solution to the travelling salesman
problem with an adaptive ring. In Proceedings of the
IEEE International Conference on Neural Networks.
Kostrzewa, D., Josiński, H., 2011. Verification of the
Search Space Exploration Strategy Based on the
Solutions of the Join Ordering Problem. In Advances
in Intelligent and Soft Computing. Springer.
Krasnogor, N., Moscato, P., Norman, M.G., 1995. A new
hybrid heuristic for large geometric traveling salesman
problems based on the Delaunay triangulation. In
Anales del XXVII Simposio Brasileiro de Pesquisa
Operacional.
Lawler, E.L., Lenstra, J.K., Rinnooy Kan, A.H.G.,
Shmoys, D.B., 1985. The Traveling Salesman
Problem: A Guided Tour of Combinatorial
Optimization. John Wiley & Sons.
Mak, K.T., Morton, A.J., 1993. A modified Lin-Kernighan
traveling salesman heuristic. In Operations Research
Letters 13(3). Elsevier.
Mallahzadeh, A. R., Oraizi, H., Davoodi-Rad, Z., 2008.
Application of the Invasive Weed Optimization
Technique for Antenna Configurations. In Progress in
Electromagnetics Research.
Mehrabian, R., Lucas, C., 2006. A novel numerical
optimization algorithm inspired from weed
colonization. In Ecological Informatics 1(4), Elsevier.
Michalewicz, Z., Fogel, D. B., 2004.
How to Solve It:
Modern Heuristics. Springer.
Padberg, M., Rinaldi, G., 1991. A branch-and-cut
algorithm for the solution of large-scale traveling
salesman problems. In SIAM Review 33(1).
Rego, C., 1998. Relaxed tours and path ejections for the
traveling salesman problem. In European Journal of
Operational Research 106(2-3). Elsevier.
Reinelt, G., 1991. TSPLIB – traveling salesman problem
library. In ORSA Journal on Computing 3(4).
Renaud, J., Boctor, F.F., Laporte, G., 1996. A fast
composite heuristic for the symmetric traveling
salesman problem. In INFORMS Journal on
Computing 8(2).
Sahraei-Ardakani, M., Roshanaei, M., Rahimi-Kian, A.,
Lucas C., 2008. A Study of Electricity Market
Dynamics Using Invasive Weed Colonization
Optimization. IEEE Symposium on Computational
Intelligence and Games.
Sepehri Rad, H., Lucas, C., 2007. A Recommender
System based on Invasive Weed Optimization
Algorithm. IEEE Congress on Evolutionary
Computation.
Tao, G., Michalewicz, Z., 1998. Inver-over Operator for
the TSP. In Lecture Notes In Computer Science 1498.
Springer.
Vieira, F.C., Neto, A.D.D., Costa, J.A.F., 2003. An
efficient approach to the travelling salesman problem
using self-organizing maps. In International Journal
of Neural Systems 13(2).
ICAART2013-InternationalConferenceonAgentsandArtificialIntelligence
456