Keywords

1 Introduction

As an important computation paradigm in artificial intelligence, swarm intelligence algorithms, which are usually based on bio-inspired computation paradigms, have received a surge of attentions recently. The promising examples include Genetic Algorithm (GA) [1], Artificial Bee Colony (ABC) [2, 3], Particle Swarm Optimization (PSO) [4], Brain Storm Optimization (BSO) [5], Ant Colony Optimization [6], etc. Such biologically inspired algorithms are frequently used to optimize many-objective problems [7]. Among them, bacterial foraging optimization (BFO) algorithm [8] was firstly proposed by Passino in 2002 [9], based on the principle of foraging behaviors of E.coli bacteria. The bacterial swarm is essentially a complex adaptive system, where the foraging behaviors show the features of self-organization and self-adaptation. These interesting patterns inspire to develop an optimization paradigm based on bacterial foraging behaviors. Up to now, many improved BFO algorithms have been proposed such as citations [10,11,12,13,14]. BFO algorithm has been applied to many real-world problems, such as harmonic signal estimation [15], PID controller design [16], optimal power flow [17] and optimal power system stabilizers design [18], load forecasting [19], stock market prediction [20], optimum economic dispatch [21].

BFO algorithm solves single-objective the problem, which is different from multi-objective algorithm [22]. When dealing with complex optimization problems, however, BFO suffers from low convergence speed and being trapped into local optima easily. According, this paradigm can’t obtain convincing results in a certain range of optimization problems, due to a chemotactic step-length is always set as a constant no matter which phase the optimization is. For this weakness, a modified adaptive bacterial foraging optimization (MABFO) algorithm is devised by incorporating a modified adaptive chemotactic strategy including adaptive step-length and adaptive tumbling in this paper.

The remainder of this paper is organized as follows: Sect. 2 provides a brief introduction to BFO. Section 3 introduces the proposed MABFO. The simulation results of evaluating MABFO on nine benchmark functions and discussions are shown in Sect. 4. The conclusion is drawn in Sect. 5.

2 Bacterial Foraging Optimization

In principle, bacteria tend to gather towards the nutrient-rich areas in the living environment. In such dynamical environment, the most adapted bacteria survive into the next generation and have a change to reproduce via natural selection, passing on their genetic traits to their offspring. At the same time, those that can’t survive are eliminated. Some bacteria may migrate to other places, leading to extinction and migration operations in real bacterial population. In the search process, bacteria in population share information via cell-to-cell communication. This foraging activity can inspire the researchers to use it as optimization process.

The classical BFO algorithm comprises four processes, namely, chemotaxis, swarming, reproduction and elimination-dispersal. The following is brief description of these four processes.

2.1 Chemotaxis

This process simulates swimming behavior and tumbling behavior behavior of E.coli bacteria via flagella. The movement ways of bacteria include two types: swimming and tumbling. Biologically, bacteria can move in the above two ways alternatively, that is, swimming in the same direction or possibly tumbling for a period of time. Suppose \( \theta^{i} (j,k,l) \) represents the position of ith bacterial after the jth chemotaxis operation, kth reproduction operation and lth extinction and migration operation. \( C\left( i \right) \) represents the swimming step-length of the ith individual in random selected direction, \( \angle \phi (j) \) represents a vector of random direction. The mathematical expression of bacterial chemotaxis phase is defined as follows:

$$ \theta^{i} (j + 1,k,l) = \theta^{i} (j,k,l) + C(i)\angle \phi (j) $$
(1)

2.2 Swarming

In this process, a cell-to-cell communication is simulated by releasing different signals. As all bacterium are on the move, they release signals to attract other bacteria swimming toward it. At the same time, each bacterium releases a rejection signal to warn other bacteria maintaining a safe distance in face of harmful substances. Bacterial foraging optimization algorithm simulates the social behavior of information sharing and cooperation among bacteria. In the search process, bacteria should not only remember their own information, but also consider the information of their companions to transmit to each other. The numerical sequence expression of the influence value of swarming can be formulated as follows:

$$ \begin{aligned} J_{cc} (\theta ,P(j,k,l)) & = \sum\limits_{i = 1}^{s} {J_{cc}^{i} (\theta ,\theta^{i} (j,k,l))} \\ \, & = \sum\limits_{i = 1}^{s} {[h_{repelent} \exp ( - w_{repelent} \sum\limits_{m = 1}^{p} {(\theta_{m} - \theta_{m}^{i} )^{2} } )]} \\ \, & { + }\sum\limits_{i = 1}^{s} {[ - d_{attract} \exp ( - w_{attract} \sum\limits_{m = 1}^{p} {(\theta_{m} - \theta_{m}^{i} )^{2} } )]} \\ \end{aligned} $$
(2)

where s is the total number of bacteria. p is the number of optimized parameters for each bacterium, that is, the position of individuals in the popultion. \( d_{attract} \), \( w_{attract} \), \( h_{repelent} \), \( w_{repelent} \) are different coefficients.

2.3 Reproduction

