Artificial Bee Colony Algorithm with Time-Varying Strategy

1Department of Management Science, College of Management, Shenzhen University, Shenzhen 518060, China 2Research Institute of Business Analytics & Supply Chain Management, Shenzhen University, Shenzhen 518060, China 3Division of Computer Science, University of Nottingham Ningbo China, Ningbo 315100, China 4International Doctoral Innovation Centre, University of Nottingham Ningbo China, Ningbo 315100, China 5Department of Electrical & Electronic Engineering, Xi’an Jiaotong-Liverpool University, Suzhou 215123, China


Introduction
Swarm intelligence concerns the design of intelligent optimization algorithms by taking inspirations from the collective behavior of social insects [1].During the past decades, swarm intelligence has shown great success for solving complicated problems.The problems to be optimized by swarm intelligence algorithms do not need to be mathematically represented as continuous, convex, and/or differentiable functions; they can be represented in any form [2]. Artificial bee colony (ABC) algorithm developed by Karaboga in 2005 is a recent addition into this category [3][4][5].
ABC algorithm is inspired by the intelligent behavior of honey bees seeking quality food sources [3,[6][7][8].In a short span of less than 10 years, ABC has already been demonstrated as a promising technique for solving global optimization problems [9,10].Numerical comparisons and many engineering applications demonstrated that ABC could obtain good search results [11].Due to its simplicity, flexibility, and outstanding performance, ABC has captured increasing interests of the swarm intelligence research community and been applied to many real-world areas, such as numerical optimization [6,10], neural network training [7,12], finance forecasting [13,14], production scheduling [15][16][17], data clustering [18,19], image segmentation [20,21], service selection problem [22], and power system optimization [23].
However, like its counterpart population-based stochastic algorithms, it still has some inherent pitfalls [24][25][26].The convergence speed of ABC is slower than those of the representative population-based stochastic algorithms, such as DE and PSO [27].Moreover, ABC suffers from premature convergence while dealing with certain complicated problems [28].Several ABC variants have been proposed with the aim of overcoming these pitfalls.These ABC variants can be generally categorized into three groups: (1) first, the parameters of configuration tuning [29][30][31]; (2) second, the ABC algorithm hybridizing with other evolutionary optimization operators to enhance performance [10,32,33]; (3) third, the design of new learning strategy by modifying the search equation of the basic ABC algorithm [24,25,34].
It is recognized that exploration and exploitation are the two most important factors affecting a population-based optimization algorithm's performance [6,35].Exploration refers to the ability of a search algorithm to investigate the unknown regions in the search space in order to have high probability to discover good promising solutions.Exploitation, on the other hand, refers to the ability to concentrate the search around a promising region in order to refine a candidate solution [36,37].A good populationbased optimization algorithm should properly balance these two conflictive objectives [38].It is observed that ABC has good exploration ability but poor exploitation ability [24], which may impede ABC algorithm from proceeding towards a global optimum even though the population has not converged to a local optimum.
The colony of the ABC algorithm contains three groups of bees: employed bees, onlookers, and scouts [3].In the employed bees phase of ABC algorithm, the algorithm focuses on the explorative search indicated by the solution updating scheme, which uses the current solution and a randomly chosen solution.A fitness-based probabilistic selection scheme is used in the onlooker phase, which indicates the exploitation tendency of the algorithm.In the original ABC algorithm, it is assumed that half of the colony consists of the employed bees, and the rest half consists of the onlookers [3].In other words, the ratio of the employed and onlooker bees is the same, 1 : 1.
The basic ABC algorithm is easy to tune with few parameters but lacks effective and efficient ways to control the exploration ability and exploitation ability.In the present study, we propose an easy modification to the structure of the basic ABC algorithms in an attempt to balance their exploration and exploitation abilities.Compared with the basic ABC algorithm, we added a new parameter.The core idea of the modification is to design a proper mechanism, adjusting the ratio of the employed and onlooker bees with time.The proposed algorithms are called ABC with linear versus nonlinear time-varying strategy (ABC-LTVS and ABC-NTVS, resp.).The objective of this development is to enhance the global exploration in the early search and to encourage the solution to converge toward the global optima at the later search.
The reminder of this paper is organized as follows: Section 2 briefly introduces the basic ABC algorithm.The proposed algorithms, ABC-LTVS and ABC-NTVS, are elaborated in Section 3. In Section 4, comprehensive experimental studies are conducted on 21 benchmark functions in 30dimension and 50-dimension problems to verify the effectiveness of the proposed algorithms.Finally, conclusions are presented in Section 5.

Basic ABC Algorithm
The ABC algorithm is a recently introduced optimization algorithm proposed by Karaboga [3,39,40], which is inspired by the intelligent foraging behavior of the honeybee swarm.In the ABC algorithm, there are two components: the foraging artificial bees and the food source [3,39].The position of a food source represents a possible solution.The nectar amount of a food source corresponds to the fitness of the associated solution.In the basic ABC algorithm, the colony of artificial bees contains three groups of bees: employed bees, onlookers, and scouts.The employed bees are responsible for searching available food sources and pass the food information to the onlooker bees [3,40].The onlookers select good sources from those found by the employed bees to further search the foods.When the fitness of the food sources is not improved through a predetermined number of cycles, denoted as limit, the food source is abandoned by its employed bee, and then, the employed bee becomes a scout and starts to search for a new food source in the vicinity of the hive.
After producing food sources and assigning them to the employed bees.There is only one employed bee on each food source.In the employed bee phase of ABC, each employed bee tries to find a better quality food source based on ⃗   .A new trial food source, denoted as ⃗   = [ 1 ,  2 , . . .,   ], is calculated from the equation below [3,6]: where  is a randomly generated whole number in the range [1, ];  is a random number uniformly distributed in the range [−1, 1]; and  is the index of a randomly chosen food source satisfying  ̸ = .After ⃗   is obtained, it will be evaluated and compared to ⃗   .If the fitness of ⃗   is better than that of ⃗   , the bee will forget the old food source ⃗   and memorize the new one.Otherwise, it keeps ⃗   in her memory.After all employed bees have finished their search, they share the nectar and position information of their food sources with the onlookers.
Each onlooker bee selects a food source of an employed bee to improve it.The roulette selection mechanism is performed by using (3) [3,6]  where   is the probability of food source ⃗   being selected by an onlooker bee and fit( ⃗   ) is the fitness of ⃗   .The fitness of the food sources are defined as [3,6] fit where ( ⃗   ) is the objective function value of ⃗   .Once the onlooker has selected a food source, a new candidate food source can be obtained by (2).As in the employed bees, the greedy selection between these two food sources was performed.
If a food source, ⃗   , cannot be improved for a predetermined number of cycles, referred to as limit, this food source is abandoned.Then, the scout produces a new food source randomly according to (1) to replace ⃗   .The detailed pseudocode of the ABC algorithm is shown in Algorithm 1 [3,40].

Time-Varying Strategy.
During the process of the employed bees, each food source is assigned with one employed bee.The onlooker bees select the food source based on the fitness values, which is similar to "route wheel selection" in genetic algorithm.Due to this selection scheme, it is assured that the food sources with higher fitness value have more chance to be selected by the onlooker bees.It facilitates improving the quality of these food sources.Thus, the onlooker bees are more concentrated on the exploitation ability than the employed bees.In general, for population-based optimization algorithms, the exploration is typically preferred at the early stages of the search but is required to gradually give ways to exploitation in order to find the optimum solution efficiently [41].In the ABC algorithm, the population size is fixed.With a large number of employed bees and relatively a small number of onlookers at the early search, it is helpful to move around the search space and enhance the exploration.On the other hand, the small number of the employed bees and the large number of the onlookers allow the individuals to converge to the global optima in the later part of the optimization.In the basic ABC algorithm, the employed bees and onlooker bees are equal to each other; that is, the ratio between the number of the employed bees and the number of the onlookers is 1 : 1. Considering those concerns, we proposed a time-varying strategy, in which the ratio between the number of the employed bees and the number of the onlookers varies with time in this paper.
The total number of the colony size, employed bees, and onlooker denoted as NP, NP  , and NP  respectively, and it holds that NP = NP  + NP  .The ratio between NP  and NP  is denoted as   ,   = NP  /NP  .A large value of   is conducive to global exploration.Conversely, it facilitates local exploitation for fine-tuning a local search.Intuitively, a lineardecreasing time-varying strategy (LTVS) may contribute to balance the exploration and exploitation during the entire search.A LTVS is proposed as the follows: where  max and  min are the maximum and minimum value of   , respectively; fitc is the current number of function evaluations; and FEs is the total number of function evaluations.The number of employed bees is set to the round value of   × NP, NP  = round(  × NP), where round() is the round function with zero decimal place.If the number of employed bees NP  is greater than the number of food source SN, each employed bee is assigned to one food source randomly in the first SN employed bees, and each of the rest of employed bees is placed at a randomly selected food source.When NP  is smaller than SN, all employed bees randomly select food sources to search.
To investigate the dynamics of population distribution in basic ABC and ABC with LVTS, we herein take a typical multimodal function, Rastrigin function, with 2D dimension as an example.Figures 1 and 2 show the population distribution of Rastrigin function observed at various search phases of basic ABC and ABC with LTVS, respectively.It is  noted that the value of  max and  min is set to 0.8 and 0.3 in ABC with LTVS in this experiment.Figures 1 and 2 show the population distribution at 5th, 10th, and 20th iteration when the 2-dimensional Rastrigin function was optimized by the original ABC and ABC with LTVS, respectively.Compared with the original ABC, we can obtain that the population in ABC with LTVS distributed in a wider range of search space at a relatively small iteration and gradually gathered around the global optimum.In other words, LVTS can explore in the search space in the early search stage, while converging to the global optimum with fast speed in the later search.
It would be interesting to know whether the nonlinear variation of   can enhance the performance of the ABC algorithm.In the preset study, we proposed a nonlineardecreasing time-varying strategy (NTVS).This strategy is given as the following equation: where  is the nonlinear modulation index.Figure 3    it shows that the settings of  max = 0.7 and  min = 0.2 are the best choice.Therefore, the parameters of  max = 0.7 and  min = 0.2 are used in LTVS.We try to obtain better performance with the NTVS of  ̸ = 1 having  max and  min kept fixed to their values obtained for the linear case.Table 3 shows the performance evaluation of the resultant system with different values of , keeping FEs = 7 × 10 4 .From Tables 3 and 4, we can observe that the best result is obtained with  = 1.2.).The parameters of all benchmark functions are described in Appendix.

