Adaptive Bacterial Foraging Optimization

. Bacterial Foraging Optimization (cid:2) BFO (cid:3) is a recently developed nature-inspired optimization algorithm, which is based on the foraging behavior of E. coli bacteria. Up to now, BFO has been applied successfully to some engineering problems due to its simplicity and ease of implementation. However, BFO possesses a poor convergence behavior over complex optimization problems as compared to other nature-inspired optimization techniques. This paper ﬁrst analyzes how the run-length unit parameter of BFO controls the exploration of the whole search space and the exploitation of the promising areas. Then it presents a variation on the original BFO, called the adaptive bacterial foraging optimization (cid:2) ABFO (cid:3) , employing the adaptive foraging strategies to improve the performance of the original BFO. This improvement is achieved by enabling the bacterial foraging algorithm to adjust the run-length unit parameter dynamically during algorithm execution in order to balance the exploration/exploitation tradeo ﬀ . The experiments compare the performance of two versions of ABFO with the original BFO, the standard particle swarm optimization (cid:2) PSO (cid:3) and a real-coded genetic algorithm (cid:2) GA (cid:3) on four widely-used benchmark functions. The proposed ABFO shows a marked improvement in performance over the original BFO and appears to be comparable with the PSO and GA.


Introduction
In the past several decades, research on optimization has attracted more and more attention.The most general unconstrained optimization problem can be defined as Minimize f X , X x 1 , x 2 , . . ., x D , 1.1 where D is the number of the parameters to be optimized.There are different optimization methods and algorithms that can be grouped into deterministic and stochastic 1, 2 .Deterministic techniques depend on the mathematical order to coordinate pattern emerges.In 18 , the proposed CBFO applied two cooperative approaches to the original BFO, namely, the serial heterogeneous cooperation on the implicit space decomposition level and the serial heterogeneous cooperation on the hybrid space decomposition level.
In order to improve the BFO's performance on complex optimization problems with high dimensionality, we apply two natural foraging strategies, namely, the producerscrounger foraging PSF and the area concentrated search ACS , to the original BFO, resulting in two new adaptive bacterial foraging optimization models ABFOs , namely, ABFO 1 and ABFO 2 .Instead of the simple description of chemotactic behavior in BFO, the proposed algorithms can also adaptively strike a balance between the exploration and the exploitation of the search space during the bacteria evolution, by which the significant improvement can be gained.In order to evaluate the performance of the proposed algorithms, extensive studies based on a set of well-known benchmark functions have been carried out.For comparison purposes, the work also implemented a real-coded genetic algorithm GA , the standard particle swarm optimization PSO , and the original BFO on these functions respectively.The simulation results are encouraging.The ABFO algorithms have markedly superior search performance when compared to the original BFO, while maintaining the similar or even superior performance compared to PSO and GA in terms of accuracy, robustness, and convergence speed on all benchmark functions.The proposed ABFO 1 and ABFO 2 described in this paper enhance previous BFO works in the following aspects: i a new adaptive strategy, namely, the producer-scrounger foraging, to dynamically determine the chemotactic step sizes for the whole bacterial colony during a run, hence dividing the foraging procedure of artificial bacteria colony into multiple explore and exploit phases; ii a new self-adaptive foraging strategy, namely, the area concentrate search, to respectively tune the chemotactic step size for each single bacterium during its run, hence casting the bacterial foraging process into heterogeneous fashion; iii a comprehensive study comparing ABFO 1 and ABFO 2 with another two state-ofthe-art global optimization algorithms, namely, GA and PSO, on high dimensional functions; iv single and colonial bacterial behaviors in both ABFO 1 and ABFO 2 that were simulated respectively in order to analyze in depth the adaptive and self-adaptive foraging schemes in the proposed models; v new results on benchmark functions up to 300 dimensions.
The rest of the paper is organized as follows.In Section 2, we will give brief reviews of the bacterial chemotaxis and the original BFO algorithm.The in-depth analysis of the influence of the run-length unit parameter on the bacterial behavior in BFO model is also presented here.In Section 3, two adaptive strategies employed by ABFOs are described and the state-of-the-art adaptation mechanism is summarized.Then, our adaptive bacterial optimization algorithms will be introduced, and its implementation details will be given in Section 4. In Section 5, the experiment studies of the proposed ABFO algorithms and other algorithms are presented with descriptions of the benchmark functions, experimental settings, and experimental results.Finally, Section 6 concludes the paper.

