# On Modification and Application of the Artificial Bee Colony Algorithm

Zhanxiang Ye* , Min Zhu** and Jin Wang***

## Abstract

Abstract: Artificial bee colony (ABC) algorithm has attracted significant interests recently for solving the multivariate optimization problem. However, it still faces insufficiency of slow convergence speed and poor local search ability. Therefore, in this paper, a modified ABC algorithm with bees’ number reallocation and new search equation is proposed to tackle this drawback. In particular, to enhance solution accuracy, more bees in the population are assigned to execute local searches around food sources. Moreover, elite vectors are adopted to guide the bees, with which the algorithm could converge to the potential global optimal position rapidly. A series of classical benchmark functions for frequency-modulated sound waves are adopted to validate the performance of the modified ABC algorithm. Experimental results are provided to show the significant performance improvement of our proposed algorithm over the traditional version.

Keywords: Artificial Bee Colony , Bees’ Number Reallocation , Search Equation

## 1. Introduction

Optimization design involves in various fields, such as computer vision [1], natural language processing [2] and industry systems [3], in our modern world. In general, there are two categories of optimization methods, the first one is mathematical technique [4,5], which requires the optimization problem to be differentiable or continuous, and the second category is evolutionary algorithm, which imitates the natural behaviors of living things, including particle swarm optimization (PSO), differential evolution (DE), ant colony algorithm (ACO) and so on. The second category generally does not require the property of the optimization problem.

Among the many evolutionary algorithms, artificial bee colony (ABC) has been successfully applied to antenna design, magnetics, neural network controlling and system engineering. Though it is powerful, it still faces the weakness of slow convergence speed and poor local search capability. In recent years, some research work has been done to improve its performance. The study of Kiran and Fındik [6] has successfully updated direction for each dimension which was recorded and utilized to guide bees’ search in the next generation, and accelerated artificial bee’s convergence speed significantly; Babaoglu [7] proposed a distribution based method for artificial bee colony, the generated new food positions effectively prevent the stagnation phenomenon at the later stage of optimization. Though the literatures mentioned above have improved the ABC algorithm to some extent, it still has a big room for further improvement.

In this paper, we reallocate the bees number of employed bees and onlooker bees to make a better balance between global and local search. The proportion of employed bees is cut down and that of onlooker bees is increased in the colony. Besides, a new search equation aiming at accelerating the convergence speed is also proposed. Since the one dimension search strategy is a good weapon of guaranteeing global optimal [8], we retain it in this paper.

## 2. Artificial Bee Colony

2.1 Initialization

For a given optimization problem, let l and u denote the lower and upper border of the parameters, respectively. Let NP denote the population size and D denote the problem dimension. Each food source can be initialized as:

##### (1.1)
[TeX:] $$F _ { i j } = l _ { i j } + \text { rand } \left( u _ { i j } - l _ { i j } \right)$$

where i represents the ith food source, and j denotes the jth dimension, i=1, 2,...,NP / 2 , j=1, 2,...,D .

2.2 Employed Bees

At each iteration, employed bees search in the whole space and responsible for global search. Each food source corresponds to one employed bee. The search equation is:

##### (1.2)
[TeX:] $$\operatorname { trial } _ { i j } = F _ { i j } + \operatorname { rand } ( - 1,1 ) \left( F _ { r j } - F _ { i j } \right)$$

where Fr is a neighbor of food source Fi and r is selected within the range of [1, NP / 2] , r ≠ i.

For each food source i, its objective value fi and fitness value Fi are calculated. For a minimum optimization problem, the objective value is calculated by the problem’s mathematical expression, and the fitness value is calculated as:

##### (1.3)
[TeX:] $$F _ { i } = \left\{ \begin{array} { l l } { 1 / \left( 1 + f _ { i } \right) } \ { \text { if } \quad f _ { i } \geq 0 } \\ { 1 + a b s \left( f _ { i } \right) } \ { \text { if } \quad f _ { i } < 0 } \end{array} \right.$$

2.3 Onlooker Bees

By employing bees’ search, onlooker bees start their work to make local search around the food sources’ neighbor area. During this phase, onlookers select food sources by roulette wheel selection to make exploitation. The search equation is the same as the expression of (1.2).

## 3. Modified Artificial Bee Colony (MABC)

Two aspects of modification are proposed in this section. The first one is reallocating the percentage of employed bees and onlooker bees in the colony. To be specific, in the modified artificial bee colony, the employed bees take up a quarter of the whole colony, and onlooker bees occupy the remaining part. Under this circumstance, more bees are allocated to execute exploitation search and thus the solution accuracy can be enhanced. Moreover, the roulette wheel selection mechanism is abandoned. The number of food sources equals to that of employed bees, and each food source includes one employed bee and three onlooker bees.

The second aspect that will be modified is the search equation. In the traditional artificial bee colony, employed bee hunts for food positions depending on both the memory of its previous position and a randomly selected neighbor food source, which is much blind and bad for local search [8]. Considering this drawback, we propose a new search equation to make a better balance between exploration and exploitation. The mathematical expression is given as

##### (1.4)
[TeX:] $$\operatorname { trial } _ { i j } = F _ { r j } + r a n d ( - 1,1 ) \left( G _ { j } - F _ { i j } \right)$$

where Fr is a neighbor of food source Fi, its selection is similar to that in Eq. (1.2); G represents the recorded best food source’s position. By introducing the best vector, bees could fly to the potential global point much more rapidly.

To demonstrate the effectiveness of the proposed Eq. (1.4), we further conduct experiments on the Sphere function (f1), Fig. 1 gives the comparison results.

Comparison of population distribution between Eq. (1.2) and Eq. (1.4), at generation = 300 (a) and 500 (b).

As shown in Fig. 1, for the Eq. (1.2) in the traditional artificial bee colony algorithm, its population distribution reaches a stable precision at 10-8 after 500th generations. While the distribution of population of Eq. (1.4) in the MABC decreases rapidly with the increase of iterations, which gets 10-41 and 10-69 after 300th and 500th generations, respectively. Experiment results demonstrate that the proposed search equation could help bees converge to the potential global optima much more rapidly.

## 4. Experiments

In this subsection, integral and comprehensive experiments are conducted for the purpose of testifying the proposed MABC’s effectiveness and achievement.

4.1 Detailed Information for Benchmarks

In this subsection, five well-known benchmark functions are presented to evaluate the evolutionary algorithms. They are two unimodal functions, two multimodal functions and one 2-dimensional test functions. Unimodal function means that there is only one global optimum in the search space, while multimodal function means that there are plenty of global optima in the search space. Their details of these benchmark functions including the formula, search range and optimal value are presented in Table 1.

4.2 Comparison Experiments

To highlight the effectiveness and competitiveness of our proposed MABC algorithm, comparison experiments will be carried out in this subsection. The traditional PSO, DE, ABC, as well as four ABC variants, including the STOC-ABC [5], dABC [6], distABC [7] and NSABC [8], are selected as the comparison algorithms.

In this experiment, the population size is set as 40. For the first ten benchmarks presented in Table 1, all the algorithms are tested on 10 dimensions. For the last benchmark, comparison algorithms are tested on 2 dimensions. The corresponding maximum iteration number and function evaluation number are presented in Table 2. To be fair, all the trials are repeated 50 times, and the corresponding mean fitness value (the first row) and the standard deviation (the second row) are recorded, as presented in Tables 3–4.

Corresponding experiments settings
Comparison results (D=10)
Comparison results (D=2)
Convergence curves. (a) D=10 and (b) D=30.

From the above comparison, it could be easily observed that the proposed MABC algorithm achieves better performance on most cases. For the multimodal functions, as demonstrate in the ABC variants’ experiments, ABC exhibits stronger global search ability than PSO and DE. For the proposed MABC algorithm, it also achieves similar of better outcome than other ABC variants on multimodal functions. For the unimodal functions, MABC obtains obviously improvement compared to the traditional artificial bee colony, and also shows better performance than other comparison algorithms. For the last 2-dimensional test functions, the proposed MABC algorithm attains the best solution accuracy among all the algorithms. All these experimental results demonstrate that the decrease of employed bees’ number does not cripple the exploration ability and the increase of onlooker bees’ number improves the exploitation capability. And the successful performance on low dimensional functions indicates that the proposed MABC algorithm is not limited by problem’s dimension. Besides, for the unimodal functions, except for the solution accuracy presented in the results table, another important evaluation criterion is the convergence speed. Thus we plot the convergence curves of f1, as shown in Fig. 2. f2 is a sphere function, the most representative unimodal function, the convergence speed is the main evaluation criterion for it.

## 5. Conclusion

Regarding the insufficiency of traditional ABC algorithm, in this paper, we proposed a modified artificial bee colony to accelerate the convergence speed and enhance the local search capability. Two modifications were executed. One of them is to reallocate the employed bees and onlooker bees’ number, and the other one is to perfect the search equation. Experimental results demonstrated the superior performance of our proposed MABC algorithm from the perspective of both theory and practicability.

## Acknowledgement

This paper is supported by the Graduate Innovation Project of Jiangsu (No. KYLX15_0840).

## Biography

##### Zhanxiang Ye
https://orcid.org/0000-0002-7334-8804

He received B.S. degree from Zhejiang University, China in 1992 and M.E. degree from Wuhan University, China in 2006. His research interests mainly include information security and routing protocol.

## Biography

##### Min Zhu
https://orcid.org/0000-0002-4510-0385

She received B.S. degree from Nanjing University of Posts and Telecommunications, China in 2002 and M.S. degree from Beijing University of Posts and Telecommunications, China in 2005. Now, she is working toward the Ph.D. degree in Nanjing University of Posts and Telecommunications, China. Her research interests mainly include routing protocol and optimization algorithm design.

## Biography

##### Jin Wang
https://orcid.org/0000-0002-6516-6787

He received the B.S. and M.S. degree from Nanjing University of Posts and Telecommunications, China in 2002 and 2005, respectively. He received Ph.D. degree from Kyung Hee University Korea in 2010. Now, he is a professor in the School of Computer Communication Engineering, Changsha University of Science Technology. His research interests mainly include routing algorithm design, performance evaluation and optimization for wireless ad hoc and sensor networks. He is a Member of IEEE and ACM.

## References

• 1 Y. Nie, Z. Zhang, H. Sun, T. Su, G. Li, "Homography propagation and optimization for wide-baseline street image interpolation," IEEE Transactions on Visualization and Computer Graphics, 2017, vol. 23, no. 10, pp. 2328-2341. doi:[[[10.1109/TVCG.2016.2618878]]]
• 2 A. Sizov, K. A. Lee, T. Kinnunen, "Direct optimization of the detection cost for I-vector-based spoken language recognition," IEEE/ACM Transactions on AudioSpeech, and Language Processing, , 2017, vol. 25, no. 3, pp. 588-597. doi:[[[10.1109/TASLP.2017.2651377]]]
• 3 S. Jiang, M. Liu, J. Hao, "A two-phase soft optimization method for the uncertain scheduling problem in the steelmaking industry," IEEE Transactions on SystemsMan, and Cybernetics: Systems, , 2017, vol. 47, no. 3, pp. 416-431. doi:[[[10.1109/TSMC.2015.2503388]]]
• 4 W. Wu, B. Wang, Y. Zeng, H. Zhang, Z. Yang, Z. Deng, "Robust secure beamforming for wireless powered full-duplex systems with self-energy recycling," IEEE Transactions on Vehicular Technology, 2017, vol. 66, no. 11, pp. 10055-10069. doi:[[[10.1109/TVT.2017.2744982]]]
• 5 W. Wu, B. Wang, "Efficient transmission solutions for MIMO wiretap channels with SWIPT," IEEE Communications Letters, 2015, vol. 19, no. 9, pp. 1548-1551. doi:[[[10.1109/LCOMM.2015.2451179]]]
• 6 M. S. Kiran, O. Findik, "A directed artificial bee colony algorithm," Applied Soft Computing, 2015, vol. 26, pp. 454-462. doi:[[[10.1016/j.asoc.2014.10.020]]]
• 7 I. Babaoglu, "Artificial bee colony algorithm with distribution-based update rule," Applied Soft Computing, 2015, vol. 34, pp. 851-861. doi:[[[10.1016/j.asoc.2015.05.041]]]
• 8 Y. Shi, C. M. Pun, H. Hu, H. Gao, "An improved artificial bee colony and its application," Knowledge-Based Systems, 2016, vol. 107, pp. 14-31. doi:[[[10.1016/j.knosys.2016.05.052]]]

 F Formula Range Optimal value f1 [TeX:] $$\sum _ { i = 1 } ^ { n } x _ { i } ^ { 2 }$$ [-100, 100] 0 f2 [TeX:] $$10 ^ { 6 } * x _ { 1 } ^ { 2 } + \sum _ { i = 2 } ^ { n } x _ { i } ^ { 2 }$$ [-100, 100] 0 f3 [TeX:] $$\sum _ { i = 1 } ^ { n } \left[ x _ { i } ^ { 2 } - 10 \cos \left( 2 \pi x _ { i } \right) + 10 \right]$$ [-5.12, 5.12] 0 f4 [TeX:] $$\frac { 1 } { 4000 } \sum _ { i = 1 } ^ { n } x _ { i } ^ { 2 } - \prod _ { i = 1 } ^ { n } \cos \left( \frac { x _ { i } } { \sqrt { i } } \right) + 1$$ [-600, 600] 0 f5 [TeX:] $$\left( x _ { 1 } ^ { 2 } + x _ { 2 } ^ { 2 } \right) ^ { 0.25 } \left\langle \left\{ \sin \left[ 50 \left( 3 x _ { 1 } ^ { 2 } + x _ { 2 } ^ { 2 } \right) ^ { 0.1 } \right] \right\} ^ { 2 } + 1 \right\rangle$$ [-100,1000] 0

Table 2.

Corresponding experiments settings
 Dimension Maximum iteration number Maximum function evaluation number (NP * maximum iteration number) 2 100 4,000 10 1,000 40,000

Table 3.

Comparison results (D=10)
 F PSO DE ABC STOC-ABC dABC distABC NSABC MABC f1 3.44E-25 1.67E-49 1.04E-16 1.45E-41 3.59E-52 4.12E-76 3.80E-80 1.38E-149 (8.09E-25) (2.46E-49) (3.47E-17) (3.51E-41) (6.72E-52) (1.19E-75) (1.13E-79) (6.14E-149) f2 5.82E-25 6.75E-49 1.38E-16 4.58E-38 7.34E-48 2.46E-74 9.29E-78 2.08E-147 (1.25E-24) (1.45E-48) (5.62E-17) (1.40E-37) (3.08E-47) (7.98E-74) (3.23E-77) (9.27E-147) f6 2.74E+00 1.14E+01 0 5.33E-16 0 0 0 0 (1.53E+00) (2.87E+00) (0) (2.38E-15) (0) (0) (0) (0) f7 9.51E-02 8.43E-02 1.03E-02 9.04E-03 1.01E-02 9.79E-03 1.07E-02 9.70E-03 (4.65E-02) (6.87E-02) (3.19E-03) (1.64E-03) (2.64E-03) (2.03E-03) (4.08E-03) (2.74E-03)

Table 4.

Comparison results (D=2)
 F PSO DE ABC STOC-ABC dABC distABC NSABC MABC f5 8.05E-10 6.92E-24 1.12E-17 2.09E-20 1.37E-25 1.40E-49 2.08E-26 6.00E-76 (1.51E-09) (2.10E-23) (1.17E-17) (5.91E-20) (5.38E-25) (2.72E-49) (8.35E-26) (1.80E-75)
Comparison of population distribution between Eq. (1.2) and Eq. (1.4), at generation = 300 (a) and 500 (b).
Convergence curves. (a) D=10 and (b) D=30.