The evolution and development of bacteria follow principle of ‘The survival of the fittest in natural selection’. After the chemotaxis process, some selections are obviously failed, and the individuals with weak foraging ability are eliminated. The individuals with strong foraging ability maintain stability of population quantity and improve quality of population through reproduction.

Health status of each bacterium is represented by sum of adaptive values of each chemotactic step-length in its life cycle:

$$ J_{health}^{i} = \sum\limits_{j = 1}^{Nc} {J(i,j,k,l)} $$
(3)

In order to avoid the disappearance of good feasible solutions in the search process, this strategy eliminates the inferior ones and retain the excellent ones. All bacteria are ordered according to the fitness function. Half of these bacteria with poor fitness will be eliminated, and the remaining bacteria will replicate, so as to keep the number of bacterial population unchanged.

2.4 Elimination-Dispersal

E.coli bacterium may trap into local optimum. In order to improve the global search ability, the bacteria will die or migrate after \( N_{re} \) reproduction operation. With the probability of \( P_{ed} \), bacteria are dispersed to any location within the optimized region. This elimination-dispersal operation can reduce the possibility of bacteria falling into local optimal solution. The number of elimination-dispersal operation is denoted as \( N_{ed} \).

3 Modified Adaptive Bacterial Foraging Optimization

During the search process of BFO, the search region size of population at different phases is shown in Fig. 1 and Fig. 2. Figure 1 shows distribution of population at the initial phase, and Fig. 2 demonstrates distribution of population at the later period. As the algorithm runs, the search region becomes smaller. If a chemotactic step-length is too small, the convergence speed will be slow. On the contrary, it may occur oscillation phenomenon, as shown in Fig. 3, causing the bacteria to trap into local optimum easily. Therefore, it is difficult to balance exploration and exploitation with a fixed chemotactic step-length, which affects both the accuracy and speed of algorithm search. To summarize, a proper chemotactic step-length is critical to the performance of BFO.

Fig. 1.
figure 1

Population distribution-1

Fig. 2.
figure 2

Population distribution-2

Fig. 3.
figure 3

Oscillation phenomenon of solution

The size of chemotactic step-length is dynamically adjusted in the reproduction process, which ensures the bacteria moving towards the global optimum quickly at the beginning of whole search process, and converging to the global optimum accurately in the end. In this way, it could balance exploration and exploitation of BFO.

Based on the above-mentioned analysis about changing chemotactic step-length, we proposed an adaptive step-length based on dynamic search region in which at each reproduction and elimination-dispersal process of algorithm. The novel adaptive chemotactic step-length formula is shown as follows:

$$ \left\{ {\begin{array}{*{20}l} {C^{i} (k,l) = \lambda *R_{f}^{{\frac{{T_{i} }}{{T_{\hbox{max} } }}}} } \\ {R_{f} = \frac{R(k,l)}{R(1,1)}} \\ {R(k,l) = \frac{1}{n}*\sum\limits_{i = 1}^{n} {|x_{i} - x_{best} |} } \\ \end{array} } \right. $$
(4)

where \( \lambda \) is a constant controlling the step-leng that the beginning of whole search process. \( x_{i} \) is position of the ith bacterium \( x_{best} \) is the best position in current population. \( T_{i} \) is total number of motion steps of ith bacterium in current reproduction phase. \( T_{\hbox{max} } \) is the ideally maximal number of motion steps in a reproduction phase. If \( T_{i} \) is larger, the area ith bacterium searches is more likely to get the optimal value. Thus, a large value \( C^{i} \) is needed to increase ability of exploitation. On the contrary, the value of \( C^{i} \) for ith bacterium is less than other bacteria. This strategy is inspired by non-uniform mutation [23]. This means that step-length of each bacterium in population may be different at the same time, which greatly increases the local search ability of population.

Moreover, MABFO also introduced a mechanism that new position of each bacterium is calculated according to Eq. (5), which makes all bacteria moving towards the global optimum as far as possible at the beginning of the iteration and maintaining sufficient diversity. In this way, it can obtain expected convergence and diversity in the whole search process.

$$ \left\{ {\begin{array}{*{20}l} {\theta^{i} (j + 1,k,l) = \theta^{i} (j,k,l) + C(i)\angle \phi (i,j)} \\ {\angle \phi (i,j) = (1 - R_{f} )*\angle \phi_{rand} + R_{f} *D_{i} } \\ {D_{i} = x{}_{best} - x_{i} } \\ \end{array} } \right. $$
(5)

where \( \angle \phi (i,j) \) is direction of movement (swimming or tumbling) of ith bacterium in the jth chemotaxis. \( \angle \phi_{rand} \) is a random direction.

The pseudocode of MABFO is given in Table 1. pop represents the number of bacteria. \( N_{s} \) represents the maximum number of swimming, \( N_{c} \) represents the maximum number of chemotaxis, \( N_{re} \) represents the maximum number of reproduction, \( N_{ed} \) represents the maximum number of elimination and dispersal, \( P_{ed} \) represents the maximum number of elimination-dispersal. The main process include: first, the initialization procedure generates pop initial solutions. It performs chemotactic process after initialization. Then it executes reproduction process. Finally, it carries out elimination-dispersal process. The computational complexity of MABFO isn’t significantly different compared with classic BFO, because the size of chemotactic step-length is only dynamically adjusted in the reproduction process.

Table 1. Pseudocode of MABFO.

4 Simulation Studies and Discussions

4.1 The Benchmark Function

To evaluate the performance of MABFO, nine benchmark functions selected from citation [24] as follows (Table 2):

Table 2. Test function formula.

The test suite includes nine benchmark functions in this paper, encompassing uni-modal, simple multi-modal, hybrid and composition problems. Function F1 is unimodal function. Functions F2–F3, which are more complex optimization problems, are simple multi-modal functions. Functions F4–F6 are hybrid functions, and functions F7–F9 are composition functions. Both hybrid function and composition functions consist of a variety of basic functions, where the number of local minimum increases exponentially with the problem dimension. So they are considered to be the most difficult class of optimization problems. More detailed function definition is given in citation [24].

4.2 Parameter Settings

The performance of the proposed MABFO is evaluated on the benchmark functions in comparison with PPBSO [25], ABFO [13] and BFO [8]. Here, the total number of iterations for each algorithm is set as 2000. Additionally, as for other specific parameters of each algorithm, as shown in Table 3:

Table 3. Parameter settings.

It can be known from the description in Sect. 3, \( \lambda \) is important for the performance for the proposed algorithm. We should choose an appropriate value of \( \lambda \) to further improve the performance of the algorithm. Table 4 shows the stimulation results of nine functions with different values of \( \lambda \). There are the largest number of functions that can get the most accurate value when coefficient (\( \lambda \)) is set as 1.0.

Table 4. Results with different values of coefficient \( \lambda \) on test functions

4.3 Simulation Results

The merits and characteristics of MABFO are discussed in comparison with PPBSO, ABFO and BFO as follows. Table 5 demonstrates simulation results obtained by MABFO, PPBSO, ABFO and BFO applied on the nine benchmark functions respectively. The simulation results for these benchmark functions are shown in Fig. 1, 2, 3 and 4 which describe the convergence process of MABFO, PPBSO, ABFO and BFO respectively.

Table 5. The performance comparison of MABFO, PPBSO, ABFO and BFO.
Fig. 4.
figure 4

Convergence curve of F2 10-D

Precision of Optimization:

The proposed MABFO algorithm is evaluated on the 10-dimension and 30-dimension benchmark functions in comparison with PPBSO, ABFO and BFO respectively. Each algorithm runs 20 times to give a mean value of the best solutions and a standard deviation.

From Table 5, it can be seen clearly that the average convergence value of the proposed MABFO algorithm ranks first for 13 times in total among the nine functions, and has small deviation at the same time. This demonstrates that the search accuracy of MABFO algorithm is better than the other three algorithms. This is because that the modified adaptive chemotactic step strategy of MABFO can help escape from local optimum and improve its capability of searching global optimum.

Speed of Convergence:

From the results presented in Fig. 4, 5, 6 and 7, comparing MABFO and classic BFO, the adaptive chemotactic step-length mechanism of MABFO can balance exploration and exploitation on the whole phase. Because MABFO can use big chemotactic step-length for fast searching feasible solution region in exploration phase, and for local search with small chemotactic step-length in exploitation phase quickly. On the contrary, the constant chemotactic step-length of classic BFO unable to maintain high-speed search ability in different environments.

Fig. 5.
figure 5

Convergence curve of F9 10-D

Fig. 6.
figure 6

Convergence curve of F3 30-D

Fig. 7.
figure 7

Convergence curve of F6 30-D

From Fig. 4, 5, 6 and 7, we can find that the convergence speed of MABFO is better than PPBSO, ABFO and BFO. The convergence speed of MABFO and PPBSO at the same level roughly in the initial search phase. Because MABFO not only adds mechanism of adaptive chemotactic step-length, but also introduces the adaptive tumbling mode that makes full use of the information of the global best individual. A larger chemotactic step-length and more suitable movement direction can obtain a relatively better convergence speed in the initial search phase. Moreover, MABFO also has faster convergence speed than other three algorithms in the middle and late stage of whole search process, because it has a desired chemotactic step-length and direction in the whole dynamic search region.

5 Conclusions

In this paper, a modified adaptive chemotaxis strategy in dynamic search region is proposed to improve the BFO algorithm. Nine benchmark functions were then used to test effectiveness of the proposed improvement. Compared with PPBSO, ABFO and BFO, the proposed MABFO algorithm has fast search performance according to its adaptive character in whole search phase. In a large number of scientific research and engineering application practice, people found that biologically inspired algorithm has some problems, mainly premature convergence, and easy to fall into the local optimal. Evaluation results obtained on benchmark functions have proved the effectiveness of the proposed MABFO algorithm in solving problems of premature convergence and easy to fall into the local optimal. But the performance on the 30-dimension is worse than that on the 10-dimension. This encourages us to study further to solve higher dimensions optimization problems.