0% found this document useful (0 votes)
95 views8 pages

An Improved Hybrid Bat Algorithm For Traveling Salesman Problem

An improved hybrid bat algorithm called IHDBA is proposed to solve the traveling salesman problem. IHDBA aims to overcome limitations of existing bat algorithms such as slow convergence and getting stuck in local optima. It incorporates evolutionary operators like crossover and mutation to balance intensification and diversification during search. Local search techniques like 2-opt and 3-opt are also introduced to improve search performance and speed up convergence. Experimental results on benchmark TSP instances show IHDBA outperforms the state-of-the-art discrete bat algorithm in most cases in finding average and best solutions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views8 pages

An Improved Hybrid Bat Algorithm For Traveling Salesman Problem

An improved hybrid bat algorithm called IHDBA is proposed to solve the traveling salesman problem. IHDBA aims to overcome limitations of existing bat algorithms such as slow convergence and getting stuck in local optima. It incorporates evolutionary operators like crossover and mutation to balance intensification and diversification during search. Local search techniques like 2-opt and 3-opt are also introduced to improve search performance and speed up convergence. Experimental results on benchmark TSP instances show IHDBA outperforms the state-of-the-art discrete bat algorithm in most cases in finding average and best solutions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

An Improved Hybrid Bat Algorithm

for Traveling Salesman Problem

Wedad Al-sorori(B) , Abdulqader Mohsen, and Walid Aljoby ßer

University of Science and Technology, Sana’a, Taiz, Yemen


{w.alsrori,a.alabadi,waljoby}@ust.edu

Abstract. A new metaheuristic, bat algorithm, inspired by echolocation


characteristics of micro-bats has been extensively applied to solve vari-
ous continuous optimization problems. Numerous intelligent techniques
are hybridized with bat algorithm to optimize its performance. However,
there are only two discrete variants have been proposed to tune the basic
bat algorithm to handle combinatorial optimization problems. However,
both of them suffer from the inherited drawbacks of the bat algorithm
such as slow speed convergence and easy stuck at local optimal. Moti-
vated by this, an improved hybrid variant of discrete bat algorithm, called
IHDBA is proposed and applied to solve traveling salesman problem.
IHDBA achieves a good balance between intensification and diversifica-
tion by adding the evolutionary operators, crossover and mutation, which
allow performance of both local and global search. In addition, 2-opt and
3-opt local search techniques are introduced to improve searching perfor-
mance and speed up the convergence. Using extensive evaluations based
on TSP benchmark instances taken from TSPLIB, the results show that
IHDBA outperforms state-of-the-art discrete bat algorithm i.e. IBA in
the most of instances with respect to average and best solutions.

Keywords: Hybrid Bat Algorithm · Crossover operator · Mutation


operator · Discrete bat algorithm · TSP · Intensification and diversi-
fication

1 Introduction

Many computational optimization problems remain difficult to solve in a poly-


nomial time and, therefore, they are classified as non-polynomial hard problems
(NP-hard problems) [1]. In this context, traveling salesman problem, or TSP for
short, is one of the most famous cases of NP-hard problems [2]. Given a set of
cities, TSP aims to minimize the overall trip cost that a salesperson may need
for traveling from one city to visit each city in the set only once and return
back to the start one. TSP is often used for testing optimization algorithms as
a benchmark to measure their abilities to solve other NP-hard problems [3,4].
Recently, a new meta-heuristic method, bat algorithm, has been successfully
applied to solve several optimization problems including TSP [5]. In addition to


c Springer Nature Singapore Pte Ltd. 2016
M. Gong et al. (Eds.): BIC-TA 2016, Part I, CCIS 681, pp. 504–511, 2016.
DOI: 10.1007/978-981-10-3611-8 47

[email protected]
Improved Hybrid Bat Algorithm for TSP 505