Experimental Study
To validate the effectiveness of the proposed time-varying strategy, experiments were conducted to compare ABC with ABC-LTVS and ABC-NTVS on 21 benchmark functions.In order to make a fair comparison, the colony size for all algorithms was set to 60. FEs are used as the stop criteria for all algorithms and it is set to be 7 × 10 4 for solving 30D problems and 1.2×10 5 for solving 50D problems, respectively.The parameter, limit, is set to 200 [42].All experiments on each benchmark function were run 25 times independently.

Experimental Results for 30D Problems.
The comparative results obtained by ABC, ABC-LTVS, and ABC-NTVS are presented in Table 5.The best mean results on each problem among all algorithms are given in bold.In order to determine whether the results obtained by ABC-LTVS and ABC-NTVS are statistically different from the results generated by ABC algorithms, a two-tailed -test with 48 degrees of freedom is used at a significant level of 0.05.Values of "1, " "0, " and "−1" in columns "ℎ 1 " and "ℎ 2 " in Table 5, respectively, denote that ABC-LTVS and ABC-NTVS perform significantly better than, almost the same as, and significantly worse than ABC algorithm.In order to give visualized comparisons of the involved algorithms, the convergence graphs of the best and mean function values for each ABC algorithm regarding all benchmark functions are shown in Figures 4, 5, and 6.In these figures, each curve represents the variation of mean value of error over the FEs for a specific ABC algorithm.For solving unimodal functions, ABC-NTVS achieves the highest solution accuracy on  1 ,  2 ,  3 , and  5 , and ABC-LTVS obtains the best solution on  4 .ABC-LTVS and ABC-NTVS perform significantly better than ABC algorithm on  1 ,  2 , and  3 .On multimodal problems, there are many local minima and it is not easy to find the global optima.ABC-LTVS and ABC-NTVS are shown to offer better performance than ABC algorithm on these problems.ABC-LTVS can find the best solution on  6 ,  8 , and  13 and ABC-NTVS performs the best on  7 ,  9 ,  10 ,  11 , and  12 .ABC, ABC-LTVS, and ABC-NTVS obtain the similar performance on  14 .The performance of ABC-LTVS and ABC-NTVS are significantly better than that of ABC algorithm on these multimodal problems except ABC-NTVS for solving  8 .
For most of optimization algorithms, their performance will sharply decrease when solving the shifted and/or rotated problems.Table 5 shows the results on the rotated and/or shifted functions.The results appear that these three ABC algorithms are affected.We can observe that ABC-LTVS and ABC-NTVS still obtain relatively good performance.ABC-LTVS and ABC-NTVS performs significantly better than ABC algorithms on  18 ,  19 , and  21 .With respect to the stability of algorithms, ABC-LTVS and ABC-NTVS show the good stability as compared to ABC algorithms.The standard deviations of solutions found by ABC-LTVS and ABC-NTVS are small for the most functions.On the whole, ABC-LTVS and ABC-NTVS exhibit the accurate convergence precision on almost all the benchmark, which indicates the effectiveness of the proposed time-varying strategy.Moreover, experimental results demonstrate that ABC-NTVS slightly outperforms ABC-LTVS.

