Bacterial Foraging Optimization Based on Self-Adaptive Chemotaxis Strategy

Bacterial foraging optimization (BFO) algorithm is a novel swarm intelligence optimization algorithm that has been adopted in a wide range of applications. However, at present, the classical BFO algorithm still has two major drawbacks: one is the fixed step size that makes it difficult to balance exploration and exploitation abilities; the other is the weak connection among the bacteria that takes the risk of getting to the local optimum instead of the global optimum. To overcome these two drawbacks of the classical BFO, the BFO based on self-adaptive chemotaxis strategy (SCBFO) is proposed in this paper. In the SCBFO algorithm, the self-adaptive chemotaxis strategy is designed considering two aspects: the self-adaptive swimming based on bacterial search state features and the improvement of chemotaxis flipping based on information exchange strategy. The optimization results of the SCBFO algorithm are analyzed with the CEC 2015 benchmark test set and compared with the results of the classical and other improved BFO algorithms. Through the test and comparison, the SCBFO algorithm proves to be effective in reducing the risk of local convergence, balancing the exploration and the exploitation, and enhancing the stability of the algorithm. Hence, the major contribution in this research is the SCBFO algorithm that provides a novel and practical strategy to deal with more complex optimization tasks.


Introduction
Bacterial foraging optimization (BFO) algorithm is a novel swarm intelligence optimization algorithm based on the foraging behavior of E. Coli, which was proposed by Professor Passino in 2002 [1,2]. Compared with other optimization algorithms, the BFO algorithm aces in fast convergence and global search by its simple bacterial individual structure and behavior, varied group types and characteristics, and efficient life cycle [3][4][5] even though it is still in a preliminary stage of research. erefore, the BFO algorithm has been successfully applied in many fields. Literature in [6][7][8] adopted the BFO algorithm to optimize the probabilistic planning, load dispatch, reconstruction, and loss minimization of the power energy network. Artificial intelligence learning and robot automatic control can also refer to the BFO algorithm [9][10][11]. Research in [12,13] applied the BFO algorithm to the optimization of the wireless network, including the structure design and routing topology.
At present, the research of BFO focuses on improving its performance for more applications. One of the commonly used methods is to adjust the algorithmic logic. For example, Tang et al. [14] proposed an improved multilevel thresholding approach to improve the global search ability of the classical BFO. By adjusting the search scope and chemotaxis variables dynamically, the bacterial population was guided to move towards the global optimum [15]. Besides, the combination of BFO and other algorithms is also an appealing topic. e convergence speed and the local search ability of the BFO algorithm were proved by referring to some other algorithms, such as the neural network in [16], the genetic algorithm (GA) in [17], the particle swarm optimization (PSO), and unit step function in [18], as well as new chemotaxis with the differential evolution (DE) operator in [19,20].
According to the research on the improvement of the BFO, the classical BFO algorithm still has some drawbacks, in which the fixed chemotactic step size and the weak connection among bacteria matter the most. e first drawback, the fixed chemotactic step size, makes the balance between exploration and exploitation difficult to realize. e second drawback, the weak connection among bacteria, leads to poor randomicity in chemotaxis. When searching in a complex multimodal solution set, the above two drawbacks will lead the bacteria community to the local convergence rather than the global one.
To overcome these drawbacks, this paper proposed the BFO with self-adaptive chemotaxis strategy (SCBFO) as one of the novel BFO algorithms, which improves the classical algorithm theoretically via the following two aspects.
First, a self-adaptive swimming method based on bacterial search state features is proposed to overcome the classical drawback caused by a fixed step size. ree important features of the bacterial search state, the population diversity, the iteration, and the mean fitness are extracted and calculated. ey are taken as the inputs of a multidimension fuzzy logic controller (MFLC) to obtain the chemotaxis swimming step size suitable for the current search state. en, the chemotaxis flipping is improved in the SCBFO based on information exchange strategy. By introducing the strategy of information exchange between bacteria, the state perception between bacteria is improved so that bacteria can understand the overall optimization state in the optimal solution space and instantly adjust the flipping of bacterial chemotaxis. erefore, the SCBFO algorithm can effectively solve the performance degradation caused by the drawbacks of the classical BFO and improve the search performance stability. is paper is structured as follows: Section 2 analyses the general solving process of the BFO algorithm. Section 3 proposes the SCBFO algorithm, which is based on the selfadaptive chemotaxis strategy. In Section 4, the SCBFO algorithm is tested using the CEC 2015 benchmark test set and compared with other algorithms, in which the optimization results, the convergence trend, and the performance stability of the algorithm are analyzed. Section 5 summarizes the performance of the SCBFO algorithm.