The Classical BFO Algorithm
Bacterial foraging algorithm is inspired by an activity called "chemotaxis" exhibited by bacterial foraging behaviors.Motile bacteria such as E. coli and salmonella propel themselves by rotation of the flagella.To move forward, the flagella rotates counterclockwise and the organism "swims" or "runs" while a clockwise rotation of the flagellum causes the bacterium to randomly "tumble" itself in a new direction and swim again 19 .Alternation between "swim" and "tumble" enables the bacterium to search for nutrients in random directions.Swimming is more frequent as the bacterium approaches a nutrient gradient.Tumbling, hence direction changes, is more frequent as the bacterium moves away from some food to search for more.Basically, bacterial chemotaxis is a complex combination of swimming and tumbling that keeps bacteria in places of higher concentrations of nutrients.

Bacterial Foraging Optimization
The classical bacterial foraging optimization BFO system consists of three principal mechanisms, namely, chemotaxis, reproduction, and elimination-dispersal 1 .We briefly describe each of these processes as follows.

Chemotaxis
In the classical BFO, a unit walk with random direction represents a "tumble" and a unit walk with the same direction in the last step indicates a "run".Suppose θ i j, k, l represents the bacterium at jth chemotactic, kth reproductive, and lth elimination-dispersal step.C i , namely, the run-length unit parameter, is the chemotactic step size during each run or tumble.Then, in each computational chemotactic step, the movement of the ith bacterium can be represented as where Δ i is the direction vector of the jth chemotactic step.When the bacterial movement is run, Δ i is the same with the last chemotactic step; otherwise, Δ i is a random vector whose elements lie in −1, 1 .
With the activity of run or tumble taken at each step of the chemotaxis process, a step fitness, denoted as J i, j, k, l , will be evaluated.

Reproduction
The health status of each bacterium is calculated as the sum of the step fitness during its life, namely, N c j 1 J i, j, k, l , where N c is the maximum step in a chemotaxis process.All bacteria are sorted in reverse order according to health status.In the reproduction step, only the first half of population survives, and a surviving bacterium splits into two identical ones, which are then placed in the same locations.Thus, the population of bacteria keeps constant.

Elimination and Dispersal
The chemotaxis provides a basis for local search, and the reproduction process speeds up the convergence which has been simulated by the classical BFO, while, to a large extent, only chemotaxis and reproduction are not enough for global optima searching.Since bacteria may get stuck around the initial positions or local optima, it is possible for the diversity of BFO to change either gradually or suddenly to eliminate the accidents of being trapped into the local optima.In BFO, the dispersion event happens after a certain number of reproduction processes.Then, some bacteria are chosen, according to a preset probability P ed , to be killed and moved to another position within the environment.

Step-by-Step Algorithm
In what follows, we briefly outline the original BFO algorithm step by step.
Step 1. Initialize parameters n, S, N c , N s , N re , N ed , P ed , C i i 1, 2, . . ., S , θ i , where n: dimension of the search space, S: the number of bacterium, N c : chemotactic steps, N s : swim steps, N re : reproductive steps, N ed : elimination and dispersal steps, P ed : probability of elimination, C i : the run-length unit i.e., the chemotactic step size during each run or tumble .
Substep 4.2.Compute fitness function, J i, j, k, l .Substep 4.3.Let J last J i, j, k, l to save this value since we may find better value via a run.i let m 0 counter for swim length ii while m < N s if not climbed down too long a let m m 1 b if J i, j 1, k, l < J last , let J last J i, j 1, k, l , Then, another step of size C i in this same direction will be taken as 2.1 and use the new generated θ i j 1, k, l to compute the new J i, j 1, k, l c else let m N s .Substep 4.8.Go to next bacterium i 1 : if i / S go to b to process the next bacteria.
Step 5.If j < N c , go to Step 3. In this case, continue chemotaxis since the life of the bacteria is not over.
Step 6. Reproduction.Substep 6.1.For the given k and l, and for each i 1, 2, . . ., S, let be the health of the bacteria.Sort bacterium in order of ascending values J health .
Substep 6.2.The S r bacteria with the highest J health values die, and the other S r bacteria with the best values split, and the copies that are made are placed at the same location as their parent.
Step 7. If k < N re go to Step 2. In this case, the number of specified reproduction steps is not reached; start the next generation in the chemotactic loop.
Step 8. Elimination-dispersal: for i 1, 2, . . ., S, with probability p ed , eliminate and disperse each bacteria, which results in keeping the number of bacteria in the population constant.
To do this, if a bacterium is eliminated, simply disperse one to a random location on the optimization domain.If l < N ed , then go to Step 2, otherwise, end.

