Computational Intelligence and Neuroscience

Computational Intelligence and Neuroscience / 2013 / Article

Research Article | Open Access

Volume 2013 |Article ID 453812 | 13 pages |

A Novel Bat Algorithm Based on Differential Operator and Lévy Flights Trajectory

Academic Editor: Christian W. Dawson
Received16 Aug 2012
Accepted01 Feb 2013
Published17 Mar 2013


Aiming at the phenomenon of slow convergence rate and low accuracy of bat algorithm, a novel bat algorithm based on differential operator and Lévy flights trajectory is proposed. In this paper, a differential operator is introduced to accelerate the convergence speed of proposed algorithm, which is similar to mutation strategy “DE/best/2” in differential algorithm. Lévy flights trajectory can ensure the diversity of the population against premature convergence and make the algorithm effectively jump out of local minima. 14 typical benchmark functions and an instance of nonlinear equations are tested; the simulation results not only show that the proposed algorithm is feasible and effective, but also demonstrate that this proposed algorithm has superior approximation capabilities in high-dimensional space.

1. Introduction

Nowadays, since the evolutionary algorithm can solve some problem that the traditional optimization algorithm cannot do easy, the evolutionary algorithms are widely applied in different fields, such as the management science, engineering optimization, scientific computing. More and more modern metaheuristic algorithms inspired by nature or social phenomenon are emerging and they become increasingly popular, for example, particles swarms optimization (PSO) [1], firefly algorithm (FA) [2, 3], artificial chemical reaction optimization algorithm (ACROA) [4], glowworm swarms optimization (GSO) [5], invasive weed optimization (IWO) [6], differential evolution (DE) [79], bat algorithm (BA) [2, 10], and so on [1115]. Some researchers have proposed their hybrid versions by combining two or more algorithms.

Bat Algorithm (BA) is a novel metaheuristic optimization algorithm based on the echolocation behaviour of microbats, which was proposed by Yang in 2010 [2, 10]. This algorithm gradually aroused people’s close attention, and which is increasingly applied to different areas. Tsai et al. (2011) proposed an improved EBA to solve numerical optimization problems [16]. A multiobjective bat algorithm (MOBA) is proposed by Yang (2011) [17], which is first validated against a subset of test functions, and then applied to solve multiobjective design problems such as welded beam design. In 2012, Bora et al. applied BA to solve the Brushless DC Wheel Motor Problem [18]. Although the basic BA has remarkable property compared against several traditional optimization methods, the phenomenon of slow convergence rate and low accuracy still exists. Therefore, in this paper, we put forward an improved bat algorithm based on differential operator and Lévy flights trajectory (DLBA), the purpose is to improve the convergence rate and precision of bat algorithm. At the end of this paper, we tested 14 typical benchmark functions and applied them to solve nonlinear equations; the simulation results not only showed that the proposed algorithm is feasible and effective, which is more robust, but also demonstrated the superior approximation capabilities in high-dimensional space.

The rest of this study is organized as follows. In Section 2, the basic bat algorithm and Lévy flights were described. In Section 3, we gave the design framework of DLBA. The implementation and comparison of improved algorithm are presented in Section 4. Finally, we concluded this paper in Section 5.

2. Bat Algorithm, Lévy Flights, and Nonlinear Equations

2.1. Behaviour of Microbats

Most of microbats have advanced capability of echolocation. These bats can emit a very loud and short sound pulse; the echo that reflects back from the surrounding objects is received by their extraordinary big auricle. Then, this feedback information of echo is analyzed in their subtle brain. They not only can discriminate direction for their own flight pathway according to the echo, but also can distinguish different insects and obstacles to hunt prey and avoid a collision effectively in the day or night.

2.2. Bat Algorithm (see [10])

First of all, let us briefly review the basics of the BA for single-objective optimization. In the basic BA developed by Yang in 2010, in order to propose the bat algorithm inspired by the echolocation characteristics of microbats, the following approximate or idealised rules were used.

IR1. All bats use echolocation to sense distance, and they also “know” the difference between food/prey and background barriers in some magical way.

IR2. Bats fly randomly with velocity at position with a fixed frequency , varying wavelength , and loudness to search for prey. They can automatically adjust the wavelength (or frequency) of their emitted pulses and adjust the rate of pulse emission , depending on the proximity of their target.

IR3. Although the loudness can vary in many ways, we assume that the loudness varies from a large (positive) to a minimum constant value .

In addition, for simplicity, they also use the following approximations: in general, the frequency in a range corresponds to a range of wavelengths . In fact, they just vary in the frequency while fixed in the wavelength and assume in their implementation. This is because and are related due to the fact that is constant.