Fundamental Structure of the BFO Algorithm
e fundamental structure of the BFO algorithm was proposed in the classical BFO algorithm and is shared by all the improved versions of the BFO algorithm [2,18]. us, the fundamental structure of the BFO algorithm is established in this section alongside essential functions that will be used and optimized in this paper, as shown in Figure 1.
To start with, the initialization of the classical BFO algorithm includes two important contents: (1) Solution space initialization: the solving spatial dimension D, range, and mapping function f(x) are designed. (2) Bacterial initialization: the number of bacteria is nominated by S. e position of the ith bacterium in the optimization space is expressed as P i (j, k, l), which equals to the optimal parameter of the solution, i.e., P i (j, k, l) � [m 1 , m 2 , . . ., m D ].
erefore, the fitness of the ith bacterium in the optimization space is expressed as J i (j, k, l), which is determined by the function of the bacterium position in the following: In (1), the lower values of the function indicate the higher fitness [1]. i represents the ith bacterium, while j, k, and l correspond to the main processes of the BFO algorithm: chemotaxis, reproduction, and elimination and dispersal.

Chemotaxis.
e chemotaxis process consists of a great amount of swimming and flipping motions. In the jth chemotaxis process, the movement of the ith bacterium can be expressed in the following: where the swimming step length of the ith bacterium is divided into single swimming step size C(i) and the number of swimming n and Δ(i) is the direction vector of the ith bacterium in the p-dimension optimization space. Each element of Δ(i) is a numeric value at the range of [− 1,1], whose initialization is set as a random value within the range. When the ith bacterium finds a higher fitness position to be a favorable environment during the jth chemotaxis, it continues to move in the same direction based on this time. Instead, Δ(i) chooses a new random direction.

2.2.
Swarming. e swarming behavior of the bacteria can be characterized by attraction and repulsion. e numerical relationship can be defined in the following: where d att indicates the depth at which the attracted material is released by the ith bacterium, while ω att indicates the width of the same attracted material. Similarly, because two bacteria cannot be in exactly the same position, the repulsion is adopted as h rep and ω rep . After the swarming process, the fitness of the ith bacterium is shown in the following:

Reproduction.
e bacteria replicate when they reach a better environment; otherwise, they will pass away. us, after the chemotaxis and the swarming process, the fitness of all the bacteria is calculated and sorted. e fitness of the ith bacterium is expressed in the following: 2 Computational Intelligence and Neuroscience Half of the bacteria at better condition S r � (S/2) are selected to survive, while the other half pass away. e survived bacteria then reproduce into two colonies located in the same region, keeping the total number of bacteria S fixed.

Elimination and Dispersal.
After the reproduction, each bacterium is dispersed with the probability of P ed , but the total number of bacteria remains the same. Once a bacterium is eliminated, it will be randomly dispersed to a new location.
r � random[0, 1]; As shown in (6), elimination occurs when r i < P ed . e original position of the ith bacterium P i was replaced by a new one P i ′ � (m 1 ′ , m 2 ′ , . . . , m D ′ ). As a result, the optimal parameter m is updated to a random parameter m′ that will be solved in the optimization space.

Improvement Based on Self-Adaptive
Chemotaxis Strategy e chemotaxis process has a great influence on the exploration and exploitation of the BFO algorithm, and it is the most important computing process of the BFO algorithm in searching the optimization space. e effect of chemotaxis is mainly achieved by two operations: swimming step size and flipping direction. erefore, to improve the performance of the BFO algorithm, two improvements are proposed in this paper, in which the features in the search state of the BFO algorithm are extracted and calculated and the information exchange between bacteria is increased. With these two improvements, the dynamic self-adaptive ability for bacterial swimming and flipping motions is designed, and a novel BFO algorithm, the SCBFO algorithm, is proposed.

