Modified Bat Algorithm

Heuristic optimization algorithms which are inspired by nature have become very popular for solving real world problems recently. The use of these algorithms increases day by day in the literature because of their flexible structures and non-containing confusing mathematical terms. One of these algorithms is Bat Algorithm (BA). BA is a heuristic algorithm based on echolocation characteristic of bats and developed by the mimics of bats’ foraging behaviour. In this study exploration mechanism of the algorithm is improved by modifying the equation of pulse emission rate and loudness of bats. The performance of Modified Bat Algorithm (MBA) is verified by 15 benchmark functions and the results were exhibited as comparative. The results of MBA are superior in terms of solution quality on optimization problems compared to BA. DOI: http://dx.doi.org/10.5755/j01.eee.20.2.4762


I. INTRODUCTION
Over the last few decades evolutionary optimization algorithms has been utilized in large numbers of field.The main goal of the works is to perform faster and more successful optimization process.In contrast to traditional computational systems, evolutionary computation provides a more robust and efficient approach for solving complex real-world problems [1].Generally, evolutionary optimization algorithms which simulate the evolution phenomenon of biological colony can be used to solve some complicated optimization problems.According to the operating mechanism of evolutionary algorithms, they are based on the existing individuals of the previous generation and searches at random without guidance [2].The optimization process of real world problems by evolutionary algorithm is quite similar to the simplified animal social behaviors.
Heuristic Algorithms mostly inspired by social behaviour of animals do not guarantee optimal solution due to their random-based structure.However these algorithms are methods which generally have a tendency to find good solutions.The word "Heuristic" refers to "solution by trial and error method" and the word "meta" refers to "high level".Hence metaheuristic algorithms solve optimization problems via high level techniques [3]- [5].Heuristic Manuscript received July 10, 2013; accepted November 29, 2013.methods are divided into six different groups as biologicalbased, physical-based, social-based, swarm-based, musicalbased and chemical-based [6], [7].Genetic Algorithm [8] and Differential Evolution Algorithm [9] are grouped as biology-based algorithm; Gravitational Search Algorithm [10] and Electromagnetism Algorithm [11] are grouped as physics-based algorithm; Tabu Search [12] is grouped as social-based algorithm; Particle Swarm Optimization [13], Ant Colony Optimization [14] are grouped as swarm-based algorithm; Harmony Search Algorithm [3] is grouped as music-based algorithm; Artificial Chemical Reaction Algorithm [15] is grouped as chemical-based algorithm.
There are two crucial components in modern metaheuristics: Exploration and exploitation [3].Exploration is investigation capability of obscure various spaces so as to detect global optimum point, while exploitation refers to effort to find optimum point by using previous best solutions' knowledge.A good response of an algorithm depends on well-balanced of these components [16], [17].In the case of too little exploration but intensive exploitation, algorithm can get trapped into local optimum points.On the other hand too much exploration but scarce exploitation could cause the algorithm to converges slowly and decreases overall search performance [3], [16].Some of the studies indicate that it's advantageous to adopt "explore first, exploit later" approach to obtain necessary data about search space before exploitation is applied [18].
Bats have the mechanism called echolocation which guides their hunting strategies.The echolocation capability of microbats is fascinating, as these bats can find their prey and discriminate different types of insects even in complete darkness.BA is an algorithm inspired by echolocation characteristic of bats proposed by Yang [19].
In this proposed study, it is aimed that algorithm explores the search space more efficiently by improving exploration component of BA.Each bat which searches the space has one pulse emission rate (r) and loudness (A) in standard version of BA.In MBA loudness and pulse rate, which acts as a balance, are equalized to number of problem dimension.Thus it's provided that bats search the space effectively.In order to examine performance of the proposed algorithm (MBA), it is applied on unimodal, multimodal and shifted benchmark functions with different dimensions and the results are compared with BA.
The rest of this paper is organized as follows.Section II summarizes BA.The studies of BA in literature are presented in Section III.The MBA is expressed in Section IV.Section V contains benchmark functions and results.Finally conclusion is presented in Section VI.

II. BAT ALGORITHM
BA, proposed by Yang [19], is a meta-heuristic algorithm inspired by fascinating abilities of bats such as finding their prey and discriminating different types of insects even at complete darkness.The advanced echolocation capability of bats makes them fascinating.Such abilities inspired to researchers on many fields.Bats use typical sonar called as echolocation to detect prey and to avoid obstacles.Bats, in particular micro-bats, are able to recognize positions of the objects by spreading high and short audio signals and by collision and reflection of these spread signals [20].In BA, the echolocation characteristics are idealized within the framework of the following rules by benefitting such features of bats [19]: 1.
All bats use echolocation to sense distance, and they also 'know' the difference between food/prey and background barriers in some magical way; 2.
Bats fly randomly with velocity v i at position x i with a frequency f min , varying wavelength and loudness A 0 to search for prey.They can automatically adjust the wavelength (or frequency) of their emitted pulses and adjust the rate of pulse emission r [0,1], depending on the proximity of their target; 3.
Define pulse frequency f i at x i 4.
Initialize pulse rate r i and loudness A i
Generate new solutions by adjusting frequency, and updating velocities and location/solutions.7.
Select a solution among the best solutions