Experimental Results for 50D Problems.
The experiments conducted on 50D problems and the results for solving unimodal, multimodal, and shift and/or rotate problems are presented in Table 6.As the convergence graphs of 50D are similar to the 30D problems and space limitation, they are not given.Compared with ABC algorithm, ABC-LTVS and ABC-NTVS can still obtain high-quality solutions under 50D problems, which can be seen from Table 6.The meaning of column "ℎ 1 " and "ℎ 2 " in Table 6 is the same as the The experiments conducted on 50D problems and the results for solving unimodal, multimodal, and shift and/or rotate problems are presented in Table 6.As the convergence graphs of 50D are similar to the 30D problems and space limitation, they are not given.Compared with ABC algorithm, ABC-LTVS and ABC-NTVS can still obtain highquality solutions under 50D problems, which can be seen from Table 6.The meaning of column "ℎ 1 " and "ℎ 2 " in Table 6 is the same as the Table 5.According to the -tests results, ABC-LTVS performs significantly better than ABC algorithm on all benchmark functions except  5 ,  16 , and  17 , so does ABC-NTVS except  5 ,  8 , and  17 .

GABC with Time-Varying Strategy.
Inspired by particle swarm optimization (PSO), Zhu and Kwong [24] proposed a popular ABC variant, called Gbest-guided artificial bee colony (GABC).GABC incorporates the information of global best (gbest) position into (2).The experimental results have shown that GABC algorithm outperforms the basic ABC algorithm.To test the effect of the timevarying strategy, we applied the proposed LTVS and NTVS into GABC algorithm, yielding GABC-LTVS and GABC-NTVS algorithms, respectively.Experiments are conducted on 30D and 50D benchmark functions to test whether the proposed time-varying strategy is effective in GABC algorithm.The parameters setting of GABC algorithm is in accordance with the original reference except the colony     size and FEs, the settings of which is same as the previous experiment.
Tables 7 and 8 give the experimental results on 30D and 50D problems, respectively.The best results on each problem among these three GABC algorithms are shown in bold.In addition, the columns "ℎ 1 " and "ℎ 2 " in Tables 7 and 8 are used to determine the statistical significance of the difference obtained by GABC with those yielded by the GABC-LTVS and GABC-NTVS using two-tailed -tests, respectively.According to the results of -tests shown in Tables 7 and 8, GABC-LTVS and GABC-NTVS can find more accurate solutions, which are significantly better than those of GABC on about half of all benchmark functions regardless of problem dimensions.