In simulations, they use virtual bats naturally to define the updated rules of their positions and velocities in a D-dimensional search space. The new solutions and velocities at time step are given by where is a random vector drawn from a uniform distribution. Here, is the current global best location (solution) which is located after comparing all the solutions among all the bats.

For the local search part, once a solution is selected among the current best solutions, a new solution for each bat is generated locally using random walk: where is a random number, while is the average loudness of all the bats at this time step.

Furthermore, the loudness and the rate of pulse emission have to be updated accordingly as the iterations proceed. These formulas are where and are constants.

Based on these approximations and idealization, the basic steps of the bat algorithm can be summarized in the Pseudocode 1.

Objective function
Initialize the bat population and
Define pulse frequency at initialize pulse rates and the loudness
While ( Max number of iterations)
 Generate new solutions by adjusting frequency,
 and updating velocities and locations/solutions (1)
 if (rand )
  Select a solution among the best solutions
  Generate a local solution around the selected best solution
 end if
 Generate a new solution by flying randomly
 if (rand & )
  Accept the new solutions
  Increase and reduce
 end if
 Rank the bats and find the current best
end while
Postprocess results and visualization

2.3. Lévy Flights

Lévy flights are Markov processes, which differ from regular Brownian motion, whose individual jumps have lengths that are distributed with the probability density function (PDF) decaying at large as with . Due to the divergence of their variance, , extremely long jumps may occur, and typical trajectories are self-similar, on all scales showing clusters of shorter jumps interspersed by long excursions [19]. Lévy flight has the following properties [20]: (1)Stability: distribution of the sum of independent identically distributed stable random variables equal to distribution of each variable.(2)Power law asymptotics (“heavy tails”).(3)Generalized Central Limit Theorem: The central limit theorem states that the sum of a number of independent and identically distributed (i.i.d.) random variables with finite variances will tend to a normal distribution as the number of variables grows.(4)Which has an infinite variance with an infinite mean value.

Due to the these remarkable properties of stable distributions, it is now believed that the Lévy statistics provide a framework for the description of many natural phenomena in physical, chemical, biological, and economical systems from a general common point of view.

Furthermore, various studies have shown that the flight behaviour of many animals and insects has demonstrated the typical characteristics of Lévy lights. A recent study by Reynolds and Frye shows that fruit flies, or Drosophila melanogaster, explore their landscape using a series of straight flight paths punctuated by a sudden 90° turn, leading to a Lévy flight-style intermittent scale-free search pattern [21]. Studies on human behaviour such as the Ju/’hoansi hunter-gatherer foraging patterns also show the typical feature of Lévy flights [22]. The conclusion that light is related to Lévy flights is proposed by Barthelemy et al. (2008) [23]. The study by Mercadier et al. shows that the Lévy flights of photons in hot atomic vapours (2009) [24]. Subsequently, such behaviour has been applied to optimization and optimal search, and preliminary results show its promising capability.

2.4. Description of the Nonlinear Equations (see [25])

The general form of nonlinear equations with real variables is described as follows: where , .

In solving nonlinear equations process for DLBA, the fitness function can be constructed by So, the solving of nonlinear equations can be translated into an optimization problem in domain : Consequently, the optimal value of (7) is exactly the solution of (5).


Inspired by Yang’s method, we propose an improved bat algorithm based on differential operator and Lévy-flights trajectory (DLBA) based on the basic structure of BA and re-estimate the characters used in the original BA. In DLBA, not only the movement of the bat is quite different from the original BA, but also the local search process is different.

In DLBA, the frequency fluctuates up and down, which can change self-adaptively, and the differential operator is introduced, which is similar to the mutation operation of DE, the frequency is similar to the scale factor of DE/best/2. So, the frequency updated formulae of a bat are defined as follows: where is a random vector drawn from a uniform distribution, , is a fixed parameter. In DLBA, the positionof each bat individual are updated with (10), which is different from original BA. This can preferably incorporate the echolocation characteristics of microbats: where is the current global best location (solution) which is located after comparing all the solutions among all the bats in generation, is the bat individual in the bat swarm, and this can be achieved by randomization.

In addition, Lévy flight haves the prominent properties increase the diversity of population, sequentially, which can make the algorithm effectively jump out of the local optimum. So, we let these bats perform the Lévy flights with (11) before the position updating: where is a random parameter drawn from a uniform distribution, sign means entrywise multiplications, , and random step length obeys Lévy distribution:

On the other hand, each bat should have different values of loudness and pulse emission rate, while the rate of pulse emission is relatively low and the loudness is relatively high. During the search process, the loudness usually decreases, while the rate of pulse emission increases. Bats’ position variation is influenced by the pulse emission rate and loudness as well. Firstly, pulse emission rate causes fluctuation of position using (2); sequentially, more and more new position can be explored. Secondly, loudness is designed to strengthen local search and to guide bats find better solutions: where is a random parameter, and is the current global best location (solution) in whole bats swarm. While is the average pulse emission rate of all the bats at this generation.