Self-Adaptive Swimming Based on Bacterial Search State
Features. According to the above research, the single swimming step size C(t) and the number of swimming n of chemotaxis determine the swimming step size of the algorithm. en, the swimming step size determines whether the search performance of the algorithm can adapt to the current search state. When the search state is in the early stage, the algorithm needs the exploration ability for global search; then, in the later stage, the exploitation ability is required for local development.
For different optimization problems, the change of the BFO search state is also different. Meanwhile, because the chemotaxis process is nonlinear, it is so complex that the transition from the global exploration to the local exploitation cannot be simply described and divided by the means of analytical equations. erefore, to realize the dynamic adjustment of the BFO algorithm to the appropriate chemotaxis swimming, this paper extracts three important features of the BFO in each search state, including population diversity, iteration, and mean fitness, as shown in Figure 2.
e population diversity of bacteria describes the dispersion of the bacteria. e population diversity will get up to a higher level if the bacteria disperse at a wider range, and vice versa.
is paper measures the population diversity of the bacterial colony in the chemotaxis process of BFO as where L represents the longest radius in the solution space and div(t) within the range of [0,1] measures the distance from each bacterium to the center of the population, which is irrelevant to the size of the solution space or the number of bacteria. e iteration of the BFO algorithm is expressed by a parameter T, which is defined as an expression in the range of (0,1] in (8), where t and T max represent the index of the current chemotaxis and the maximum iteration, respectively.
us, the definition of parameter T is generally suitable to different algorithms no matter how the parameters, the dimension, and the solution space are set in the algorithms: e change of the mean fitness in two chemotaxis processes, dJ, is mainly investigated as one of the crucial standards to evaluate the BFO algorithm [21]. To give a general definition, the change of the mean fitness dJ is defined in the per-unit form within [− 1,1] seen in the following: where J max and J min show the maximum and minimum of the fitness, respectively. erefore, in this paper, the three variables, the population diversity in (7), iterations in (8), and the mean fitness of bacteria in (9), are set as inputs of the multidimension fuzzy logic controller (MFLC), which is designed to investigate the search status of the algorithm in this paper. en, with the two outputs of the MFLC, the chemotaxis swimming processes are adjusted in the following: where the two output variables of the controller are the bacterial swimming activity increment dn(t) ∈ [− 0.01, 0.01] and the bacterial swimming step multiple C Multi (t) ∈ (0, 1]. e variable sets of the MFLC are shown in Table 1. e fuzzy rules of the variables may be expressed in Table 2. According to the aforementioned principles, the membership function of each variable can be combined to form a complete function corresponding to the inputs and outputs. As is shown in Figure 3, under the control of MFLC, the single swimming step size C(t) and the number of swimming n can be dynamically adjusted in different stages.

Improvement of Chemotaxis Flipping Based on Information Exchange Strategy.
e flipping of the bacteria is another important operation during the chemotaxis process of the BFO algorithm. Each bacterium controls its own chemotaxis direction based on the extremum found during its swimming. e flipping variable is Δ(i) in (2). Although this method is beneficial to the randomness of the search, the blocked information among the bacteria slows down the searching process. us, the BFO algorithm with (2) suffers the disadvantage of falling into the local optimum.
In order to solve this problem, referring to the information exchanging strategy of individuals in the particle swarm optimization (PSO) algorithm [22,23], the flipping variable Δ(i) in the BFO algorithm is updated in (11) and shown in Figure 4: Coefficients that adjust the process of chemotaxis are utilized in (11): ω is the inertia factor, which represents the chemotaxis inertia of the bacteria at a certain direction. C 1 and C 2 are acceleration constants. C 1 represents the rate at which the ith bacterium moves towards its individual optimal value P local during the process of individual bacterial chemotaxis, while C 2 indicates the adjusting rate to the global optimum value P global for all the bacterial chemotaxis. R 1 and R 2 are random values at the range of (0,1), which are used to improve the randomness of the bacterial flipping and enhance the searching ability.