Bacterial Behavior in BFO
In order to get an insight into the behavior of the virtual bacteria in BFO model, we illustrate the bacterial trajectories in two separate environments a unimodal and a multimodal case by tuning the run-length unit parameter C i , which can essentially influence the bacterial behaviors.
The first case is the minimization of the 2-d sphere function, which is a widely used unimodal benchmark with a single optimum 0, 0 and the minimum is 0 f a x, y x 2 y 2 .

2.3
Figure 1 a illustrates the trajectories of two bacteria foraging for the optimum in the search space defined by the sphere function, which is contour plotted.The two bacteria simultaneously start at −4, −4 and 4, 4 with different run-length unit.The simulation takes 1000 chemotactic steps note that the reproduction and eliminationdispersal events are not considered here while only the steps before the bacteria find the function fitness of 0.1 are plotted.That is, the parameter setting for BFO is S 2, N c 1000, N s 4, N re 1, N ed 1, C 1 0.1, and C 2 0.01. Figure 1 b shows the converging process of the function values found by these two bacteria over 1000 steps.
From the chemotactic motions of two virtual bacteria represented as the black and blue trajectories, respectively, in Figure 1 , we can observe that both bacteria can travel up the gradient to pursue the optimum of sphere function.We can also observe from Figure 1 a that the larger the parameter C i , the smaller the number of steps to reach the goal, although the path seems to be less direct sometimes.However, from Figure 1 b , we can observe that bacteria with the smaller C i obtain the better performance than the other one with the larger C i .That is, if the C i is larger than the precision goal, the bacterium is not able to stop at the minimum.
The other simulation case is on the 2-d Ackley function, which has one narrow global optimum basin and many minor local optima.It is a widely used multimodal benchmark with the global optimum 0, 0 and the minimum is 0, From the chemotactic motions of the two virtual bacteria as in Figure 2 a , we can observe that the bacterium with larger C i 0.1 can explore the whole search space and stay for a while in several domains containing local optima.It can also escape from these local optima to enter the domain with the global optimum, but it was not able to stop there.On the other hand, the bacteria with the smaller C i 0.01 was attracted into the domain with a local optima, which closed to its start point, and exploited this local minimum for its whole life cycle.That is, if the bacteria with small C i is trapped in a local minima, it is not able to escape from it.
Obviously, in the context of original BFO model, the bacteria with large run-length unit have exploring ability i.e., global investigation of the search place while the bacteria with relatively small run-length unit have exploiting skill i.e., the fine search around a local optimum .However, it is difficult to decide which values of static run-length unit is best suited for a given problem.Hence, we introduce the preprogrammed change of this parameter during the evolution to balance exploration and exploitation, which results in significant improvement in performance of the original algorithm.

Adaptive Strategies and Algorithms
The balance between exploration of the search space and exploitation of potentially good solutions is considered as a fundamental problem in nature-inspired systems.Too much stress on exploration results in a pure random search whereas too much exploitation results in a pure local search.Clearly, intelligent search must self-adaptively combine exploration of the new regions of the space with evaluation of potential solutions already identified.
The most important contribution of the present paper is to define the artificial bacteria in the ABFO models that are capable of self-adapting their exploration and exploitation behaviors in the foraging process.In this section, we will first introduce two adaptive foraging strategies, namely, producer-scrounger foraging and area concentrated search, from which the proposed two ABFO algorithms glean ideas.Secondly, the taxonomy of adaptation methods in natural-inspired algorithms will be given to guide the readers in classifying the kind of algorithms we are dealing with in this work.