Conclusions
In order to make a balance between the exploration and exploitation in ABC algorithm, a time-varying strategy has been developed.The proposed strategy is implemented through making the ratio between the number of employed bees and the numbers of onlooker bees vary with time.We have developed the two types of time-varying strategies of LTVS and NTVS.Moreover we have examined and fine-tuned the parameters settings of LTVS and NTVS for better performance.Comprehensive experiments have demonstrated the effectiveness of the proposed time-varying strategy in ABC and GABC algorithms.The modifications proposed in the present work are general enough to be

Figure 1 :
Figure 1: Population distribution observed at various stages in ABC.

Figure 2 : 6 Figure 3 :
Figure 2: Population distribution observed at various stages in ABC with time-varying strategy.
[42]rder to investigate the influence of  max and  min in LTVS, six combinations for setting the values of  max and  min are tested on 8 relevant functions including 3 typical unimodal functions,  1 ,  2 , and  3 , and 5 typical multimodal functions,  6 ,  7 ,  8 ,  9 , and  10 , with 30 dimensions.The colony size is set to 60, the maximum functions evaluations are 7 × 10 4 , and the limit is set to 200[42].Experimental results of 25 shows typical variations of   with function evaluations for different settings of .With  = 1, this strategy becomes a special case of LTVS.With  > 1,   varied in a convex function manner.Compared with LTVS, it can be seen that   decreases in a relative-slow speed in the early search while in a faster speed in the later search.Conversely, with  < 1,   varied in a concave function manner.3.2.Parameters Tuning of Time-Varying Strategy.independenttrialsarepresented in Table1.In Table1, "Mean" indicates the mean of function values, "SD" stands for the standard deviation, and "Rank" refers to the performance level of the certain function in the six combinations of  max and  min .The best mean function value of six combinations is marked in boldface.From the rank results given inTable 2,