Description of the SCBFO Algorithm.
erefore, based on Sections 3.1 and 3.2, with (7)- (11) and MFLC, the SCBFO algorithm is established via the improvements of the BFO algorithm. e flowchart of the proposed SCBFO algorithm is summarized in Figure 5. e special steps of the SCBFO algorithm are described as follows: (1) According to formulas (1)-(11), the initial parameters are described in Table 3. (2) e completion conditions of exploration and exploitation steps in the chemotaxis process are as follows: According to formula (2), when the fitness of the ith bacterium is worse than the original position after the chemotaxis process or when its number of swimming n � 0, the exploration and exploitation steps are terminated, and the next process is started; otherwise, continue. (3) e completion conditions of chemotaxis, reproduction, and elimination and dispersal process are as follows: According to the definition and initialization of bacteria in Section 2, the position of the ith bacterium in the optimization space is expressed as P i (j, k, l), j represents the jth chemotaxis process, k represents the kth reproduction process, and l represents the lth elimination and dispersal process. When the count value of the corresponding process is 0, the process is completed, and the next process is started.

Test Set and Parameters.
e SCBFO algorithm was investigated with 10 test functions provided by the CEC 2015 benchmark test set [24], shown in Table4 and Figure 6. Because these 10 test functions are commonly used key functions selected by related literature [14][15][16][17][18][19], including the new algorithms (CEBFO and MBFO) used in this experiment, it is convincing to process the experiment with these test functions in the validation of the SCBFO algorithm.
e first five test functions in Table 4 are unimodal functions, and the others are multimodal functions. However, for each of the ten functions, there is only one unique global optimal solution in the optimization space.  Optimal solution space  Under the same test conditions, SCBFO was tested and compared with the classical BFO algorithm and the classical PSO algorithm.
At the same time, two newly improved bacteria foraging algorithms in recent years, CEBFO (2017) [14] and MBFO (2015) [19], were also taken into account and compared with the SCFBO algorithm proposed in this paper.
To guarantee the fairness and credibility of algorithms in comparison, some initializations were determined preliminarily.
e initial parameters of the classical BFO, the

MFLC
Chemotaxis direction based on information exchange Schwefel's problem 2.22 High conditioned elliptic Dixon-Price Type: multimodal Ackley Computational Intelligence and Neuroscience CEBFO, the MBFO, and the SCBFO algorithm maintained the same. Besides, the iteration number of the classical PSO algorithm was defined as T � N c * N re * N ed to make it comparable with other algorithms. e essential parameter settings of five algorithms are shown in Table 5.
According to the calculation flow in Section 3.3, because the solution spaces vary among the test functions, the initial step size of bacterial swimming C is different according to the order of the solution space, as shown in Table 5.

Results and Comparison.
After the computation, the convergence trend and typical data such as the best value, the worst value, the mean value, and the variance can be achieved from the computed search results, which will be used in the following analysis on the performance of the SCBFO algorithm.
Since the trends of the computed results in different dimensions are similar for a certain test function and a higher dimension makes the optimization more challenging, the highest dimension D � 50 is chosen to illustrate the feasibility and the advantages of the SCBFO. e search results with dimension D � 50 are listed in Table 6.
For better understanding, the comparison among the SCBFO algorithm and other algorithms is processed in the optimization results, the convergence trend, and the performance stability, respectively.

Comparison of Optimization Results.
e optimization results are listed in Table 6. According to the mean value of each test in Table 6, the comparison in Figure 7 can be formed, which is logarithmically arranged to achieve a unified contrast.
From Table 4, we can see the theoretical value of the optimal solutions in the test set is 0. As shown clearly in Table 6 and Figure 7, we find that, for each of the 10 test functions, the optimization result of the SCBFO algorithm remains the smallest, which means the SCBFO algorithm gets the optimal solution closest to the theoretical value. Even compared with other improved algorithms including CEBFO and MBFO, the SCBFO algorithm has higher accuracy in the optimization results. erefore, the SCBFO algorithm reduces the risk of local convergence to a large extent and improves the accuracy Computational Intelligence and Neuroscience when searching for the global optimum, which proves the SCBFO algorithm is effective in the optimization.