The Producer-Scrounger Foraging
In nature, group foraging is a widespread phenomenon since individuals can join groups to improve their foraging success i.e., the average feeding rate can be increased and its variance can be reduced 20 by sharing information with each other.Living in groups allows individuals to allocate foraging effort between two different roles, namely, the producer and the scrounger.The "producer" can be used to locate food patches independently while the "scrounger" can be used to exploit the food discovered by other group members 21 .Producer-scrounger models suggest equilibrium and flexibility in use between the two strategies in response to changes in environment, which alters the costs and benefits of producing and scrounging.

Area Concentrated Search
A central problem for the natural predators in the foraging process is how to balance two conflicting alternatives: the exploitation to search thoroughly in promising areas and the exploration to move to distant areas potentially better than the actual one .Through natural selection, some predatory animals have developed the area concentrated search ACS, also called area-restricted search strategy, by which a predator is able to respond to variations in prey distributions by varying its searching efforts: following an encounter with food resource, a forager searches intensively in a more circumscribed region while a failure to encounter a resource leads to a more extensive, less circumspect mode of search.That is, ACS assumes that regions dense with preys should be exploited slowly, to maximize the chances of encounter, and less dense regions explored rapidly, to minimize the time spent searching in unprofitable areas 22 .ACS in a continuous patchy environment thereby ensures that foraging behaviors will, to some extent, match the distribution of resource, and may be viewed as a simple form of habitat selection 23 .The ACS behavior is regarded as an efficiently adaptive search strategy 24 , which is employed by many search-intensive predators, such as birds, lizards, insects, and other higher organisms.

Taxonomy of Adaptation
In this section, we review the well-known classification of adaptive evolutionary algorithms 25, 26 , which can also be used to classify other adaptive nature-inspired algorithms 27 .
First, the classification of the type of adaptation can be made on the adaptive mechanism used in the algorithmic process.In particular, attention is paid to the issue of whether the feedback is used or not while the algorithm is searching for the solution to the problem.
In 21 , the algorithms are first divided into static and dynamic algorithms.The term "static" means no changes of the parameters occur throughout the run of the algorithm.The term "dynamic adaptation" is used to classify any algorithm where the strategy parameters are modified according to some rules without external control.Based on the mechanism of adaptation, three subclasses of dynamic adaptation are distinguished: deterministic, adaptive, and self-adaptive algorithms.
i A deterministic adaptation takes place if the strategy parameter is changed according to some deterministic rules, which modify the value of the parameter without taking into account any feedback from the algorithm itself.
ii An adaptive dynamic adaptation takes feedback from the algorithm itself into account and changes the strategies parameters accordingly.
iii A self-adaptive dynamic adaptation can be used to implement the self-adaptation of parameters.In this case, the parameters to be adapted are encoded into the representation of the individual.
Furthermore, these dynamic algorithms can be distinguished among different families attending to the level at which the adaptive parameters operate: environment adaptation of the individual as a response to changes in the environment, e.g., penalty terms in the fitness function , population parameters global to the entire population , individual parameters held within an individual , and component strategy parameters local to some component or gene of the individual .These levels of adaptation can be used with each of the types of dynamic adaptation.
According to this taxonomy on adaptation, this work proposes two variants of adaptive bacterial foraging optimization algorithms, namely, ABFO 0 and ABFO 1 , which can be classified into the adaptive dynamic adaptation on the population level and the selfadaptive dynamic adaptation on the individual level, respectively.

Description of ABFO Algorithms
In this section, we consider two variants of ABFO aimed at different types of adaptation, namely, dynamic adaptation and self-adaptation.We should note that the basic philosophy behind these two ABFO variants is the producer-scrounger foraging and the area concentrated Search theory, respectively.The bacteria should always pursue the appropriate balance between exploration and exploitation of the foraging process in the search space, and this should be done by dynamically controlling parameters i.e., the bacterial runlength unit-C i that takes into account the current status of search i.e., the quality of the solutions .Such adaptation mechanism enables the ABFO algorithms to cope with complex, highly multimodal search landscapes efficiently.For comparison purposes, in Figure 3, we illustrate a theoretical idealization of the evolution of the parameter C i in three different classes of algorithms, namely, the original BFO nonadaptive , ABFO 0 adaptive and ABFO 1 self-adaptive .