B. Initialization of Bat Population
Since the search space in the problem is assumed as a region which includes food/prey for bats, the bats randomly spread to the search space at first iteration since they have no idea where the preys are in space at the beginning.The fitness value of each bat defines the quality of food source where it locates.Initial population is randomly generated from real-valued vectors with d dimension and n number, by taking into account lower and upper boundaries.(2nd line in Algorithm 1) where i = 1,2,…n, j = 1,2,….d,xminj and xmaxj are lower and upper boundaries for dimension j respectively.

C. Generation of Frequency, Velocity and New Solutions
The pulse frequency, which emits by bats, ranges between upper and lower bounds.As seen in 3rd line in Algorithm 1, pulse frequency is randomly assigned to different values which homogeneously dispersed in frequency band [fmin,fmax].Because of f frequency controls pace and range of movement, the update process of bats' position/solution and velocity is similar to Particle Swarm Optimization (PSO) [19].For the future iterations, frequency and consequently velocity and position of a bat are evaluated as follows: where β ϵ [0,1] indicates randomly generated number, x* represents solution of bat which has best fitness value obtained after comparison among all the n bats so far.
In order to increase the diversity of possible solutions, for a bat which meets the requirement in 7th line in Algorithm 1, once one of the existing solution among the best solutions is selected thus new candidate solution are generated by random walk where Ᾱ t , is average loudness of all bats, ɛ ϵ [0,1] is random number and represents direction and intensity of randomwalk.

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).These factors will be updated when only new solutions are improved, namely bats approach their prey/targets.Loudness Ai and pulse emission rate ri are updated by the following equations as iteration proceeds:  continuous problems [24], Yilmaz and Kucuksille proposed some modifications on BA for continuous problems [25], Wang and Guo hybridized BA with Harmony Search Algorithm for solving numerical problems [26], Biswal et.al used BA to find optimal solution on economic load dispatch problem [27], Marichelvam et al., proposed BA on multistage hybrid flow shop scheduling problem [28].

IV. MODIFIED BAT ALGORITHM
BA is an optimization method which includes loudness A and pulse emission rate r factors apart from some parameters of population based algorithm such as population number, search dimension, maximum cycle number.At the onward iterations of BA pulse emission rate, r decreases while loudness A increases exponentially (Fig. 1, Fig. 2).
Thus, According to pseudo code (Algorithm 1), it's low possibility that the condition (7th row) is ensured by a bat.Hereby, algorithm loses exploration capability highly at the following iterations.At the beginning of the iterations, exploitation capability is dominant while exploration capability comes to the forefront at the following iterations.However, an optimization algorithm has to drive forward exploration capability at the first iterations then exploitation capability at the later iterations so as to reach optimum point.The essence of this study is to create modified Bat Algorithm which eliminates mentioned problem.

A. Balance Problem between Exploration and Exploitation of Current Algorithm
The generation process of candidate solution around the best solution (5) increases exploitation capability; while the process of updating solution ( 2)-( 4) increases exploration capability of BA.It is understood that, only if new candidate solutions are generated by ( 2)-( 4), algorithm will be good at exploration but bad at exploitation; on the other hand only if new candidate solutions are generated around a solution which selected among current best solutions (5), algorithm will be bad at exploration but good at exploitation.Thus algorithm can easily get trapped into local minimum on multimodal functions.Actually, pulse emission rate (r) is a factor which provides a balance between exploration and 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 likely accepted at the beginning of iterations then new candidate solutions will be around a solution which selected 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 exploration will be applied at the following iterations.
Figure 1 and ( 6) demonstrate that the loudness A decreases during the iterations.Accordingly the possibility of Ai > rand (10th line in Algorithm 1) is higher at the beginning of iterations but lower at the following iterations.Although, as seen in Fig. 2, pulse emission rate r increases exploration capability, the possibility of Ai > rand weakens because of loudness A will decrease as the iteration proceeds.It means that the inclusion possibility of new candidate solutions, which generated by exploration at the end of the iterations, into the bat population is weak.If the algorithm gets trapped into local minimum at the beginning of iterations, newly generated solutions also accumulate around such local minimum.Due to this reason, the elusion possibility of algorithm from local region decreases.