Comparison of Convergence Trends.
To evaluate the performances of an algorithm, the exploration ability in the early stage and the exploitation ability in the later stage are also the key standards. e mean values in different processes during the iteration are calculated according to the 100 times of computation with five kinds of algorithms. e convergence trends are plotted in Figure 8 and also logarithmically presented for clearer illustration. As shown in Figure 8, in the exploration stage T < 40% (iteration number t < 800), the convergence of the SCBFO algorithm is not as fast as the classical BFO and the PSO algorithm because of a large-scale exploration search. However, the SCBFO algorithm shows the continuous convergence trend similar to the CEBFO and the MBFO algorithm, which means the SCBFO algorithm can keep a sufficient exploration stage for the large-scale exploration search.
en, in the exploitation stage T > 40% (iteration number t > 800), especially 90% < T < 100% (iteration number 1,800 < t < 2,000), the SCBFO algorithm shows high convergence speed and excellent optimization results. At this stage, the convergence speed of the classical BFO and the PSO algorithm is reduced or even stopped when the algorithm reaches the optimal solution of 10 − 1 order. is proves that their exploitation activity in this stage is so weak that they are more likely to get into the local optimum. On the contrary, compared with other algorithms, SCBFO in this stage keeps a considerable declining speed until the end of the iterative process, which accelerates the process of convergence. erefore, the SCBFO algorithm is proved to effectively balance the exploration and the exploitation, which means Table 5: e initial parameters of five algorithms.

Comparison of Performance Stability.
As a swarm intelligence algorithm with wide application prospects, the SCBFO algorithm also needs to take the performance  Computational Intelligence and Neuroscience stability as one of the key standards to evaluate its performances. is section focuses on the variance, the best value, and the worst value according to the 100 times of computation with each algorithm in the highest dimension D = 50, as shown in Table 7. And Figure 9 plots all the variances logarithmically. Meanwhile, all results with the dimension D = 50 are rearranged as discrete data statistics used for the box graph in Figure 10. e box graph in Figure 10 can clearly show the stability differences of five algorithms under the current dimension in each test function.
As shown in Figures 9 and 10 and Table 7, the SCBFO algorithm shows the best variance. It can be seen that the results of the classical BFO algorithm and PSO algorithm fluctuate considerably. e classical BFO and PSO algorithms have a lot of outliers and a wider quartile range, which is in accord with the regularity delivered by Table 7 and indicates their unstable performances. On the contrary, referring to the variances in the box graph, the computed results of the SCBFO algorithm show the smallest medium value, the most concentrated quartile range, and the least outlier value. erefore, it is proved that the SCBFO algorithm shows the strongest stability of search performance among the five algorithms, which means the SCBFO algorithm proposed in this research will be more suitable to complex real-world applications of optimization.

Conclusions
To overcome the fixed step size and the weak correlation among bacteria of the classical BFO algorithm, the SCBFO algorithm was proposed in this paper. e self-adaptive chemotaxis strategy was designed by proposing the selfadaptive swimming method based on bacterial search state features and improving the chemotaxis flipping based on information exchange strategy. e SCBFO algorithm was tested and verified by the CEC 2015 benchmark test set and compared with the classical BFO, the classical PSO, and two improved bacteria foraging algorithms in recent years: the CEBFO and the MBFO algorithm. e validation results proved the SCBFO algorithm effective and accurate in obtaining the optimal solution. Meanwhile, the stronger exploitation ability in the later stage and the more stable search performance of the SCBFO algorithm were also illustrated.
To sum up, the SCBFO algorithm does well in balancing the exploration and the exploitation and reducing the risk of local convergence, which means it can overcome the aforementioned two drawbacks of the classical BFO. Meanwhile, the SCBFO algorithm presents excellent search performance stability. erefore, the SCBFO provides a novel and efficient theory to deal with complex optimization tasks.

Data Availability
e related benchmark problems used to support the findings of this study can be found in this article or the website (https://github.com/P-N-Suganthan).

Conflicts of Interest
e authors declare that they have no conflicts of interest.