The ABFO 0 Algorithm (Adaptive Version)
We now present the dynamic adaptive version of ABFO-the ABFO 0 algorithm.As indicated in Section 2, the bacterium with a small run-length unit has the exploring ability while the bacterium with a relatively large run-length unit has the exploiting skill.This inspired us to divide the foraging procedure of artificial bacteria colony into multiple explore/exploit phases and each phase is characterized by the different value of run-length unit and occupies a portion of generations.This approach produces two classes of bacterial individuals, namely, the producers and scroungers, depending on the particular run-length unit that they used.The bacterial producers explore the search space and have the responsibility to find the promising domains and to leave the local optima that have been visited while the bacterial scroungers focus on the precision of the found solutions.That is, the bacteria perform exploitation of the neighborhood of the best-so-far solutions found by the producers.This strategy encompasses the following features.In the initial phase, the bacteria colony searches the whole space of the problem with a large run-length unit C initial here, the same run-length unit is used for all bacteria in the colony , which permits all the bacterial producers to explore the whole space efficiently and avoid being trapped in local optima.Each bacterial producer records all its visited points, and the point with the highest fitness value is considered as potential solution candidate, which are supplied as an input to the next phase.When entering into the next phase, the bacteria colony is reinitialized with a relatively smaller run-length unit from the potential candidates found in the previous phase.That is, the bacterial scroungers join resources uncovered by the producers.Then, they start exploiting the neighborhood of these current best positions until the needed criteria i.e., the feedback from the search process for switching to the next phase is reached.That is, in each phase except the initial phase , the newly initialized bacterial scroungers will join the resources uncovered by others in the last forgoing phase and then exploit them for more precise solutions.
This dynamic adaptive strategy is given in Pseudocode 1.Where t is the current generation number, f best is the best fitness value among all the bacteria in the colony, ε t is the required precision in the current generation, and n, α, and β are user-defined constants.Using this strategy, changes in the parameter values of C are now based on feedback from the search, and the adaptation happens every n generations.Here, in order to perform fine-tuning exploitation of the global optimum, the run-length unit C t adaptively decreases form phase to phase, as shown in Figure 3 c .
The flowchart of the ABFO 0 algorithm can be illustrated by Figure 4 a , where S is the colony size, t is the chemotactic generation counter from 1 to max-generation, i is the bacterium's ID counter from 1 to S, X i is the ith bacterium's position of the bacteria colony, and N s is the maximum number of steps for a single activity of Swim.It should be noted that we embed the reproduction, elimination, and dispersal events in each chemotactic generation.This can improve the algorithm convergence rate significantly.We also simplify the "bacterial health" by the bacterium's current fitness.

The ABFO 1 Algorithm (Self-Adaptive Version)
In the ABFO 1 algorithm, we introduce an "individual run-length unit" to the ith bacterium of the colony and each bacterium can only modify the search behaviour of itself by using the current status of its own.In this way, not only the position solution vector , but also the run-length unit of each bacterium undergoes evolution, respectively.This individual-level self-adaptation may provide us with more accurate information about the search because it is the separate individuals that engaged in searching the solution space not just the whole colony.
The proposed ABFO 1 is inspired by ACS strategy described in Section 3.2.In the foraging process of ABFO 1 model, each bacterium displays alternatively two distinct search states.
1 Exploration state, during which the bacterium employs a large run-length unit to explore the previously unscanned regions in the search space as fast as possible.
2 Exploitation state, during which the bacterium uses a small run-length unit to exploit the promising regions slowly in its immediate vicinity.
Each bacterium in the colony has to permanently maintain an appropriate balance between exploration and exploitation states by varying its own run-length unit adaptively.In ABFO 1 , the adaptation of the individual run-length unit is done by taking into account two decision indicators: a fitness improvement finding a promising domain and no improvement registered lately current domain is food exhausted .The criteria that determine the adjustment of individual run-length unit and the entrance into one of the states i.e., exploitation and exploration are the following.
i Criterion-1: if the bacterium discovers a new, promising domain, the run-length unit of this bacterium is adapted to another smaller one.Here, "discovers a new promising domain" means this bacterium registers a fitness improvement beyond a certain precision from the last generation to the current.Following Criterion-1, the bacterium's behaviour will self-adapt into exploitation state.
ii Criterion-2: if the bacterium's current fitness is unchanged for a number K u user defined of consecutive generations, then augment this bacterium's run-length unit and this bacterium enters exploration state.This situation means that the bacterium searches an unpromising domain or the domain where this bacterium focuses its search has nothing new to offer.
This self-adaptive strategy is given in Pseudocode 2, where t is the current generation number, C i t is the current run-length unit of the ith bacterium, ε i t is the required precision in the current generation of the ith bacterium, α and β are user-defined constants, and C initial and ε initial are the initialized run-length unit and precision goal, respectively.
The flowchart of the ABFO 1 algorithm can be illustrated by Figure 4 b , where S is the colony size, t is the chemotactic generation counter from 1 to max-generation, i is the bacterium's ID counter from 1 to S, X i is the ith bacterium's position of the bacteria colony, N s is the maximum number of steps for a single activity of Swim, and flag i is the number of generations the ith bacterium has not improved its own fitness.