its advantages of simplicity, easy implementation and its higher stability mecha-
nism, BA has the ability of dealing with non-linear, multi-modal and large scale
optimization problems. However, BA still has some limitations. (i) It may suffer
from stagnation in the early stages when Ai and ri vary too quickly. (ii) BA
also loses its exploration as the iterations flow since ri exponentially increased;
hence, its condition becomes less probable to be satisfied. (iii) BA may not be
able to perform global search because it suffers from premature convergence in
some cases and may be trapped into local optima.
To enhance the performance of basic BA [6], several hybrid variants were
proposed to solve both continuous and combinatorial optimization problems such
as in [7–18]. It is worthy to note that the enhancement of BA by hybridization to
solve combinatorial problems has not been explored enough. To address TSP, two
papers were introduced. Yassine Saji et al. [19] proposed a discrete version of BA.
Then, Eneko Osaba et al. also introduced an improved discrete bat algorithm
for both symmetric and asymmetric TSP called IBA [20].
In this paper, we proposed an improved hybrid discrete BA variant to solve
TSP problem to solve the premature convergence, stagnation problem and speed
up the convergence.

2 Background

In the following subsections, we briefly review the bat algorithm and its IBA
discrete variant.

2.1 Bat Algorithm

Bat algorithm was initiated by Yang 2010 [6] as a relatively new meta-heuristic
to solve hard optimization problems. An overview of BA, its inspiration idea, its
variants and application domains is shown in [5]. BA was inspired by micro-bats
behavior when they search for prey. The three idealization rules of bat-inspired
algorithm can be summarized as follows: (i) all bats sense their direction and
the distance of obstacles/prey using echolocation; (ii) each bat i flies randomly
with velocity vi at position (solution) xi with a fixed frequency fmin , varying
wavelength λ and loudness A0 . Bats can adjust the frequency of their emitted
pulses rate in the range of r ∈ [0, 1] when searching for prey depending on the
proximity of their target; and (iii) the loudness can vary in many ways; it was
assumed that it varies from a large positive A0 to a minimum constant value
Amin . The main steps of BA are illustrated as follows:
Step1 (Initialization): an initial population X = [x1 , x2 , . . . , xn ] of n bats is
generated randomly. Each bat i in the population represents a potential location
(solution of the problem under consideration) with random rate of pulse ri ,
random loudness Ai and initial frequency fi ; each of which is evaluated using
fitness function.

[email protected]
506 W. Al-sorori et al.

Step2 (Generation of new solutions): During each iteration, every bat i


updates its frequency fi , velocity vi and position (solution) xi at iteration t
according to Eqs. 1, 2 and 3 respectively.
fi = fmin + (fmax − fmin )β (1)
vit = vit−1 + (xt−1
i − x∗ ), (2)
t−1
xi = xi + vit ,
t
(3)
where β is a random vector in the range of [0,1] drawn from a uniform
distribution; and x∗ is the current global best location (solution) among all
solutions in the population.
Step3 (Local Search): After that, with some probability of pulse rate ri , a
solution is selected among the best solutions and random walk is applied to
generate a local solution around the selected one according to Eq. 4:
xnew = xold + εAti , (4)
where the random number ε is a scale factor drawn from [−1, 1] and Ati is the
average loudness of all bats. Then, the new solutions will be accepted if they are
improved or by flying randomly with some probability depending on Ai .
Step4 (Loudness and Pulse Emission): If the solution is accepted, the pulse
emission rate ri increases and the loudness Ai decreases like what happen when
natural bat finds its prey. Mathematically, this is defined using Eqs. 5 and 6:
At+1
i = αAti , (5)
rit+1 = ri0 [1 − exp(−γt)], (6)

Step5 (Finding the global best solution ): Finally, rank the solutions and
find the current global best solution(s). Steps 2–5 continue until the termination
condition is satisfied.

2.2 An Improved Bat Algorithm (IBA) for TSP


Eneko Osaba et al. presented an improved discrete version for bat algorithm
called IBA [20]. It was used to solve TSP but it failed to reach the optimal
solution in the most of instances. IBA used the same philosophy for the basic
BA parameters ri and Ai . Velocity parameter vi is calculated according to Eq. 7:
vit = random[1; hammingDistance(xti , x∗ )], (7)
where vi of a bat i at iteration t is a random number between 1 and the difference
between the current bat position xi and the best bat position x∗ in the population
calculated by hamming distance. The modification in IBA was based on the
movement behavior of bats in which all bats were given some kind of intelligence
so that each bat moves differently depending on how far away it is from the best
bat of the population. In this way, when one bat moves, it will first examines its
velocity vit . If the velocity value is less than the half of cities, the bat i performs
short move using 2-opt local search; otherwise, it performs long move using 3-opt.

[email protected]
Improved Hybrid Bat Algorithm for TSP 507