The new rate of pulse emission and loudness at time step are given by where is time varying; their loudness and emission rates will be updated only if the best solution of the current generation is better than the best solution of last generation, which means that these bats are moving towards the optimal solution. The pseudocode of DLBA can be depicted as in Pseudocode 2.

Input: Objective function ; algorithm’s parameters ;
For To do
  Initialize , , ;
  Calculating the initial fitness;
End For
While ( )
  Update position use formula (8)~(12);
  Evaluate fitness to find ;
  For To do
   If (rand )
    Generate a around the selected best solution use formula (2);
   End If
  End For
  Evaluate fitness ;
  For To do
   If rand )
    Generate a around the selected best solution use formula (13);
   End If
  End For
  Evaluate fitness ;
  If ( )
    Update , use formula (3), (14);
  End If
   = ;
 End While
Output: ;

4. The Simulation and Analysis

4.1. Parametric Studies

The proposed DLBA is implemented in MATLAB, simulation platform: CPU Intel Xeon E5405@2.00 GHz; OS: Microsoft Windows Server 2003 Enterprise Edition SP2; RAM: 1 GHz; Matlab Version: R2009a. The parameter setting for BA and DLBA are listed in Table 1, the parameters of BA are recommended in the original article.


BA400100 0.90.9
DLBA4001 0.95000

The stopping criterion can be defined in many ways. We adopt two terminated criteria: we can use a given tolerance () for a test function that have certain minimum value in theory; on the contrary, each simulation run terminates when a certain number of function evaluations (FEs) have been reached. In this paper, FEs could be obtained by population size multiplied by the number of iteration. In our experiment, FEs = 24000, BA (= 300*40*2); DLBA (= 200*40*3).

4.2. Benchmark Test Function

In order to validate the validity of DLBA, we selected the 14 benchmark functions to experimentize. The benchmark set include unimodal, multimodal, high-dimensional, and low-dimensional unconstrained optimization benchmark functions, where are unimodal functions, are multimodal functions; have certain theoretical minimum and have uncertain theoretical minimum.

  : sphere function (the first function of De Jong’s test set), Here, is dimensionality; this function has a global minimum at .

: Schwegel’s problem 2.22, whose global minimum is obviously at .

: Rosenbrock function, which has a global minimum at .

: Eggcrate function, This 2-dimensional test function obviously gets the global minimum at (0, 0).

: Ackley’s function, This function has a global minimum at , which is a multimodal function.

: Griewangk’s function, Its global minimum equal is obtainable for , the number of local minima for arbitrary is unknown, but in the two-dimensional case there are some 500 local minima.

: Salomon’s function, which has a global minimum at , and is a multimodal function.

: Rastrigin’s function. whose global minimum is at ; for , there are about 50 local minimizers arranged in a lattice-like configuration.

: Zakharov’s function, whose global minimum is at ; it is a multimodal function as well.

: Easom’s function, whose global minimum is at ; it has many local minima.

: Schwegel’s function, whose global minimum is occuring at .

: Shubert’s function, The number of local minima for this problem is not known but for , the function has 760 local minima, 18 of which are global with .

: Xin-She Yang’s function, which has multiple global minima, for example, for , it has 4 equal minima at (), (0.5-0.5), ), and (−0.5, −0.5).

: “Drop Wave” function, This two-variable function is a multimodal test function, whose global minimum is occurs at .

4.3. Comparison of Experimental Results

The 2D landscape of Schwegel’s function is shown in Figure 1, and this global minimum can be found after about 720 FEs for 40 bats after 6 iterations as shown in Figures 2, 3, and 4.

We adopt different terminated criteria aiming at different benchmark function, we perform 100 times independently for each test function, and the record is given in Tables 2 and 3.

TCBF MethodFitnessIteration

Tol = , itermax = 200 ( )DLBA 10 17.6 26
BA 56.81732462 130.61959271 223.82694528 37.22960351 200 200 200
( )DLBA 21 29.4 37
BA 22.77136624 93.35062167 2733.46090499 269.41410301 200 200 200
( )DLBA 5.66716240 7.39029403 8.28857171 0.37001430 200 200 200
BA 82.24908050 294.95948479 640.76052284 109.67161818 200 200 200
( )DLBA 6 10 20
BA 0.20705750 1.00771980 0.23116047 200 200 200
( )DLBA 16 25.6 39
BA 1.15883977 3.02092450 5.86431360 0.69052427 200 200 200
( )DLBA 11 18.4 56
BA 0.06234957 8.42851961 29.90707979 6.12812390 200 200 200
( )DLBA 18 46 114
BA 0.09987344 0.15318115 0.30215065 0.04923496 200 200 200
( )DLBA 15 33 87
BA 7.24547772 17.11077150 25.90638177 4.37190073 200 200 200
( )DLBA 10 15.1 23
BA 0.11106843 1.75623424 8.48211975 1.41343722 200 200 200