Table 1 :
Experimental results of different combination of  max and  min in LTVS.

Table 2 :
Rank results of the different combinations of  max and  min in LTVS.
[43]Benchmark Functions and Parameters Settings.In order to test the proposed algorithm, a diverse set of 21 benchmark functions are used to conduct the experiments.These benchmark functions can be classified into three groups: Group 1, Group 2, and Group 3. The first five functions  1 - 5 are unimodal functions in Group 1.The next group includes ten multimodal functions with many local optima which are used to test the global search capability in avoiding premature convergence.Note that  6 (Rosenbrock) is a unimodal problem in 2D or 3D search space but is a multimodal problem in higher dimensions.Rotated and/or shifted functions belong to Group 3.  16 and  17 are rotated functions, in which the original variable ⃗  is rotated by left multiplying the orthogonal matrix [43], ⃗  =  × ⃗ . is used to increase the complexity of the function by changing separable functions to nonseparable functions without affecting the shape of the functions.The global optima of  18 and  19 are shifted to different numerical values for different dimensions

Table 3 :
Experimental results of different setting of  in NTVS.

Table 4 :
Rank results of different setting of  in NTVS.

Table 5
. It is noted that ABC-NTVS, from the mean of the results, performs worse than ABC on  8 , but not statistically significantly.According the -tests results, ABC-LTVS performs significantly better than ABC algorithm on all benchmark functions except  4 ,  16 , and  17 , so does ABC-NTVS except  4 ,  8 , and  17 .

Table 7 :
Experimental results for 30D problem of GABC algorithms.

Table 8 :
Experimental results for 50D problem of GABC algorithms.