3 Improved Hybrid Bat Algorithm (IHDBA)


In this section, we will present an improved hybrid discrete BA, called IHDBA,
to overcome the shortcomings of bat algorithms mentioned above. Combining
crossover and mutation operators of EA has achieved the purpose of improved
BA. Furthermore, two local search strategies (2-opt and 3-opt) are employed to
speed up the convergence. IHDBA can increase the diversity of BA and alleviates
the effect of premature convergence. The following are the steps of IHDBA:
Step 1 Initialization: Generate the initial population of BA with n bats. Each
bat consists of m cities from TSP instance. Assign the initial values of pulse rate
ri , loudness Ai and velocity vi for each bat. Then, evaluate the length of the
routes completed by the bats. After that, calculate the velocity of each bat i
by calculating its hamming distance from the current global best solution and
choosing the velocity as a random number between 1 and the hamming distance.
Step 2 Crossover: Perform the crossover operation between the current bat
position xi and the current global best bat position x∗ . After the crossover, the
fitness of current bat position xi is compared with the two offspring produced
after crossing. And then, we choose the best one as the new bat position xi .
Step 3 Local Search: If the velocity is small (vi ≤ number of cities/2), per-
form 2-opt move for current bat position xi ; otherwise, do 3-opt move.
Step 4 Random Walk: With probability of pulse ri , solution is selected among
the ten best solutions in its neighborhood and random walk is applied to generate
a local solution around the selected one. And then, it is improved using 2-opt or
3-opt according to the velocity vi .
Step 5 (Loudness and Pulse Emission): If the solution is accepted, the
pulse emission rate ri increases and the loudness Ai decreases according to Eqs. 5
and 6.
Step 6 (Mutation): If the diversity is less than 0.5, it means that the algo-
rithm will loose the diversity and may get stuck in the local minima. Therefore,
BA needs to increase the diversity by applying the mutation operation with
predefined probability.
Step 7 Finding the global best solution: Sort out solutions and assign the
current global best solution. Steps 2–7 continue until the termination condition
is satisfied, either the optimal solution is found or the maximum number of
iteration is reached.

4 Experimental Results
In order to test the performance of IHDBA, it was initialized with a population
of 50 bats with initial random values in the range 0.7–0.1 and 0.0–0.4 for the
loudness and pulse parameters respectively. Alpha and gamma were set to 0.98
and the maximum number of iterations was 1000.

[email protected]
508 W. Al-sorori et al.

IHDBA implemented in Java with different data structures using an Intel


Core-i5 PC. The experiments were conducted using twenty symmetric TSP stan-
dard benchmark problems, with different lengths obtained from TSPLIB (http://
comopt.ifi.uni-heidelberg.de/software/TSPLIB95/).
To evaluate the proposed hybrid bat algorithm, three bat variants with differ-
ent strategies are implemented. The first one is a standard discrete bat algorithm
with the 2-opt and 3opt strategies (denoted by BA-opt); the second is BA-opt
with crossover operation (denoted by BA-xover); and the third is BA-opt-xover
with the mutation operation (denoted by IHDBA). Table 1 shows the improve-
ment of the computational results over the evolution of algorithm.

Table 1. Computational results using BA-opt, BA-xover and IHDBA. All of the results
are taken from 10 runs. The best results are given in bold.

Instances Optimal BA-opt BA-xover IHDBA


Average best Average best Average best
Oliver30 420 420 420 420 420 420 420
berlin52 7542 7542 7542 7542 7542 7542 7542
St70 675 676.8 675 678.3 675 675 675
Eil51 426 427.1 426 427.1 426 426.4 426
Eil76 538 544.6 538 542 538 538 538
Eil101 629 636.2 631 636.4 631 629 629
KroA100 21282 21335.3 21282 21311.2 21282 21282 21282
Krob100 22141 22245.4 22141 22200.2 22193 22141 22141
Kroc100 20749 20769.3 20749 20778 20749 20749 20749
Krod100 21294 21428.6 21309 21348.6 21294 21309.3 21294
Kroe100 22068 22143.4 22068 22121.7 22068 22094.5 22068
Pr107 44303 44432.4 44303 44401.6 44303 44316.5 44303
Pr124 59030 59065.7 59030 59139.1 59030 59030 59030
Pr136 96772 97654.8 97007 97603.3 96861 96850.8 96785
Pr144 58537 58676.4 58537 58631.5 58537 58537 58537
Pr152 73682 74354.2 73818 74151.8 73840 73822.8 73682
Pr264 49135 49410 49135 49401.1 49235 49135 49135
Pr299 48191 48903.5 48609 48687.6 48372 48273.5 48197
Pr439 107217 109232.5 108524 109058.6 108387 107815.1 107408
Pr1002 259047 267616.1 266302 266719.8 265459 266433.0 264288