Benchmark Functions
The set of benchmark functions contains four functions that are commonly used in evolutionary computation literature 28, 29 to show solution quality and convergence rate.The formulas and the properties of these functions are listed below.
1 Sphere function

5.4
probability P ed , eliminate and disperse each bacterium Tumble and Move: Begin Initialise: position X and associated run-length step C initial of the bacteria colony, set t = 0 Reinitialize colony position from the best-so-far position found by each bacterium Tumble and Move: Fit(X i (t + 1)) < ε i (t)?The first problem is the sphere function, which is a widely used unimodal benchmark and is easy to solve.The second problem is the Rosenbrock function.It can be treated as a multimodal problem.It has a narrow valley from the perceived local optima to the global optimum.The third problem, namely, the Rastrigin function, is a complex multimodal problem with a large number of local optima.Algorithms may easily fall into a local optimum when attempting to solve it.The last problem is the multimodal Griewank function.
Griewank has linkage among variables that makes it difficult to reach the global optimum.
The interesting phenomenon of the Griewank is that it is more difficult for lower dimensions than higher dimensions.All functions are tested on 2 and 10 dimensions.The search ranges R, the global optimum X * , and the corresponding fitness f X * value of each function are listed in Table 1.

Parameter Settings for the Involved Algorithms
An experiment was conducted to compare the five algorithms, including the original BFO, the real-coded genetic algorithm GA , the standard particle swarm optimization PSO and the proposed ABFO 0 and ABFO 1 , on the four benchmark functions with two dimensions and ten dimensions.The experiments were run 25 times respectively for each algorithm on each benchmark function and the maximum generation was set at 1000.The mean values and standard deviation of the results are presented.The parameters settings for ABFO 0 and ABFO 1 are summarized in Table 2.It should be noted that both the parameters α and β are the run-length unit decreasing parameters.In this work, after performing a series of hand-tuning experiments, we found that keeping the run-length unit decreasing parameter α β 10 provide considerably good performance of convergence and accuracy over all benchmark functions considered here.For the original BFO algorithm, we take C 0.1 and P ed 0.25, which is the standard set of these two parameter values as recommended in 10 .We set S 100, N c 100, N s 4, N re 5, and N ed 2, then BFO performs totally 1000 chemotactic steps in each run, which make a fair comparison in regard of the parameter values.The PSO algorithm we used is the standard one i.e., the global version with inertia weight .The parameters were given by the default setting of 28 : the acceleration factors c 1 and c 2 were both 2.0; a decaying inertia weight ω starting at 0.9 and ending at 0.4 was used.The population size was set at 100 for the PSO algorithm.The GA algorithm we executed is a real-coded genetic algorithm with intermediate crossover and Gaussian mutation.The population of the GA is 100 and all the control parameters, for example, mutation rate and crossover rate, and so forth, were set to be the same as 30 .

Results for the 2-D Problems
Table 3 presents the means and variances of the 30 runs of the five algorithms on the four test functions with D 2. The best results among the five algorithms are shown in bold.Figure 5 presents the convergence characteristics in terms of the best fitness value of the median run of each algorithm for each test function.
From the results, we observe that our two adaptive BFO algorithms achieved significantly better performance on all benchmark functions than the original BFO algorithm.ABFO 1 surpasses all other algorithms on function 1, which is the unimodal function that adopted to assess the convergence rates of optimization algorithms.The ABFO 0 performs better on all multimodal functions 2, 3, and 4 when the other algorithms miss the global optimum basin.The Griewank function is a good example.ABFO 0 successfully avoids falling into local optima and continues to find better results even after the PSO, GA, and BFO seem to have stagnated.The ABFO 1 achieved almost the same performance as the ABFO 0 on functions 2, 3, and 4. From the rank values presented in Table 3, the search performance of the algorithms tested here is ordered as ABFO 0 > ABFO 1 PSO > GA > BFO.