FEs ( )DLBA−1−1−1
BA−0.99964845−0.98245546−0.90221232 0.01759602
( )DLBA−418.98288727−415.83523725−300.54455266 15.53948263
BA−418.98287874−406.98044144−328.10751671 22.54615132
( )DLBA−186.73090883−186.73090883−186.73090883
BA−186.67541533−184.01677767−174.95599301 2.26333511
( )DLBA−0.60653066−0.60653066−0.60653066
( )DLBA−1−1−1 0
BA−0.93624514−0.80454167−0.56977584 0.10270830

From Table 2, we can see that the DLBA performs much better than the basic bat algorithm, which converges much faster than BA under the fixed accuracy . In our experiment, for the function , we proposed that an algorithm only costs 6 generations under the best situation, and the average generations is 10. Furthermore, for the first group of test functions , the DLBA averagely expend 43.9 generations when each function attains its terminated criteria; however, the BA needs 200 generations invariably, and the convergence speed of DLBA advances 298.57% times. On other hand, the DLBA which obtained the accuracy of the solution is much superior to BA, which is more approximate to the theoretical value. In a word, it demonstrated that DLBA has fast convergence rate and high precision of the solutions.

In Table 3, the five functions () independently runs 100 times under the 24000 Fes; we can clearly see the precision of DLBA is obviously superior to the bat algorithm. Some benchmark functions can easily attain the theoretical optimal value. In addition, the standard deviation of DLBA is relatively low. It shows that DLBA has superior approximation ability.

Observe Tables 2 and 3, no matter high-dimensional or low-dimensional, we can find that DLBA can quickly converge to the global minima. Furthermore, Figures 5, 6, 7, 8, and 9 show the convergence curves for some of the functions from a particular run of DLBA and BA, which end at 200 generations. The adaptive scheme generally converges faster than the basic scheme. Here, we select (D = 20), (D = 2), (D = 5), (D = 2), and (D = 2).

DLBA not only has superior approximation ability in low-dimensional space, but also has excellent global search ability in high-dimensional situation. Table 4 is the experimental result that DLBA performs 50 times independently under the high-dimensional situation. As shown in Table 4, we can be conscious that the DLBA is effective under the multidimensional condition, and acquired solution has higher accuracy, even approximate the theoretical value.


( )DLBA 0 0 0 0
BA 2587.38759264 2811.40649000 2966.56723398 93.96861133
BA 7503.39306546 8256.61302714 11506.79192998 613.37556609
( )DLBA 0 0 0 0
BA 4468.59039467 4723.44624200 5008.57109760 131.18818777
( )DLBA−1−1−1 0
BA 18463.48950157 19752.26686813 21239.23111285 567.27878361

Figures 10, 11, 12, 13, and 14 are the distribution map of optimal fitness; that is the selected functions independently perform 50 times under the multidimensional situation. Figure 13 show that two “straight line”, we can see in the figure that DLBA reaches the global optimum(−1), however, BA fluctuates around 0. In order to display the fact of fluctuation, we magnify the two “straight line”, and the amplifying effect are depicted in Figures 15 and 16. According to the experimental results which are obtained from selected test functions, DLBA presents higher precision than the original BA on minimizing the outcome as the optimization goal.

4.4. An Application for Solving Nonlinear Equations

Interval Arithmetic Benchmark (IAB). We consider one benchmark problem proposed from interval arithmetic, the benchmark consists of the following system of [25]:

Some of the solutions obtained as well as the function values (which represent the values of the system’s equations obtained by replacing the variable values) are presented in Table 5. From Table 5, we can obviously observe that the function value of each equation solved by DLBA is superior to which solved by EA [25], depending on the statistics of the 40 function values, the precision of function values is enhanced 5.199820E + 06 times by DLBA. The convergence curve of DLBA is depicted in Figure 17. Figure 17 show that DLBA has fast convergence rate for solving nonlinear equations. The achieved optimal fitness (the sum of function value with absolute value) in 50 times independent run is depicted in Figure 18. In order to reflect the precision of fitness, we magnify Figure 18, these optimal fitness that less than or equal to 0.001 are plotted in Figure 19. We can found that there are 32 times optimal fitness is less than 0.001.

SolutionsVariables valuesFunctions valuesVariables valuesFunctions values

Sol. 1

Sol. 2