Table 2 shows the comparison results between IBA and IHDBA with respect
to best solution, average solution, percentage deviations of the average solu-
tion P Davg to the best known solution shown in the TSPLIB web site and the

[email protected]
Improved Hybrid Bat Algorithm for TSP 509

percentage deviations of best solution P Dbest to the best known solution shown
in the TSPLIB.
In summary, numerical results show that IHDBA is able to solve small and
large size problems better than IBA. It is worthy to mention that incorporation
of the evolutionary operators, crossover and mutation, and the local search tech-
niques, 2-opt and 3-opt, to BA improves the results significantly which means
that combining these operators into BA is effective, feasible and promising.

Table 2. Computational results of IHDBA in comparison with IBA. All of the results
for IHDBA are taken from 10 runs. The best results are given in bold.

Instances Optimal IHDBA IBA


average best PDavg PDbest average best PDavg PDbest
Oliver30 420 420 420 0 0 420 420 0 0
berlin52 7542 7542 7542 0 0 7542 7542 0 0
St70 675 675 675 0.0000 0 679.1 675 0.0061 0
Eil51 426 426.4 426 0.0009 0 428.1 426 0.0049 0
Eil76 538 538 538 0.0000 0 548.1 539 0.0188 0.1859
Eil101 629 629 629 0.0000 0 646.4 634 0.0277 0.7949
KroA100 21282 21282 21282 0 0 21445.3 21282 0.0077 0
Krob100 22141 22141 22141 0.0000 0.0000 22506.4 22140 0.0165 −0.0045
Kroc100 20749 20749 20749 0.0000 0 21050 20749 0.0145 0
Krod100 21294 21309.3 21294 0.0007 0 21593.4 21294 0.0141 0
Kroe100 22068 22094.5 22068 0.0012 0 22349.6 22068 0.0128 0
Pr107 44303 44316.5 44303 0.0003 0 44793.8 44303 0.0111 0
Pr124 59030 59030 59030 0.0000 0 59412.1 59030 0.0065 0
Pr136 96772 96850.8 96785 0.0008 0.0134 99351.2 97547 0.0267 0.8009
Pr144 58537 58537 58537 0 0 58876.2 58537 0.0058 0
Pr152 73682 73822.8 73682 0.0019 0 74676.9 73921 0.0135 0.3244
Pr264 49135 49135 49135 0.0000 0 50908.3 49756 0.0361 1.2639
Pr299 48191 48273.5 48197 0.0017 0.0125 49674.1 48310 0.0308 0.2469
Pr439 107217 107815.1 107408 0.0056 0.1781 115256 111538 0.0750 4.0301
Pr1002 259047 266433.0 264288 0.0285 2.0232 274420 270016 0.0593 4.2344

5 Conclusion
In this paper, we have introduced a hybrid variant of bat algorithm combined
with two evolutionary operators (crossover and mutation) and two local search
strategies (2-opt and 3-opt). The evolutionary operators strike a balance between
diversification and intensification and enable algorithm to escape from local
optima. The local search strategies (2-opt and 3-opt) speed up the BA conver-
gence. IHDBA is applied to solve the traveling salesman problem. Experiments

[email protected]
510 W. Al-sorori et al.

conducted using twenty instances obtained from the TSPLIB The results show
that IHDBA outperformed the recent BA variant i.e. IBA with respect to average
and best solution and is able to obtain the optimal solution for most instances.