Results for the 10-D Problems
The experiments conducted on 2-D problems are repeated on the 10-D problems.The results and convergence processes are presented in Table 4 and Figure 6, respectively.Since all 10-D functions become more difficult than their 2-D counterparts, the results obtained by all tested algorithms are not as good as in 2-D cases.Comparing the results in Table 4 and convergence processes in Figure 6, we can observe that the algorithms achieved similar ranking as in the 2-D problems.That is, the search performance of the algorithms tested here is ordered as ABFO 0 > ABFO 1 > PSO GA > BFO.

Results for the High-Dimensional Problems
Many real-world optimization problems usually involve hundreds or even thousands of variables.However, previous studies showed that although some algorithms generated good results on relatively low-dimensional benchmark functions, they do not perform satisfactorily for some large-scale cases 31 .Therefore, in order to assess the scalability of our ABFO algorithms, which is crucial for its applicability to real-world problems, the benchmark functions f 1 to f 4 were extended to 300 dimensions and used in our experimental studies as high-dimensional benchmark functions.The results are presented in Table 5.As the convergence graphs are similar to the 10-D problems, they are not presented.
From Table 5, it can be seen that in terms of final average results, both ABFO algorithms markedly outperformed the other algorithms and converged to good nearoptimal solutions.It can also be seen that although PSO and GA achieved satisfactory results in 2-and 10-dimensional benchmark problems, they cannot be scaled up to handle most of the 300-dimensional cases.For the four problems we tested, the original BFO algorithm always failed to converge to good near-optimal solutions.

Adaptive Bacterial Behaviors in ABFO Model
In order to further analyze the adaptive foraging behaviours of the two proposed ABFO models, we run two simulations.In both simulations, we excluded the reproduction, elimination, and dispersion events in order to illustrate the bacterial behaviours clearly.In the first simulation, the population evolution of the ABFO 0 was simulated on 2-D Rosenbrock and Rastrigin functions, which are illustrated in Figures 7 and 8, respectively.Specially, it shows the positions of the bacteria on certain chemotactic steps, where each white circle represents a bacterium.In both cases, the evolution process proceeds 500 chemotactic steps, and we choose S 50, n 100, C initial 0.1, ε initial 100, and α β 10.
Initially, in Figure 7 a , we see that the bacteria colony is distributed randomly over the nutrient map defined by the 2-D Rosenbrock function.In Figure 7 b , we can observe that, in the end of the first phase, all the bacterial producers have found the long and narrow valley of the Rosenbrock function which contains the global optimum and move around it.In the second and third phases Figures 7 c and 7 d , the bacterial scroungers initialized in this valley found by the producers and exploit the global optimum along it.Qualitatively, we found a similar pattern in Figure 8, where the bacteria colony pursue the valleys and avoid the peaks of the multimodal Rastrigin function.In the first phase Figures 8 a and 8 b , starting from their random initial positions, the bacterial producers explore many regions of the nutrient map.In the second and third phases Figures 8 c and   In the second simulation, we demonstrate the self-adaptive foraging behaviour of a single bacterium in the ABFO 1 model.Figures 9 a -9 d illustrate the trajectories of a single bacterium on the four benchmark functions, respectively, namely, the 2-D Dejong, Rosenbrock, Rastrigin, and Griewank function, which are contour plotted.In all the cases, the evolution process proceeds 1000 chemotactic steps, and we choose the same parameters setting as in Table 2, except S 1.
Figure 9 a illustrates the bacterial trajectories in the 2-D unimodal Sphere function, which start at point −5, −5 .As we can see, the proposed self-adaptive strategy is important because it permits the bacteria to refine its foraging behaviour adaptively.At the beginning of the simulation, the bacterium starts exploring the search space.In that manner, the bacterium does not waste much time before finding the promising region that contains the global optimum, because the large run-length unit encourages long-range search.On the other hand, by self-adapting the parameters, the bacterium slows down i.e., the bacterium enters the exploitation state near the optimum in order to pursue the more and more precise solutions.unit.Whenever the bacterium encounters a fitness improvement, this forager starts searching intensively in this promising region, whereas, whenever it is highly probable that the good solutions lying in this region have been found by this bacterium, it moves away from this region and starts exploring the other regions of the search space until another better region is discovered.Finally, we can observe that the bacterium finds the domain that contains the global optimum of Rastrigin function.The similar self-adaptive pattern can be noticed in Figures 9 b and 9 d , which plotted the bacterial foraging trajectories on Rosenbrock and Griewank functions, respectively.Clearly, this result captures the important aspects of the ACS behaviour that takes place in nature.
In Figure 10, we have also drawn the associated evolution of the run-length unit of this bacterium along its search on all the functions.This provides an intuitive explanation of what is happening during the search of the self-adaptive bacterial foraging algorithm.From Figure 10, we can notice that when the bacterium finds difficulties during an exploit state with low run-length unit , then it increases the run-length unit to improve the exploration, and vice versa.producer explores the search space using the large run-length unit, which permits them to explore the whole space to locate global optimum and avoid becoming trapped in local optima.While in exploit phases, the bacterial scroungers join the resource i.e., the best-sofar solutions found by the producers and perform exploitation of their neighborhood.The ABFO 1 algorithm is based on the animal searching strategy, ACS.Each bacterium in ABFO 1 can be characterized by focused and deeper exploitation of the promising regions and wider exploration of other regions of the search space.The algorithm achieves this by decreasing the run-length unit of each bacterium to encourage exploitation when it enters the promising region with high fitness while increasing it to improve the exploration when the bacterium finds difficulties during exploitation.
This automatic alternate shifting between exploitation and exploration during execution is a noticeable feature of the adaptive mechanisms we propose, because it shows how the algorithm decides by itself when to explore and when to exploit the searching space.
Four widely used benchmark functions have been used to test the ABFO algorithms in comparison with the original BFO, the standard PSO and the real-coded GA.The simulation results are encouraging: the ABFO 0 and ABFO 1 are definitely better than the original BFO for all the test functions and appear to be comparable with the standard PSO and GA.
There are ways to improve our proposed algorithms.Further research efforts should focus on the tuning of the user-defined parameters for ABFO algorithms based on extensive evaluation on many benchmark functions and real-world problems.