B. Proposed Approach
BA has poor exploration capability therefore the convergence of obtained solution to the global optimum point is mostly impossible.Exploration mechanism of BA is improved by equalizing the loudness A and pulse emission rate r to the problem dimension.The factors A and r, which belong to each bat, exist in BA and these factors influence all dimensions of the solutions.Such factors are assigned to each dimension of the solution separately in this proposed approach.Thus each dimension of the solution can perform different capabilities (exploration and exploitation) simultaneously.In BA each solution, which provides the rand > ri (7th line in Algorithm 1), approaches around the best solution with its entire dimension, but in MBA, each dimension j of solution i, which provides the randj > rij, approaches around the dimension j of the best solution and the rest dimensions of solution i keep on seeking the search space.The equation, which generates candidate solution around the best solution ( 5) for all dimensions in BA, is adapted for each dimension in MBA as following solutions converge to the best solution as iteration proceeds.In proposed approach, search range of best solution is narrowed for dimensions y by reducing loudness A that belongs to these dimensions (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.

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 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].
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 solution quality within negligible CPU time.As a result of 30 runs, the fitness values of "Best, worst, mean, median, standard deviation" are comparatively shown in Table II-Table IV.
In order to analyse the results of performances of both algorithms, the "mean" values in Table II-Table IV are considered.The signs "+" and "." at the rightmost column named "significant" indicate that MBA is better than BA and MBA is worse than BA respectively.
The graphics (Fig. 4), which formed through a run that randomly selected among 30 runs, exhibits changes of fitness values of objective function with FE for both algorithms.
As the dimensions of problem to be optimized increase, performance of most of the optimization method weakens quickly.There are two reasons: First, solution space of 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.As it can be easily seen from the implementation results, proposed MBA provided smaller fitness values for most of the unconstrained, continuous benchmark functions which are in Table I.

VI. CONCLUSIONS
In this study, it's investigated that whether this applied modification is successful or not on unimodal, multimodal and shifted unconstrained, numeric optimization problems by modifying standard Bat Algorithm.While the factors of pulse emission rate (r) and loudness (A) influence all dimensions of solutions during the search in standard method (BA), solutions influence the dimensions of each solution differently owing to these factors, which belong to each bat, are equalized to number of problem dimension in proposed approach (MBA).Thereby these factors cause exploration on some dimensions of a solution and exploitation on rest of the dimensions of a solution.
BA and MBA are compared on 15 different benchmark test functions and results are comparatively shown in Table II-Table IV.The results obtained from the unconstrained benchmark functions reveal that proposed version of BA is better than the standard one.
The investigation of the performance of proposed algorithm (MBA) on discrete, constrained engineering problems and system identification problems is planned in the future.

1
Abstract-Heuristic optimization algorithms which are inspired by nature have become very popular for solving real world problems recently.The use of these algorithms increases day by day in the literature because of their flexible structures and non-containing confusing mathematical terms.One of these algorithms is Bat Algorithm (BA).BA is a heuristic algorithm based on echolocation characteristic of bats and developed by the mimics of bats' foraging behaviour.In this study exploration mechanism of the algorithm is improved by modifying the equation of pulse emission rate and loudness of bats.The performance of Modified Bat Algorithm (MBA) is verified by 15 benchmark functions and the results were exhibited as comparative.The results of MBA are superior in terms of solution quality on optimization problems compared to BA.Index Terms-Optimization, bat algorithm, swarm intelligence, bio-inspired computing.

9 .
Generate a local solution around the selected best solution 10. end if 11. if(rand< Ai and f(xi)< f(x*)) 12. Accept new solutions 13.Increase ri, reduce Ai 14. end if 15. Ranks the bats and find current best x* 16. end while 17.Display results.
) where α and γ are constants.ri 0 and Ai are factors which consist of random values and Ai 0 can typically be[1],[2], while ri 0 can typically be [0, 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 K-Medoid (KM) clustering algorithm as a new metaheuristic (KMBA) to fulfil the problem of initialization cluster centroid of KM [23],continuous problems[24], Yilmaz and Kucuksille proposed some modifications on BA for continuous problems[25], Wang and Guo hybridized BA with Harmony Search Algorithm for solving numerical problems[26], Biswal et.al used BA to find optimal solution on economic load dispatch problem[27], Marichelvam et al., proposed BA on multistage hybrid flow shop scheduling problem[28].

4 .
Convergence performances of MBA and BA on different functions: 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, g) f4 function with d=60, h) f13 function with d=60.So as to evaluate the performance of both algorithms, 15 different unimodal multimodal and shifted benchmark functions with 4 different dimensions are utilized.It means 60 test implementations are used.MBA is better than BA on 17 of 20 implementations of unimodal functions (85 % success rate), 22 of 24 implementations of multimodal functions (92 % success rate) and all of 16 implementations of shifted functions (100 % success rate).Totally, MBA is better than BA on 55 of 60 implementations of three types of functions (92 %).BA only produces better results than MBA on the functions f3 with d = 10, 30, 60 and f7 with d = 30, 60.

TABLE I .
BENCHMARK FUNCTIONS USED IN EXPERIMENTS.

TABLE II .
THE COMPETITIVE PERFORMANCE OF BA AND MBA ON UNIMODAL FUNCTIONS.

TABLE III .
THE COMPETITIVE PERFORMANCE OF BA AND MBA ON MULTIMODAL FUNCTIONS.

TABLE IV .
THE COMPETITIVE PERFORMANCE OF BA AND MBA ON SHIFTED FUNCTIONS.