Keywords

1 Introduction

In order to solve complex computational problems in engineering optimization, computational science and other fields, many heuristic optimization algorithms [1,2,3] are proposed. According to the theory of the no free lunch theorem (NFL), it is shown that all optimization algorithms can not deal with all optimization problems [4, 5]. Therefore, researchers continue to propose various new heuristic intelligent algorithms [6,7,8].

In 2010, Yang proposed BAT algorithm based on bat echolocation behavior, which has good parallelism and robustness [9, 10]. Bat algorithm has excellent performance, but there are still some problems such as falling into local optimum and low accuracy. A new bat algorithm with adaptive speed strategy is proposed in this paper. The strategy can effectively prevent the algorithm from falling into local optimum and improve the searchability. The CEC2013 test function [11] is used to test the proposed algorithm, which shows that the proposed algorithm is more efficient than the other three comparison algorithms.

Other parts of this paper: Part 2 outlines the basic bat algorithm. Part 3 introduces the adaptive speed strategy bat optimization algorithm proposed in this paper. Section 4 gives the experimental conclusion. The last is the conclusion of the paper.

2 Standard Bat Algorithm

In order to make use of the bionic principle of bat echolocation, three idealized rules need to be assumed in the basic bat algorithm [10]:

  1. (1)

    All bats use echolocation to sense distances and distinguish between prey and background obstacles.

  2. (2)

    Each bat flies randomly at position \(\overrightarrow {{x_{i} }} (t)\) at velocity \(\overrightarrow {{v_{i} }} (t)\), searching for prey at fixed frequency \(f_{i}\), loudness \(A_{i} (t)\), and rate of emission pulse \(r_{i} (t)\).

  3. (3)

    The loudness changes from the maximum to the fixed minimum as the number of searches increases (from \(A_{\hbox{max} }\) to \(A_{\hbox{min} }\)).

For bat i at time t + 1, the velocity \(\overrightarrow {{v_{i} }} (t{ + }1)\) and position \(\overrightarrow {{x_{i} }} (t + 1)\) show as follow:

$$\overrightarrow {{x_{i} }} (t{ + }1) = \overrightarrow {{x_{i} }} (t) + \overrightarrow {{v_{i} }} (t + 1)$$
(1)
$$\overrightarrow {{v_{i} }} (t{ + }1) = \overrightarrow {{v_{i} }} (t) + (\overrightarrow {{x_{i} }} (t) - \overrightarrow {{p_{i} }} (t))*f_{i}$$
(2)
$$f_{i} = f_{\hbox{min} } + (f_{\hbox{max} } - f_{\hbox{min} } )*\beta$$
(3)

where \(\overrightarrow {P} (t)\) is the global optimum position of time t, and \(\beta \in [0,1]\) is a random following the normal distribution.

The new location update formula of bat algorithm is as follows:

$$\overrightarrow {{x_{i} }} (t) = \overrightarrow {{p_{i} }} (t) + \varepsilon A_{\text{mean}} (t)$$
(4)

where \(\varepsilon \in [ - 1,1]\) is a random number and \(A_{\text{mean}} (t)\) is equal to the average of all loudness at time t.

With the bats approach their target, the loudness \(A\) decreases and \(r\) increases. They are following the formulas:

$$A_{i} (t + 1) = \alpha A_{i} (t)$$
(5)
$$r_{i} (t + 1) = r_{i} (0)[1 - \exp ( - \gamma t)]$$
(6)

where \(r_{i} (0)\) is the initial value of pulse rate, \(\gamma\) and \(\alpha\) are constant.

3 Bat Algorithm with Adaptive Speed

Bat individual will inherit the previous generation of speed, and the best individual flight departing. When the algorithm progresses to the later stage, most bat individuals fall into local optimization, and the bat’s speed cannot make it escape local optimization. To solve this problem, we introduced the concept of average speed.

$$\overline{{v^{t} }} = \sum\limits_{i = 1}^{n} {v_{i}^{t} }$$
(7)

which \(\overline{{v^{t} }}\) represents the first generation of the average speed of all the bat, \(n = 100\) as the number of the population, the standard algorithm bat sphere function as an example of the change in average speed will be shown in Fig. 1.

Fig. 1.
figure 1

Bat average speed change map algorithm

In view of this shortcoming, we propose an adaptive algorithm bat speed. This particular improvement is based on the fitness of each individual (optimal distance from the closer adaptation higher the value, the lower the farther away) its speed plus a weight in accordance with the right to a strategy. Obviously, if the individual is closer to the optimal solution than others, its adaptation value is higher. We should slow down the individual rapidly, so that the individual converges to the optimal solution. In this case, we give a smaller weight value. On the contrary, if the individual’s adaptation value is very low, it means that the individual is far from the optimal solution. We need to give it a larger weight value.

According to the above analysis, weight calculation method is designed as follows:

$$w_{i}^{t} = \frac{{e_{i}^{{{\text{score}}_{i}^{t} }} }}{{e_{i}^{{{\text{score}}1}} + e_{i}^{{{\text{score}}2}} + \cdots + e_{i}^{{{\text{score}}n}} }}$$
(8)

where the symbol \(e_{i}^{{{\text{score}}_{i} (t)}}\) is defined as:

$${\text{score}}_{i} (t) = \left\{ {\begin{array}{*{20}l} 1, & \quad {\text{if }}(f_{\text{worst}} = f_{\text{best}} ) \\ \frac{{f_{\text{worst}} - f_{i} }}{{f_{\text{worst}} - f_{\text{best}} }},& \quad \quad {\text{otherwise}} \\ \end{array} } \right.$$
(9)

4 Simulation Results

To test the performance of ASBA, the CEC2013 test functions [11] are employed, witch is a set of 28 shifted and rotated benchmark problems. In the laboratory, the parameter \(\alpha\) = 0.95, and the parameter \(\gamma\) = 0.9. We set the population size of all algorithms equal to 100 and the dimensionality equal to 30. The algorithms run 30 times independently in the test. The stop condition for all algorithms is that the number of functions evaluated reaches a maximum of 50 dimensions.

Comparison results of the mean error at CEC2013 test functions with BA are presented in Table 1. In this table, w means that ASBA better than BA on w functions, l mean ASBA worse on l functions, t means that they are tied. From the results, ASBA performs better than BA on 16 functions, while BA outperforms ASBA on 12 functions.

Table 1. Comparison of the CEC 2013 benchmark problems

Table 2 presents the Friedman test results, as we can seen, the ranks donate that the performance of ASBA is better than BA. Table 3 is the p-value achieved by Wilcoxon test; this can show that our proposal has better searchability.

Table 2. Friedman test
Table 3. Wilcoxon test

5 Conclusion

This paper proposed an improved bat algorithm with adaptive speed strategy, which can simulate the bat in the process of search based on adaptive speed adjustment. This approach can improve the optimization efficiency and accuracy by providing a balance between exploitation and exploration. Experimental results on CEC2013 test benchmarks show that our proposal has better global searchability and a faster convergence speed, and can effectively overcome the problem convergence. Furthermore, research topics include some applications.