Substep 4 . 5 .
Move: let 2.1 .This results in a step of size C i in the direction of the tumble for bacteria i.

2 . 4 Figure 2 a
Figure 2 a shows the contour lines of the Ackley function together with the foraging path of two bacteria that simultaneously start at −1.5, 1.5 and 1.5, −1.5 with different C i .The precision goal was set to 0.1.That is, the parameter setting for BFO is S 2, N c 1000, N s 4, N re 1, N ed 1, C 1 0.1, and C 2 0.01. Figure 2 b illustrates the foraging process of the function values found by these two bacteria over 1000 chemotactic steps.From the chemotactic motions of the two virtual bacteria as in Figure2a , we can observe that the bacterium with larger C i 0.1 can explore the whole search space and stay for a while in several domains containing local optima.It can also escape from these local optima to enter the domain with the global optimum, but it was not able to stop there.On the other hand, the bacteria with the smaller C i 0.01 was attracted into the domain with a local optima, which closed to its start point, and exploited this local minimum for its whole life cycle.That is, if the bacteria with small C i is trapped in a local minima, it is not able to escape from it.Obviously, in the context of original BFO model, the bacteria with large run-length unit have exploring ability i.e., global investigation of the search place while the bacteria with relatively small run-length unit have exploiting skill i.e., the fine search around a local optimum .However, it is difficult to decide which values of static run-length unit is best suited for a given problem.Hence, we introduce the preprogrammed change of this parameter during the evolution to balance exploration and exploitation, which results in significant improvement in performance of the original algorithm.

Figure 3 :
Figure 3: Idealized evolution of the parameter C i for a nonadaptation, b dynamic self-adaptation, and c dynamic adaptation.
8 d , the bacterial scroungers join the sources found by the producers and find a good deal of local optima of Rastrigin function, including the global optimum.
Pseudocode of the dynamic adaptive strategy.
Pseudocode of the dynamic self-adaptive strategy.

Table 1 :
Parameters of the test functions.

Table 2 :
Parameters of the BFO algorithms.