http://dx.doi.org/10.5755/j01.eee.20.2.4762 ELEKTRONIKA IR ELEKTROTECHNIKA, ISSN 1392-1215, VOL. 20, NO. 2, 2014
Modified Bat Algorithm
S. Yılmaz1, E. Ugur Kucuksille2, Y. Cengiz3
1
Department of Mechatronics Engineering, Pamukkale University,
Denizli, 20020, Turkey
2
Department of Computer Engineering, Suleyman Demirel University,
Isparta, 32260, Turkey
3
Department of Electronics and Communication Engineering, Suleyman Demirel University,
Isparta, 32260, Turkey
[email protected]
1Abstract—Heuristic optimization algorithms which are methods are divided into six different groups as biological-
inspired by nature have become very popular for solving real based, physical-based, social-based, swarm-based, musical-
world problems recently. The use of these algorithms increases based and chemical-based [6], [7]. Genetic Algorithm [8]
day by day in the literature because of their flexible structures
and Differential Evolution Algorithm [9] are grouped as
and non-containing confusing mathematical terms. One of
these algorithms is Bat Algorithm (BA). BA is a heuristic biology-based algorithm; Gravitational Search Algorithm
algorithm based on echolocation characteristic of bats and [10] and Electromagnetism Algorithm [11] are grouped as
developed by the mimics of bats’ foraging behaviour. In this physics-based algorithm; Tabu Search [12] is grouped as
study exploration mechanism of the algorithm is improved by social-based algorithm; Particle Swarm Optimization [13],
modifying the equation of pulse emission rate and loudness of Ant Colony Optimization [14] are grouped as swarm-based
bats. The performance of Modified Bat Algorithm (MBA) is
algorithm; Harmony Search Algorithm [3] is grouped as
verified by 15 benchmark functions and the results were
exhibited as comparative. The results of MBA are superior in music-based algorithm; Artificial Chemical Reaction
terms of solution quality on optimization problems compared Algorithm [15] is grouped as chemical-based algorithm.
to BA. There are two crucial components in modern
metaheuristics: Exploration and exploitation [3].
Index Terms—Optimization, bat algorithm, swarm Exploration is investigation capability of obscure various
intelligence, bio-inspired computing. spaces so as to detect global optimum point, while
exploitation refers to effort to find optimum point by using
I. INTRODUCTION previous best solutions’ knowledge. A good response of an
Over the last few decades evolutionary optimization algorithm depends on well-balanced of these components
algorithms has been utilized in large numbers of field. The [16], [17]. In the case of too little exploration but intensive
main goal of the works is to perform faster and more exploitation, algorithm can get trapped into local optimum
successful optimization process. In contrast to traditional points. On the other hand too much exploration but scarce
computational systems, evolutionary computation provides a exploitation could cause the algorithm to converges slowly
more robust and efficient approach for solving complex and decreases overall search performance [3], [16]. Some of
real-world problems [1]. Generally, evolutionary the studies indicate that it’s advantageous to adopt “explore
optimization algorithms which simulate the evolution first, exploit later” approach to obtain necessary data about
phenomenon of biological colony can be used to solve some search space before exploitation is applied [18].
complicated optimization problems. According to the Bats have the mechanism called echolocation which
operating mechanism of evolutionary algorithms, they are guides their hunting strategies. The echolocation capability
based on the existing individuals of the previous generation of microbats is fascinating, as these bats can find their prey
and searches at random without guidance [2]. The and discriminate different types of insects even in complete
optimization process of real world problems by evolutionary darkness. BA is an algorithm inspired by echolocation
algorithm is quite similar to the simplified animal social characteristic of bats proposed by Yang [19].
behaviors. In this proposed study, it is aimed that algorithm explores
Heuristic Algorithms mostly inspired by social behaviour the search space more efficiently by improving exploration
of animals do not guarantee optimal solution due to their component of BA. Each bat which searches the space has
random-based structure. However these algorithms are one pulse emission rate (r) and loudness (A) in standard
methods which generally have a tendency to find good version of BA. In MBA loudness and pulse rate, which acts
solutions. The word “Heuristic” refers to “solution by trial as a balance, are equalized to number of problem dimension.
and error method” and the word “meta” refers to “high Thus it’s provided that bats search the space effectively. In
level”. Hence metaheuristic algorithms solve optimization order to examine performance of the proposed algorithm
problems via high level techniques [3]–[5]. Heuristic (MBA), it is applied on unimodal, multimodal and shifted
benchmark functions with different dimensions and the
Manuscript received July 10, 2013; accepted November 29, 2013. results are compared with BA.
71
ELEKTRONIKA IR ELEKTROTECHNIKA, ISSN 1392-1215, VOL. 20, NO. 2, 2014
The rest of this paper is organized as follows. Section II collision and reflection of these spread signals [20]. In BA,
summarizes BA. The studies of BA in literature are the echolocation characteristics are idealized within the
presented in Section III. The MBA is expressed in Section framework of the following rules by benefitting such
IV. Section V contains benchmark functions and results. features of bats [19]:
Finally conclusion is presented in Section VI. 1. All bats use echolocation to sense distance, and
they also ‘know’ the difference between food/prey and
II. BAT ALGORITHM background barriers in some magical way;
BA, proposed by Yang [19], is a meta-heuristic algorithm 2. Bats fly randomly with velocity vi at position xi
inspired by fascinating abilities of bats such as finding their with a frequency fmin, varying wavelength and loudness A0
prey and discriminating different types of insects even at to search for prey. They can automatically adjust the
complete darkness. The advanced echolocation capability of wavelength (or frequency) of their emitted pulses and
bats makes them fascinating. Such abilities inspired to adjust the rate of pulse emission r [0,1], depending on
researchers on many fields. Bats use typical sonar called as the proximity of their target;
echolocation to detect prey and to avoid obstacles. Bats, in 3. Although the loudness can vary in many ways, we
particular micro-bats, are able to recognize positions of the assume that the loudness varies from a large (positive) A0
objects by spreading high and short audio signals and by to a minimum constant value Amin.
TABLE I. BENCHMARK FUNCTIONS USED IN EXPERIMENTS.
Function Search range Min Formulation
f1 [-5.12,5.12] 0 ଵ = ଶ
ୀଵ
f2 [-5.12,5.12] 0 ଶ = ଶ
ୀଵ
f3 [-1,1] 0 ଷ = | |ାଵ
ୀଵ
ଶ
f4 [-100,100] 0 ସ = + 0.5
ୀଵ
f5 [-2pi,2pi] -1 ହ = −−1
cos ଶ
exp − −
ଶ
ୀଵ ୀଵ
ଶ
ଶ
f6 [0,pi] * = − sin( ) sin
ୀଵ
1
f7 [-600,600] 0 = ଶ − cos +1
4000 ୀଵ ୀଵ √
f8 [-5.12,5.12] 0 ଼ = ଶ − 10 cos2
+ 10
ୀଵ
f9 [-500,500] 0 ଽ = 418.982 + − | |
ୀଵ
1 1
f10 [-32.768,32.768] 0 ଵ = −20 exp
−0.2 ଶ
− exp 2 + 20 +
ୀଵ ୀଵ
ିଵ
f11 [-2.048,2.048] 0 ଵଵ = 100ାଵ −
ଶ + − 1
ଶ
ୀଵ
f12 [-100,100] 0 ଵଶ = ଶ
ୀଵ
f13 [-5.12,5.12] 0 ଵଷ = ଶ − 10 cos2
+ 10
ୀଵ
1 1
f14 [-32.768,32.768] 0 ଵସ = −20 exp
−0.2 ଶ
− exp 2 + 20 +
ୀଵ ୀଵ
1
f15 [-600,600] 0 ଵହ = ଶ − cos +1
4000 ୀଵ ୀଵ √
Note: ݔ = ݖ− and ‘o’ is randomly generated shifted vector located in search range;
* -4.687, -9.66, -99.28 for d=5, 10, 100 respectively
A. Algorithm 1. (Bat Algorithm) 5. while(t<maximum number of iterations)
1. Objective function: f(x), x=(x1,….xd)t 6. Generate new solutions by adjusting frequency, and
2. Initialize bat population xi and velocity vi i=1,2,..n updating velocities and location/solutions.
3. Define pulse frequency fi at xi 7. if(rand> ri)
4. Initialize pulse rate ri and loudness Ai 8. Select a solution among the best solutions
72
ELEKTRONIKA IR ELEKTROTECHNIKA, ISSN 1392-1215, VOL. 20, NO. 2, 2014
9. Generate a local solution around the selected best region which includes food/prey for bats, the bats randomly
solution spread to the search space at first iteration since they have
10. end if no idea where the preys are in space at the beginning. The
11. if(rand< Ai and f(xi)< f(x*)) fitness value of each bat defines the quality of food source
12. Accept new solutions where it locates. Initial population is randomly generated
13. Increase ri, reduce Ai from real-valued vectors with d dimension and n number, by
14. end if taking into account lower and upper boundaries. (2nd line in
15. Ranks the bats and find current best x* Algorithm 1)
16. end while
17. Display results. , = + rand(0,1) − , (1)
B. Initialization of Bat Population where i = 1,2,…n, j = 1,2,….d, xminj and xmaxj are lower and
Since the search space in the problem is assumed as a upper boundaries for dimension j respectively.
TABLE II. THE COMPETITIVE PERFORMANCE OF BA AND MBA ON UNIMODAL FUNCTIONS.
Fun Dim Best Worst Mean Median SD Significant
5 BA 1.15e-01 3.67e-00 7.82e-01 6.06e-01 6.89e-01
MBA 7.52e-04 5.88e-03 3.16e-03 3.43e-03 1.42e-03 +
10 BA 1.09e-00 7.49e-00 3.84e-00 3.92e-00 1.58e-00
MBA 3.73e-03 1.60e-02 8.80e-03 7.74e-03 3.34e-03 +
f1
30 BA 1.26e+01 4.13e+01 2.33e+01 2.10e+01 6.87e-00
MBA 1.07e-02 1.95e-01 4.61e-02 3.06e-02 4.38e-02 +
60 BA 3.83e+01 8.83e+01 5.53e+01 5.58e+01 1.15e+01
MBA 5.87e-00 2.30e+01 1.08e+01 1.02e+01 3.70e-00 +
5 BA 9.66e-02 9.86e-00 2.17e-00 1.73e-00 2.36e-00
MBA 1.15e-03 1.79e-02 7.63e-03 7.74e-03 4.06e-03 +
10 BA 2.09e-00 3.43e+01 1.82e+01 1.68e+01 8.77e+00
MBA 1.66e-02 1.07e-01 4.73e-02 4.38e-02 2.20e-02 +
f2
30 BA 1.68e+02 6.99e+02 3.83e+02 3.75e+02 1.15e+02
MBA 5.68e-01 2.64e+01 6.82e-00 3.94e-00 6.74e-00 +
60 BA 1.07e+03 2.26e+03 1.70e+03 1.67e+03 3.14e+02
MBA 9.36e+01 7.61e+02 4.02e+02 3.75e+02 1.42e+02 +
5 BA 4.23e-06 4.23e-03 6.86e-04 3.97e-04 8.76e-04
MBA 4.64e-05 1.21e-03 3.00e-04 2.25e-04 2.46e-04 +
10 BA 3.62e-05 1.69e-02 3.09e-03 1.29e-03 4.09e-03
MBA 6.12e-04 1.07e-02 3.53e-03 3.35e-03 2.18e-03 .
f3
30 BA 9.98e-05 2.57e-02 2.53e-03 8.60e-04 4.87e-03
MBA 3.27e-03 4.83e-01 1.07e-01 5.85e-02 1.08e-01 .
60 BA 8.26e-05 7.86e-03 2.25e-03 1.67e-03 1.98e-03
MBA 9.19e-03 1.01e-00 2.58e-01 2.00e-01 2.21e-01 .
5 BA 3.16e-16 6.24e-10 4.85e-11 8.01e-12 1.17e-10
MBA 8.36e-15 8.52e-11 9.06e-12 2.45e-12 1.62e-11 +
10 BA 4.39e-14 3.62e-10 3.50e-11 1.18e-11 6.78e-11
MBA 6.16e-16 4.14e-10 2.21e-11 2.21e-11 7.60e-11 +
f4
30 BA 4.90e-16 1.30e-09 5.62e-11 3.18e-12 2.32e-10
MBA 5.14e-17 4.87e-11 1.0e-11 3.61e-12 1.44e-11 +
60 BA 5.00e-14 3.54e-10 2.52e-11 6.31e-12 6.39e-11
MBA 7.59e-16 4.54e-11 6.82e-12 1.40e-12 1.12e-11 +
5 BA 1.30e-193 2.54e-159 4.24e-160 1.30e-193 9.49e-160
MBA 1.30e-193 2.54e-159 8.49e-161 1.30e-193 4.57e-160 +
10 BA -1.11e-04 -8.9556e-15 -4.85e-06 -6.01e-08 2.00e-05
MBA -9.92e-01 -9.60e-01 -9.80e-01 -9.80e-01 7.64e-03 +
f5
30 BA -1.47e-24 -2.69e-55 -4.97e-26 -2.32e-39 2.64e-25
MBA -9.89e-01 -1.00e-005 -7.07e-01 -9.72e-01 4.16e-01 +
60 BA -6.78e-43 0 -2.26e-44 -6.69e-124 1.21e-43
MBA -2.26e-24 0 -7.55e-26 0 4.06e-25 +
which homogeneously dispersed in frequency band
C. Generation of Frequency, Velocity and New Solutions [fmin,fmax]. Because of f frequency controls pace and range of
The pulse frequency, which emits by bats, ranges between movement, the update process of bats’ position/solution and
upper and lower bounds. As seen in 3rd line in Algorithm 1, velocity is similar to Particle Swarm Optimization (PSO)
pulse frequency is randomly assigned to different values [19]. For the future iterations, frequency and consequently
73
ELEKTRONIKA IR ELEKTROTECHNIKA, ISSN 1392-1215, VOL. 20, NO. 2, 2014
velocity and position of a bat are evaluated as follows: a bat which meets the requirement in 7th line in Algorithm
1, once one of the existing solution among the best solutions
= + ( − ) , (2) is selected thus new candidate solution are generated by
= + – ∗ , (3) random walk
= + , (4)
= + Ᾱ, (5)
where β ϵ [0,1] indicates randomly generated number, x*
represents solution of bat which has best fitness value where Ᾱt, is average loudness of all bats, ɛ ϵ [0,1] is random
obtained after comparison among all the n bats so far. number and represents direction and intensity of random-
In order to increase the diversity of possible solutions, for walk.
TABLE III. THE COMPETITIVE PERFORMANCE OF BA AND MBA ON MULTIMODAL FUNCTIONS.
Fun Dim Best Worst Mean Median SD Significant
5 BA -3.84e-00 -2.49e-00 -3.15e-00 -3.16e-00 3.30e-01
MBA -4.45e-00 -3.91e-00 -4.20e-00 -4.18e-00 1.26e-01 +
10 BA -5.74e-00 -3.40e-00 -4.54e-00 -4.54e-00 4.58e-01
MBA -6.66e-00 -5.69e-00 -6.05e-00 -5.98e-00 2.65e-01 +
f6
30 BA -1.20e+01 -8.46e-00 -9.70e-00 -9.48e-00 9.32e-01
MBA -1.32e+01 -1.00e+01 -1.11e+01 -1.10e+01 5.83e-01 +
60 BA -1.79e+01 -1.45e+01 -1.60e+01 -1.59e+01 8.56e-01
MBA -1.91e+01 -1.58e+01 -1.70e+01 -1.68e+01 7.95e-01 +
5 BA 1.22e-00 8.87e-00 3.84e-00 3.31e-00 1.97e-00
MBA 1.06e-01 1.95e-00 3.54e-01 2.35e-01 3.48e-01 +
10 BA 2.51e-00 2.59e+01 1.58e+01 1.67e+01 5.15e-00
MBA 2.05e-00 2.06e+01 8.12e-00 6.62e-00 5.39e-00 +
f7
30 BA 4.84e+01 1.48e+02 9.55e+01 9.21e+01 2.68e+01
MBA 6.36e+01 1.82e+02 1.10e+02 1.01e+02 2.83e+01 .
60 BA 1.03e+02 4.09e+02 2.00e+02 1.80e+02 6.19e+01
MBA 2.16e+02 4.26e+02 3.19e+02 3.21e+02 5.64e+01 .
5 BA 7.24e-00 2.79e+01 1.72e+01 1.72e+01 6.23e-00
MBA 1.66 e-00 4.95 e-00 3.35 e-00 3.46 e-00 7.95e-01 +
10 BA 4.91e+01 8.62e+01 6.64e+01 6.47e+01 9.99e-00
MBA 1.46e+01 3.48e+01 2.49e+01 2.55e+01 4.35e-00 +
f8
30 BA 2.11e+02 3.04e+02 2.67e+02 2.67e+02 2.01e+01
MBA 2.72e+01 2.11e+02 1.63e+02 1.77e+02 4.40e+01 +
60 BA 5.33e+02 6.37e+02 5.88e+02 5.87e+02 2.70e+01
MBA 1.85e+02 5.58e+02 3.84e+02 4.00e+02 1.21e+02 +
5 BA 5.84e+02 1.04e+03 8.49e+02 8.21e+02 1.28e+02
MBA 1.40e-02 7.15e+02 2.56e+02 2.42e+02 1.84e+02 +
10 BA 1.50e+03 2.82e+03 2.27e+03 2.32e+03 2.83e+02
MBA 7.01e+02 1.45e+03 1.01e+03 9.78e+02 1.82e+02 +
f9
30 BA 6.71e+03 1.01e+04 8.72e+03 8.96e+03 1.12e+03
MBA 3.91e+03 5.71e+03 5.10e+03 5.04e+03 3.83e+02 +
60 BA 1.39e+04 2.16e+04 1.85e+04 1.97e+04 2.86e+03
MBA 1.10e+04 1.35e+04 1.24e+04 1.25e+04 6.77e+02 +
5 BA 4.40e-00 1.17e+01 8.70e-00 9.31e-00 2.08e-00
MBA 3.47e-02 1.53e-01 9.08e-02 8.88e-02 2.39e-02 +
10 BA 8.29e-00 1.71e+01 1.27e+01 1.28e+01 2.11e-00
MBA 3.61e-02 1.79e-00 1.67e-01 6.91e-02 3.60e-01 +
f10
30 BA 1.35e+01 1.68e+01 1.51e+01 1.50e+01 7.11e-01
MBA 7.53e-00 1.38e+01 1.11e+01 1.10e+01 1.63e-00 +
60 BA 1.45e+01 1.70e+01 1.57e+01 1.56e+01 6.84e-01
MBA 1.31e+01 1.63e+01 1.45e+01 1.45e+01 8.07e-01 +
5 BA 1.51e-00 3.86e+01 7.57e-00 5.99e-00 6.59e-00
MBA 1.90e-01 2.09e-00 1.13e-00 1.20e-00 4.11e-01 +
10 BA 1.73e+01 1.11e+02 6.36e+01 5.86e+01 2.57e+01
MBA 7.44e-00 1.64e+01 1.03e+01 1.00e+01 1.94e-00 +
f11
30 BA 1.94e+02 8.38e+02 4.56e+02 4.48e+02 1.46e+02
MBA 2.52e+01 3.4e+01 2.97e+01 2.98e+01 1.75e-00 +
60 BA 4.34e+02 1.77e+03 1.09e+03 1.09e+03 3.30e+02
MBA 1.69e+02 3.65e+02 2.57e+02 2.40e+02 6.19e+01 +
74
ELEKTRONIKA IR ELEKTROTECHNIKA, ISSN 1392-1215, VOL. 20, NO. 2, 2014
D. Updating Loudness and Pulse Emission Rate
Update is necessary for the factors loudness Ai and pulse
emission rate ri as iteration proceeds. As bats approach to
their prey, the pulse emission rate increases while loudness
usually decreases (Fig. 1, Fig. 2).
Fig. 2. Changes in pulse rate (r) throughout 100 iterations.
III. LITERATURE REVIEW
Khan and Sahai used BA for training of Proben1 dataset
by neural network [21], Gandomi and Yang tested the
performance of BA on some constrained engineering
problems [22], Komarasamy and Wahi united the BA and
Fig. 1. Changes in loudness (A) throughout 100 iterations. K-Medoid (KM) clustering algorithm as a new metaheuristic
(KMBA) to fulfil the problem of initialization cluster
These factors will be updated when only new solutions
centroid of KM [23],
are improved, namely bats approach their prey/targets.
continuous problems [24], Yilmaz and Kucuksille
Loudness Ai and pulse emission rate ri are updated by the
proposed some modifications on BA for continuous
following equations as iteration proceeds:
problems [25], Wang and Guo hybridized BA with
= , (6) Harmony Search Algorithm for solving numerical problems
= (1 − ), (7) [26], Biswal et. al used BA to find optimal solution on
where α and γ are constants. ri0 and Ai are factors which economic load dispatch problem [27], Marichelvam et al.,
consist of random values and Ai0 can typically be [1], [2], proposed BA on multistage hybrid flow shop scheduling
while ri0 can typically be [0, 1]. problem [28].
TABLE IV. THE COMPETITIVE PERFORMANCE OF BA AND MBA ON SHIFTED FUNCTIONS.
Fun Dim Best Worst Mean Median SD Significant
5 BA 2.06e+01 1.79e+03 5.17e+02 4.64e+02 3.85e+02
MBA 7.25e-05 1.70e-03 3.84e-04 3.11e-04 3.08e-04 +
10 BA 1.48e+03 8.97e+03 5.05e+03 4.93e+03 1.73e+03
MBA 4.38e-04 8.84e+02 1.52e+02 9.71e+01 1.80e+02 +
f12
30 BA 3.38e+04 9.47e+04 6.17e+04 6.33e+04 1.44e+04
MBA 9.60e+03 2.79e+04 1.70e+04 1.59e+04 5.29e+03 +
60 BA 1.18e+05 2.41e+05 1.75e+05 1.67e+05 2.91e+04
MBA 6.51e+04 12.6e+05 9.09e+04 8.93e+04 1.57e+04 +
5 BA 5.44e-00 3.80e+01 1.72e+01 1.67e+01 7.79e-00
MBA 6.86e-01 5.26e-00 2.91e-00 3.07e-00 1.17e-00 +
10 BA 5.45e+01 1.12e+02 8.04e+01 8.45e+01 1.46e+01
MBA 1.31e+01 2.81e+01 2.09e+01 2.05e+01 4.72e-00 +
f13
30 BA 3.33e+02 4.86e+02 4.18e+02 4.16e+02 3.57e+01
MBA 3.81e+01 9.13e+01 5.45e+01 5.21e+01 1.15e+01 +
60 BA 8.35e+02 1.24e+03 1.01e+03 9.87e+02 7.91e+01
MBA 1.89e+02 3.24e+02 2.58e+02 2.61e+02 3.57e+01 +
5 BA 3.63e-00 1.48e+01 8.97e-00 8.49e-00 2.53e-00
MBA 3.29e-02 1.21e-01 7.39e-02 7.31e-02 2.20e-02 +
10 BA 1.31e+01 2.05e+01 1.69e+01 1.66e+01 2.02e-00
MBA 2.05e-02 2.34e-00 4.47e-01 7.70e-02 7.50e-00 +
f14
30 BA 1.96e+01 2.11e+01 2.07e+01 2.08e+01 3.73e-01
MBA 1.41e+01 2.07e+01 1.68e+01 1.67e+01 1.63e-00 +
60 BA 2.08e+01 2.13e+01 2.10e+01 2.10e+01 1.20e-01
MBA 1.81e+01 1.99e+01 1.92e+01 1.92e+01 3.74e-01 +
5 BA 1.72e-00 1.58e+01 7.14e-00 6.38e-00 4.15e-00
MBA 4.19e-02 1.78e-00 4.58e-01 3.38e-01 4.12e-01 +
10 BA 1.21e+01 9.92e+01 4.95e+01 4.32e+01 2.07e+01
MBA 1.86e-00 1.79e+01 6.51e-00 5.52e-00 3.44e-00 +
f15
30 BA 4.23e+02 9.34e+02 6.24e+02 6.21e+02 1.40e+02
MBA 9.75e+01 2.90e+02 2.02e+02 2.00e+02 5.46e+01 +
60 BA 1.17e+03 1.85e+03 1.59e+03 1.62e+03 1.75e+02
MBA 6.30e+02 1.38e+03 9.37e+02 9.34e+02 1.62e+02 +
75
ELEKTRONIKA IR ELEKTROTECHNIKA, ISSN 1392-1215, VOL. 20, NO. 2, 2014
Fister et al. hybridized BA with Differential Evaluation
B. Proposed Approach
Algorithm and tested the algorithm on some unconstrained
BA has poor exploration capability therefore the
IV. MODIFIED BAT ALGORITHM convergence of obtained solution to the global optimum
point is mostly impossible. Exploration mechanism of BA is
BA is an optimization method which includes loudness A
improved by equalizing the loudness A and pulse emission
and pulse emission rate r factors apart from some
rate r to the problem dimension. The factors A and r, which
parameters of population based algorithm such as population
belong to each bat, exist in BA and these factors influence
number, search dimension, maximum cycle number. At the
all dimensions of the solutions. Such factors are assigned to
onward iterations of BA pulse emission rate, r decreases
each dimension of the solution separately in this proposed
while loudness A increases exponentially (Fig. 1, Fig. 2).
approach. Thus each dimension of the solution can perform
Thus, According to pseudo code (Algorithm 1), it’s low
different capabilities (exploration and exploitation)
possibility that the condition (7th row) is ensured by a bat.
simultaneously. In BA each solution, which provides the
Hereby, algorithm loses exploration capability highly at the
rand > ri (7th line in Algorithm 1), approaches around the
following iterations. At the beginning of the iterations,
best solution with its entire dimension, but in MBA, each
exploitation capability is dominant while exploration
dimension j of solution i, which provides the randj > rij,
capability comes to the forefront at the following iterations.
approaches around the dimension j of the best solution and
However, an optimization algorithm has to drive forward
the rest dimensions of solution i keep on seeking the search
exploration capability at the first iterations then exploitation
space. The equation, which generates candidate solution
capability at the later iterations so as to reach optimum
around the best solution (5) for all dimensions in BA, is
point. The essence of this study is to create modified Bat
adapted for each dimension in MBA as following
Algorithm which eliminates mentioned problem.
A. Balance Problem between Exploration and Exploitation + ̅ > ,
of Current Algorithm = (8)
ℎ ,
The generation process of candidate solution around the
best solution (5) increases exploitation capability; while the where u indicates a solution selected among best solutions,
process of updating solution (2)–(4) increases exploration while Ᾱjt represents average loudness of dimension j of all
capability of BA. It is understood that, only if new candidate solutions at time t.
solutions are generated by (2)–(4), algorithm will be good at While all dimensions of each candidate solution where
exploration but bad at exploitation; on the other hand only if Ai > rand (10th line in algorithm 1) are included to
new candidate solutions are generated around a solution population in BA, candidate solution is included to
which selected among current best solutions (5), algorithm population where Ᾱi > rand in proposed algorithm. Here Ᾱi
will be bad at exploration but good at exploitation. Thus is average loudness of solution i. Update processes of A and
algorithm can easily get trapped into local minimum on r of proposed approach (12th line in Algorithm 1) only
multimodal functions. Actually, pulse emission rate (r) is a influence dimension j of solution i where (randj > rij).
factor which provides a balance between exploration and Therefore, the (6), (7) are updated as following:
exploitation. However as seen from Fig. 2 and (7), the
increase rate of r is proportional to number of iterations. , > ,
Thus, the case of rand > ri (7th line in Algorithm 1) is most = (9)
, ℎ ,
likely accepted at the beginning of iterations then new
candidate solutions will be around a solution which selected (1 − ), > ,
= (10)
among the best solutions. The possibility of rand > ri , ℎ .
decreases as the iteration proceeds. This means that
exploitation will be applied at first steps of iterations and Suppose the dimensions j, where randj > rij, are called as
exploration will be applied at the following iterations. y. It’s expected from dimensions y of solution i which
Figure 1 and (6) demonstrate that the loudness A previously exploit, to search the space through exploration
decreases during the iterations. Accordingly the possibility capability as iteration proceeds. Therefore the possibility of
of Ai > rand (10th line in Algorithm 1) is higher at the randj > rij is reduced by increasing of pulse emission rate r
beginning of iterations but lower at the following iterations. for dimensions y. Similarly, it’s expected from the other
Although, as seen in Fig. 2, pulse emission rate r increases dimensions, which previously explore apart from y, to
exploration capability, the possibility of Ai > rand weakens upgrade current solutions by exploitation capability at the
because of loudness A will decrease as the iteration following iterations. For that reason the possibility of randj
proceeds. It means that the inclusion possibility of new > rij is preserved for other dimensions apart from y at the
candidate solutions, which generated by exploration at the following iterations.
end of the iterations, into the bat population is weak. If the If the second term (ɛᾹt) on the right side of the (5) is
algorithm gets trapped into local minimum at the beginning analysed, loudness A decreases as iteration proceeds
of iterations, newly generated solutions also accumulate (Fig. 1), (6). Therefore the range, where candidate solution
around such local minimum. Due to this reason, the elusion searches to find minimum point around best solution of
possibility of algorithm from local region decreases. current population, narrows (Fig. 3). Hence, new candidate
76
ELEKTRONIKA IR ELEKTROTECHNIKA, ISSN 1392-1215, VOL. 20, NO. 2, 2014
solutions converge to the best solution as iteration proceeds. As the dimensions of problem to be optimized increase,
In proposed approach, search range of best solution is performance of most of the optimization method weakens
narrowed for dimensions y by reducing loudness A that quickly. There are two reasons: First, solution space of
belongs to these dimensions (9). problem exponentially increases and more effective
strategies are needed to seek all promising regions. Second,
the characteristic of problem also changes with scale.
Increment of dimension of some optimization objective
functions causes changes in characteristic of this objective
function like in Rosenbrock’s function. In this type of
objective functions, the performance of algorithm shows a
change depending on the dimension [30]. Due to this reason,
as seen in Table III, the performance of both algorithms (BA
and MBA) decreases as their dimensions increase.
Fig. 3. Local search region around selected best solution during four
iterations while A=1.9,α=0.3, ɛ=0.9.
The reason why loudness A is not decreased apart from
dimension y is to protect the local search range of these
dimensions and to prevent restriction of this range.
V. COMPUTATIONAL EXPERIMENTS a) b)
A. Benchmark Functions
In order to verify efficiency of proposed approach
(MBA), two algorithms (BA – MBA) are tested on 15
different benchmark functions with different dimensions as
seen in Table I. The function numbers, bounds of search
space, global minimum values of the functions are shown in
Table I respectively. Functions are tested with the dimension
d = 5, 10, 30 and 60. f1-f5 are unimodal functions, f6-f11 are c) d)
multimodal functions and number of local minima of these
functions are proportional to problem size. f12-f15 are shifted
functions. f12 is Rosenbrock’s function and it’s unimodal for
d = 2,3 while it’s multimodal for more dimensions [16]. f6 is
Michalewicz’s function and its global minimum is -4.687,-
9.66 for d = 5 and 10 respectively. f5 is Easom’s function,
normally it is 2 dimensional test function but Yang extended
this function to n dimensions [29]. e) f)
As the number of problem dimension increases on each
benchmark functions, function evaluation number (FE) also
increases and it is 25.000, 50.000, 150.000 and 300.000 for
d = 5, 10, 30 and 60 respectively. The solution number in
population is fixed to 50. Algorithms are tested with 30
independent runs for each test function.
B. Experimental Results
In this section, BA - MBA are compared in terms of g) h)
solution quality within negligible CPU time. As a result of Fig. 4. Convergence performances of MBA and BA on different functions:
30 runs, the fitness values of “Best, worst, mean, median, a) f6 function with d=5, b) f12 function with d=5, c) f10 function with d=10,
d) f2 function with d=10, e) f14 function with d=30, f) f5 function with d=30,
standard deviation” are comparatively shown in Table II– g) f4 function with d=60, h) f13 function with d=60.
Table IV.
In order to analyse the results of performances of both So as to evaluate the performance of both algorithms, 15
algorithms, the “mean” values in Table II–Table IV are different unimodal multimodal and shifted benchmark
considered. The signs “+” and “.” at the rightmost column functions with 4 different dimensions are utilized. It means
named “significant” indicate that MBA is better than BA 60 test implementations are used. MBA is better than BA on
and MBA is worse than BA respectively. 17 of 20 implementations of unimodal functions (85 %
The graphics (Fig. 4), which formed through a run that success rate), 22 of 24 implementations of multimodal
randomly selected among 30 runs, exhibits changes of functions (92 % success rate) and all of 16 implementations
fitness values of objective function with FE for both of shifted functions (100 % success rate). Totally, MBA is
algorithms. better than BA on 55 of 60 implementations of three types
77
ELEKTRONIKA IR ELEKTROTECHNIKA, ISSN 1392-1215, VOL. 20, NO. 2, 2014
of functions (92 %). BA only produces better results than [11] S. I. Birbil, S. C. Fang, “An electromagnetism-like mechanism for
global optimization”, Journal of Global Optimization, vol. 25, no. 3,
MBA on the functions f3 with d = 10, 30, 60 and f7 with d = pp. 263–282, 2003. [Online]. Available: http://dx.doi.org/
30, 60. 10.1023/A:1022452626305
As it can be easily seen from the implementation results, [12] F. Glover, M. Laguna, Tabu Search. Kluwer, Norwell, 1997.
[13] J. Kennedy, R. C. Eberhart, “Particle swarm optimization”, in Proc. of
proposed MBA provided smaller fitness values for most of
IEEE Int. Conf. on Neural Networks, vol. 4, pp. 1942–1948, 1995.
the unconstrained, continuous benchmark functions which [Online]. Available: http://dx.doi.org/10.1109/ICNN.1995.488968
are in Table I. [14] M. Dorigo, V. Maziezzo, A. Colorni, “The ant system: optimization
by a colony of cooperating ants”, IEEE Trans. on Systems, Man and
Cybernetics B, vol. 26, no. 1, pp. 29–41, 1996. [Online]. Available:
VI. CONCLUSIONS http://dx.doi.org/10.1109/3477.484436
In this study, it’s investigated that whether this applied [15] B. Alatas, “ACROA: artificial chemical reaction optimization
algorithm for global optimization”, Expert Systems with Applications,
modification is successful or not on unimodal, multimodal vol. 38, no. 10, pp. 13170–13180, 2011. [Online]. Available:
and shifted unconstrained, numeric optimization problems http://dx.doi.org/10.1016/j.eswa.2011.04.126
by modifying standard Bat Algorithm. While the factors of [16] W. Gao, S. Liu, “A modified artificial bee colony algorithm ”,
pulse emission rate (r) and loudness (A) influence all Computers and Operations Research, vol. 39, 2012, pp. 687–697.
[Online]. Available: http://dx.doi.org/10.1016/j.cor.2011.06.007
dimensions of solutions during the search in standard [17] X. S. Yang, “Review of metaheuristics and generalized evolutionary
method (BA), solutions influence the dimensions of each walk algorithm”, Int. J. Bio-Inspired Computation, vol. 3, no. 2, pp.
solution differently owing to these factors, which belong to 77–84, 2011. [Online]. Available: http://dx.doi.org/10.1504/IJBIC.
2011.039907
each bat, are equalized to number of problem dimension in [18] K. C. Tan, S. C. Chiam, A. A. Mamun, C. K. Goh, “Balancing
proposed approach (MBA). Thereby these factors cause exploration and exploitation with adaptive variation for evolutionary
exploration on some dimensions of a solution and multi-objective optimization”, European Journal of Operational
Research, vol. 197, 2009, pp. 701–713. [Online]. Available:
exploitation on rest of the dimensions of a solution. http://dx.doi.org/10.1016/j.ejor.2008.07.025
BA and MBA are compared on 15 different benchmark [19] X. S. Yang, “A new metaheuristic bat-inspired algorithm”, in Proc.
test functions and results are comparatively shown in Nature Inspired Cooperative Strategies for Optimization (NISCO
2010), Springer Berlin, vol. 284, 2010, pp. 65–74.
Table II–Table IV. The results obtained from the [20] X. S. Yang, “Bat algorithm for multi-objective optimization”, Int.
unconstrained benchmark functions reveal that the proposed Journal of Bio-Inspired Computation, vol. 3, no. 5, pp. 267–274,
version of BA is better than the standard one. 2011.
[21] K. Khan, A. Sahai, “A comparison of BA, GA, PSO, BP and LM for
The investigation of the performance of proposed training feed forward neural networks in e-learning context”, Int.
algorithm (MBA) on discrete, constrained engineering Journal of Intelligent Systems and Applications, vol. 4, no. 7, 2012,
problems and system identification problems is planned in pp. 23–29. [Online]. Available: http://dx.doi.org/10.5815/ijisa.2
the future. 012.07.03
[22] A. H. Gandomi, X. S. Yang, A. H. Alavi, T. Siamak, “Bat algorithm
REFERENCES for constrained optimization tasks”, Neural Computing and
Applications, vol. 22, no. 6, pp. 1239–1255, 2013. [Online].
[1] C. F. Juang, “A hybrid of genetic algorithm and particle swarm Available: http://dx.doi.org/10.1007/s00521-012-1028-9
optimization for recurrent network design”, IEEE Trans. Systems, [23] G. Komarasamy, A. Wahi, “An optimized K-means clustering
Man, and Cybernetics-Part B: Cybernetics, vol. 34, no. 2, April 2004. technique using bat algorithm”, European Journal of Scientific
[2] Y. Chen, X. Huang, “An optimization method based on chaotic Research, vol. 84, no. 2, pp. 26–273, 2012.
immune evolutionary algorithm advances in natural computation”, [24] I. Fister, D. Fister, X.-S. Yang, “A hybrid bat algorithm”,
Springer Berlin Heidelberg, vol. 3611, 2005, pp. 890–894. Elektrotehniski vestnik, vol. 80, no. 1–2, pp. 1–7, 2013.
[3] X. S. Yang, “Harmony search as a metaheuristic algorithm”, Music- [25] S. Yilmaz, E. U. Kucuksille, “Improved bat algorithm (IBA) on
Inspired Harmony Search Algorithm: Theory and Applications, continuous optimization problems”, Lecture Notes on Software
Studies in Computational Intelligence, Springer Berlin, vol. 191, Engineering, vol. 1, no. 3, pp. 279–283, 2013. [Online]. Available:
2009, pp. 1–14. [Online]. Available: http://dx.doi.org/10.1007/978-3- http://dx.doi.org/10.7763/LNSE.2013.V1.61
642-00185-7_1 [26] G. Wang, L. Guo, “A novel hybrid bat algorithm with harmony search
[4] X. S. Yang, Nature-inspired Metaheuristic Algorithms. Luniver Press, for global numerical optimization”, Journal of Applied Mathematics,
2008. vol. 2013, no. 1, pp. 1–21, 2013. [Online]. Available:
[5] C. Blum, A. Roli, “Metaheuristics in combinatorial optimization: http://dx.doi.org/10.1155/2013/696491
Overview and conceptual comparison”, ACM Comput. Surv., vol. 35, [27] S. Biswal, A. K. Barisal, A. Behera, T. Prakash, “Optimal power
2003, pp. 268–308. [Online]. Available: http://dx.doi.org/10.1145/ dispatch using BAT algorithm”, in Proc. Int. Conf. on Energy
937503.937505 Efficient Technologies for Sustainability (ICEETS 2013), Nagercoil,
[6] B. Atalas, S. Akyol, “The Current Swarm Intelligence Optimization 2013, pp. 1018–1023.
Algorithms”, Nevsehir University Graduate School of Natural and [28] M. K. Marichelvam, T. Prabaharan, X. S. Yang, M. Geetha, “Solving
Applied Sciences Journal, vol. 1, pp. 36–50, 2012. hybrid flow shop scheduling problems using bat algorithm”, Int.
[7] B. Alatas, “Development of chaotic maps embedded particle swarm Journal of Logistics Economics and Globalisation, vol. 5, no. 1, pp.
optimizatıon algorithms”, Ph.D. dissertation, Firat University 15–29, 2013. [Online]. Available: http://dx.doi.org/10.1504/
Graduate School of Natural and Applied Sciences, 2007. IJLEG.2013.054428
[8] D. E. Goldberg, Genetic algorithms in search, optimization and [29] X. S. Yang, “Test problems in optimization”, Engineering
machine learning. Kluwer Academic Publishers, 1989. Optimization: An Introduction with Metaheuristic Applications, John
[9] R. Storn, K. Price, “Differential evolution - a simple and efficient Wiley & Sons, 2010. [Online]. Available: http://dx.doi.org/10.1002/
adaptive scheme for global optimization over continuous spaces”, 9780470640425
Technical Report, 1995. [30] K. Tang, X. Li, P. N. Suganthan, Z. Yang, T. Weise, “Benchmark
[10] E. Rashedi, H. Nezamabadi-pour, S. Saryazdi, “GSA: a gravitational Functions”, in Special Session and Competition on Large-Scale
search algorithm”, Information Sciences, vol. 179, 2009, pp. 2232– Global Optimization. Nature Inspired Computation and Applications
2248. [Online]. Available: http://dx.doi.org/10.1016/j.ins.2009.03.004 Laboratory, CEC’2010, 2010, pp. 1–23.
78