References
1. Stutzle, T., Hoos, H.: Stochastic Local Search: Foundations and Applications
(2005)
2. Laporte, G.: The traveling salesman problem: an overview of exact and approxi-
mate algorithms. Eur. J. Oper. Res. 59(2), 231–247 (1992)
3. Lenstra, J.K., Kan, A.R.: Some simple applications of the travelling salesman
problem. Oper. Res. Q. (1970–1977) 26(4), 717–733 (1975). http://www.jstor.org/
stable/3008306
4. Reinelt, G.: The Traveling Salesman: Computational Solutions for TSP Applica-
tions. Springer, Heidelberg (1994)
5. Yang, X.-S., He, X.: Bat algorithm: literature review and applications. Int. J. Bio-
Inspired Comput. 5(3), 141–149 (2013)
6. Yang, X.-S.: A new metaheuristic bat-inspired algorithm. In: González, J.R.,
Pelta, D.A., Cruz, C., Terrazas, G., Krasnogor, N. (eds.) Nature inspired coop-
erative strategies for optimization (NICSO 2010). Studies in Computational Intel-
ligence, vol. 284, pp. 65–74. Springer, Heidelberg (2010)
7. Wang, G., Guo, L.: A novel hybrid bat algorithm with harmony search for global
numerical optimization. J. Appl. Math. 2013, 21 (2013)
8. Pan, J-S., Dao, T.-K., Kuo, M.-Y., Horng, M.-F., et al.: Hybrid bat algorithm
with artificial bee colony. In: Pan, J.-S., Snasel, V., Corchado, E.S., Abraham, A.,
Wang, S.-L. (eds.) Intelligent Data analysis and its Applications, Volume II, vol.
298, pp. 45–55. Springer, Heidelberg (2014)
9. Pan, T.S., Dao, T.-K., Chu, S.-C., et al.: Hybrid particle swarm optimization
with bat algorithm. In: Sun, H., Yang, C.-Y., Lin, C.-W., Pan, J.-S., Snasel, V.,
Abraham, A. (eds.) Genetic and Evolutionary Computing. Advances in Intelligent
Systems and Computing, vol. 329. Springer, Heidelberg (2015)
10. Meng, X., Gao, X., Liu, Y.: A novel hybrid bat algorithm with differential evolution
strategy for constrained optimization. Int. J. Hybrid Inf. Technol. 8(1), 383–396
(2015)
11. Wang, G., Guo, L., Duan, H., Liu, L., Wang, H.: A bat algorithm with mutation
for UCAV path planning. Sci. World J. 2012, 15 (2012)
12. Zhang, J.W., Wang, G.G.: Image matching using a bat algorithm with mutation.
In: Applied Mechanics and Materials, vol. 203, pp. 88–93. Trans Tech Publications
(2012)
13. Fister Jr., I., Fister, D., Yang, X.-S.: A hybrid bat algorithm, ArXiv e-prints, March
2013
14. Perez, J., Valdez, F., Castillo, O.: Modification of the bat algorithm using fuzzy
logic for dynamical parameter adaptation. In: 2015 IEEE Congress on Evolutionary
Computation (CEC), pp. 464–471, May 2015
15. Lin, J.-H., Chou, C.-W., Yang, C.-H., Tsai, H.-L., et al.: A chaotic levy flight
bat algorithm for parameter estimation in nonlinear dynamic biological systems.
Comput. Inf. Technol. 2(2), 56–63 (2012)
16. Abdel-Raouf, O., Abdel-Baset, M., El-Henawy, I.: An improved chaotic bat algo-
rithm for solving integer programming problems. Int. J. Mod. Educ. Comput. Sci.
(IJMECS) 6(8), 18 (2014)

[email protected]
Improved Hybrid Bat Algorithm for TSP 511

17. Gandomi, A.H., Yang, X.-S.: Chaotic bat algorithm. J. Comput. Sci. 5(2), 224–232
(2014)
18. Khan, K., Nikov, A., Sahai, A.: A fuzzy bat clustering method for ergonomic
screening of office workplaces. Third International Conference on Software, Services
and Semantic Technologies S3T. Advances in Intelligent and Soft Computing, vol.
101, pp. 59–66. Springer, Heidelberg (2011)
19. Saji, Y., Riffi, M.E., Ahiod, B.: Discrete bat-inspired algorithm for travelling sales-
man problem. In: Second World Conference on Complex Systems (WCCS), pp.
28–31. IEEE (2014)
20. Osaba, E., Yang, X.-S., Diaz, F., Lopez-Garcia, P., Carballedo, R.: An improved
discrete bat algorithm for symmetric and asymmetric traveling salesman problems.
Engineering Applications of Artificial Intelligence 48, 59–71 (2016)

[email protected]

You might also like