# Honey Bees Inspired Optimization Method: The Bees Algorithm

^{1}

^{2}

^{3}

^{4}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Swarm-Optimization Algorithms

#### 2.1. Evolutionary Algorithms

#### 2.2. Particle Swarm Optimization

#### 2.3. Ant Colony Optimization

#### 2.4. Bee-Inspired Algorithms

## 3. The Foraging Behavior of Honey Bees

#### The Waggle Dance of Honey Bees

**Figure 1.**(

**a**) Orientation of waggle dance with respect to the sun; (

**b**) Orientation of waggle dance with respect to the food source, hive and sun; (

**c**) The Waggle Dance and followers.

## 4. The Bees Algorithm

Parameter | Symbols |
---|---|

Number of scout bees in the selected patches | n |

Number of best patches in the selected patches | m |

Number of elite patches in the selected best patches | e |

Number of recruited bees in the elite patches | nep |

Number of recruited bees in the non-elite best patches | nsp |

The size of neighborhood for each patch | ngh |

Number of iterations | Maxiter |

Difference between value of the first and last iterations | diff |

**Figure 4.**(

**a**) The initially selected n patches and their evaluated fitness values; (

**b**) Selection of elite and non-elite best patches; (

**c**) Recruitment of forager bees to the elite and non-elite best locations; (

**d**) Results from basic Bees-inspired Algorithm (BA) after local and global search.

## 5. Improved Bees Algorithm by Adaptive Neighborhood Search and Site Abandonment Strategy

## 6. Comparison between the ANSSA-Based BA and Other Optimization Methods

#### 6.1. Experimental Results

- Advantages:
- Feasibility of finding global optimum for several problems,
- Availability to combine the hybrid algorithms with EA and others,
- Implementation with several optimization problems,
- Availability for real and binary problems.

- Disadvantages:
- Slow convergence rate,
- Stability and convergence of algorithm is based on recombination and mutation rates,
- The algorithm may converge to a sub-optimal solution (risk of premature convergence),
- Algorithm has a weakness on local search,
- It has a difficult encoding scheme.

- Advantages:
- The algorithm can easily be implemented;
- The global search of the algorithm is efficient,
- The dependency on the initial solution is smaller,
- It is a fast algorithm,
- The algorithm has less parameter for tuning.

- Disadvantages;
- The algorithm has a weakness regarding local search,
- It has a slow convergence rate,
- It may get trapped in local minima for hard optimization problems.

- Disadvantages;
- Random initialization,
- The algorithm has several parameters,
- Parameters need to be tuned,
- Probabilistic approach in the local search.

- Advantages:
- The algorithm has local search and global search ability,
- Implemented with several optimization problems,
- Easy to use,
- Available for hybridization combination with other algorithms.

- Disadvantages:
- Random initialization,
- The algorithm has several parameters,
- Parameters need to be tuned.

No | Function Name | Interval | Function | Global Optimum |
---|---|---|---|---|

1 | Goldstein &Price (2D) | [−2, 2] | X = [0,−1] F (X) = 3 | |

2 | Schwefel (2D) | [−500, 500] | X = [0,0] F(X) = −837.658 | |

3 | Schaffer (2D) | [−100, 100] | X = (0, 0) F(X) = 0 | |

4 | Rosenbrock (10D) | [−1.2, 1.2] | X = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] F(X) = 0 | |

5 | Sphere (10D) | [−5.12, 5.12] | X = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] F(X) = 0 | |

6 | Ackley (10D) | [−32, 32] | X = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] F(X) = 0 | |

7 | Rastrigin (10D) | [−5.12, 5.12] | X = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] F(X) = 0 | |

8 | Martin & Gaddy (2D) | [0, 10] | X = [5, 5] F(X) = 0 | |

9 | Easom (2D) | [−100, 100] | X = [π, π] F(X) = -1 | |

10 | Griewank (10D) | [−600, 600] | X = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100] F(X) = 0 |

Parameters | Value |
---|---|

Number of Scout Bees in the Selected Patches (n) | 50 |

Number of Best Patches in the Selected Patches (m) | 15 |

Number of Elite Patches in the Selected Best Patches (e) | 3 |

Number of Recruited Bees in the Elite Patches (nep) | 12 |

Number of Recruited Bees in the Non-Elite Best Patches (nsp) | 8 |

The Size of neighborhood for Each Patches (ngh) | 1 |

Number of Iterations (Maxiter) | 5000 |

Difference between the First Iteration Value and the Last Iteration (diff) | 0.001 |

Shrinking Constant (sc) | 2 |

Number of Repetitions for Shrinking Process (rep_nshr) | 10 |

Number of Repetitions for Enhancement Process (rep_nenh) | 25 |

Number of Repetitions for Site Abandonment (rep_naban) | 100 |

**Table 4.**The test parameters for the Evolutionary Algorithms (EA) [38].

Parameters | Crossover | No crossover |
---|---|---|

Population size | 100 | |

Evaluation cycles (max number) | 5000 | |

Children per generation | 99 | |

Crossover rate | 1 | 0 |

Mutation rate (variables) | 0.05 | 0.8 |

Mutation rate (mutation width) | 0.05 | 0.8 |

Initial mutation interval width α (variables) | 0.1 | |

Initial mutation interval width ρ (mutation width) | 0.1 |

**Table 5.**The test parameters for the Particle Swarm Optimization (PSO) [38].

Parameters | Value |
---|---|

Population size | 100 |

PSO cycles (max number) T | 5000 |

Connectivity | See Table 6 |

Maximum velocity | See Table 6 |

C_{1} | 2 |

C_{2} | 2 |

w_{max} | 0.9 |

w_{min} | 0.4 |

**Table 6.**The test parameters for the PSO [38].

Velocity of the each connectivity (Connectivity, u) | Max particle velocity u | |||
---|---|---|---|---|

Connectivity (number of neigbourhood) | (2, 0.005) | (2, 0.001) | (2, 0.05) | (2, 0.1) |

(10, 0.005) | (10, 0.001) | (10, 0.05) | (10, 0.1) | |

(20, 0.005) | (20, 0.001) | (20, 0.05) | (20, 0.1) | |

(100, 0.005) | (100, 0.001) | (100, 0.05) | (100, 0.1) |

**Table 7.**The test parameters for the Artificial Bee Colony (ABC) [38].

Parameters | Value |
---|---|

Population size | 100 |

ABC cycles (max number) | 5000 |

Employed bees n_{e} | 50 |

Onlooker bees n_{e} | 49 |

Random scouts | 1 |

Stagnation limit for site abandonment stlim | 50xDimenstion |

No. | PSO | EA | ABC | BA | ANSSA-BA | |||||
---|---|---|---|---|---|---|---|---|---|---|

Avg. Abs. Dif. | Std. Dev. | Avg. Abs. Dif. | Std. Dev. | Avg. Abs. Dif. | Std. Dev. | Avg. Abs. Dif. | Std. Dev. | Avg. Abs. Dif. | Std. Dev. | |

1 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0001 | 0.0000 | 0.0003 | 0.0000 | 0.0001 |

2 | 4.7376 | 23.4448 | 4.7379 | 23.4448 | 0.0000 | 0.0000 | 0.0000 | 0.0005 | 0.0003 | 0.0007 |

3 | 0.0000 | 0.0000 | 0.0009 | 0.0025 | 0.0000 | 0.0000 | 0.0000 | 0.0003 | 0.0001 | 0.0005 |

4 | 0.5998 | 1.0436 | 61.5213 | 132.6307 | 0.0965 | 0.0880 | 44.3210 | 112.2900 | 0.0000 | 0.0003 |

5 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0003 | 0.0000 | 0.0000 |

6 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 1.2345 | 0.3135 | 0.0063 | 0.0249 |

7 | 0.1990 | 0.4924 | 2.9616 | 1.4881 | 0.0000 | 0.0000 | 24.8499 | 8.3306 | 0.0002 | 0.0064 |

8 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0003 | 0.0000 | 0.0000 |

9 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 2.0096 | 0.0000 | 0.0003 | 0.0000 | 0.0002 |

10 | 0.0008 | 0.0026 | 0.0210 | 0.0130 | 0.0052 | 0.0078 | 0.3158 | 0.1786 | 0.0728 | 0.0202 |

**Table 9.**Average evaluation of proposed algorithm compared with other well-known optimization techniques.

No. | PSO | EA | ABC | BA | ANSSA-BA | |||||
---|---|---|---|---|---|---|---|---|---|---|

Avg. evaluations | Std. Dev. | Avg. evaluations | Std. Dev. | Avg. evaluations | Std. Dev. | Avg. evaluations | Std. Dev. | Avg. evaluations | Std. Dev. | |

1 | 3,262 | 822 | 2,002 | 390 | 2,082 | 435 | 504 | 211 | 250,049 | 0 |

2 | 84,572 | 90,373 | 298,058 | 149,638 | 4,750 | 1,197 | 1,140 | 680 | 250,049 | 0 |

3 | 28,072 | 21,717 | 219,376 | 183,373 | 21,156 | 13,714 | 121,088 | 174,779 | 250,049 | 0 |

4 | 492,912 | 29,381 | 500,000 | 0 | 497,728 | 16,065 | 935,000 | 0 | 30,893.2 | 48,267.4 |

5 | 171,754 | 7,732 | 36,376 | 2,736 | 13,114 | 480 | 285,039 | 277,778 | 25,098.3 | 36,483.4 |

6 | 236,562 | 9,119 | 50,344 | 3,949 | 18,664 | 627 | 910,000 | 0 | 234,190.7 | 54.086.8 |

7 | 412,440 | 67,814 | 500,000 | 0 | 207,486 | 57,568 | 885,000 | 0 | 93,580 | 97,429.1 |

8 | 1,778 | 612 | 1,512 | 385 | 1,498 | 329 | 600 | 259 | 53,005.7 | 66,284.5 |

9 | 16,124 | 15,942 | 36,440 | 28,121 | 1,542 | 201 | 5,280 | 6,303 | 250,049 | 0 |

10 | 290,466 | 74,501 | 490,792 | 65,110 | 357,438 | 149,129 | 4,300,000 | 0 | 122,713.17 | 99,163.3 |

#### 6.2. Discussion

**Table 10.**The statistically significant difference between the adaptive neighborhood sizes and site abandonment in (ANSSA)-based BA and the basic BA.

No. | Function | Significance between the basic BA and the improved BA | |
---|---|---|---|

Significant ( α < 0.05) | α | ||

1 | Goldstein & Price (2D) | No | 0.200 |

2 | Schwefel (2D) | No | 0.468 |

3 | Schaffer (2D) | No | 0.801 |

4 | Rosenbrock (10D) | No | 0.358 |

5 | Sphere (10D) | No | 0.433 |

6 | Ackley (10D) | Yes | 0.020 |

7 | Rastrigin (10D) | Yes | 0.007 |

8 | Martin & Gaddy (2D) | No | 0.358 |

9 | Easom (2D) | No | 0.563 |

10 | Griewank (10D) | Yes | 0.020 |

## 7. Conclusions

## Acknowledgements

## Conflicts of Interest

## References

- Bonabeau, E.; Dorigo, M.; Theraulaz, G. Swarm Intelligence: From Natural to Artificial Systems; Oxford University Press: New York, NY, USA, 1999. [Google Scholar]
- Koc, E. The Bees Algorithm Theory, Improvements and Applications. Ph.D Thesis, Cardiff University, Cardiff, UK, 2010. [Google Scholar]
- Back, T. Evolutionary Algorithms in Theory and Practice: Evolution Strategies, Evolutionary Programming, Genetic Algorithms; Oxford University Press on Demand: New York, NY, USA, 1996. [Google Scholar]
- Kennedy, J.; Eberhart, R. Particle Swarm Optimization. In Proceedings of the IEEE International Conference on Neural Networks, Perth, Australia, 27 November–1 December 1995; pp. 1942–1948.
- Tsai, P.-W.; Pan, J.-S.; Liao, B.-Y.; Chu, S.-C. Enhanced artificial bee colony optimization. Int. J. Innovative Comput. Inf. Control
**2009**, 5, 5081–5092. [Google Scholar] - Tsai, P.-W.; Khan, M.K.; Pan, J.-S.; Liao, B.-Y. Interactive artificial bee colony supported passive continuous authentication system. IEEE Syst. J.
**2012**. [Google Scholar] [CrossRef] - Dorigo, M.; Di Caro, G. Ant Colony Optimization: A New Meta-Heuristic. In Proceedings of the 1999 Congress on Evolutionary Computation, Washington, DC, USA, 6–9 July 1999.
- Pham, D.T.; Ghanbarzadeh, A.; Koc, E.; Otri, S.; Rahim, S.; Zaidi, M. The Bees Algorithm, Technical Note; Manufacturing Engineering Center, Cardiff University: Cardiff, UK, 2005. [Google Scholar]
- Pham, D.T.; Ghanbarzadeh, A. Multi-Objective Optimisation Using the Bees Algorithm. In Proceedings of the IPROMS 2007 Conference, Cardiff, UK, 2–13 July 2007.
- Pham, D.T.; Soroka, A.J.; Ghanbarzadeh, A.; Koc, E.; Otri, S.; Packianather, M. Optimising Neural Networks for Identification of Wood Defects Using the Bees Algorithm. In Proceedings of the 2006 IEEE International Conference on Industrial Informatics, Singapore, 16–18 August, 2006; pp. 1346–1351.
- Pham, D.T.; Afify, A.A.; Koc, E. Manufacturing Cell Formation Using the Bees Algorithm. In Proceedings of the Innovative Production Machines and Systems Virtual Conference, Cardiff, UK, 2–13 July 2007.
- Pham, D.T.; Koc, E.; Lee, J.Y.; Phrueksanant, J. Using the Bees Algorithm to Schedule Jobs for a Machine. In Proceedings of the 8th International Conference on Laser MetrologyCMM and Machine Tool Performance, Cardiff, UK, 2–13 July 2007; pp. 430–439.
- Pham, D.T.; Otri, S.; Afify, A.; Mahmuddin, M.; Al-Jabbouli, H. Data Clustering Using the Bees Algorithm. In Proceedings of the 40th CIRP International Manufacturing Systems Seminar, Liverpool, UK, 30 May–1 June 2007.
- Pham, D.T.; Soroka, A.J.; Koc, E.; Ghanbarzadeh, A.; Otri, S. Some Applications of the Bees Algorithm in Engineering Design and Manufacture. In Proceedings of International Conference On Manufacturing Automation (ICMA 2007), Singapore, 28–30 May 2007.
- Yuce, B. Novel Computational Technique for Determining Depth Using the Bees Algorithm and Blind Image Deconvolution. Ph.D Thesis, Cardiff University, Cardiff, UK, 2012. [Google Scholar]
- Mastrocinque, E.; Yuce, B.; Lambiase, A.; Packianather, M.S. A Multi-Objective Optimisation for Supply Chain Network Using the Bees Algorithm. Int. J. Eng. Bus. Manage.
**2013**, 5, 1–11. [Google Scholar] - Fogel, D.B. Evolutionary Computation: Toward a New Philosophy of Machine Intelligence, 2nd ed.; IEEE Press: New York, NY, USA, 2000. [Google Scholar]
- Li, L.; Liu, F. Group Search Optimisation for Application in Structural Design; Springer: Berlin, Germany, 2011. [Google Scholar]
- Kennedy, J.; Ebernhart, R. Swarm Intelligence; Morgan Kaufmann Publishers: San Francisco, CA, USA, 2001. [Google Scholar]
- Panigrahi, B.K.; Lim, M.H.; Shi, Y. Handbook of Swarm Intelligence-Concepts, Principles and Applications; Springer: Berlin, Germany, 2011. [Google Scholar]
- Sumathi, S.; Surekha, P. Computational Intelligence Paradigms Theory and Applications Using MATLAB; CRC Press: Boca Raton, FL, USA, 2010. [Google Scholar]
- Dorigo, M.; Maniezzo, V.; Colorni, A. Ant system: Optimization by a colony of cooperating agents. IEEE Trans. Syst. Man Cybern. B
**1996**, 26, 29–41. [Google Scholar] [CrossRef] - Haddad, O.B.; Afshar, A.; Marino, M.A. Honey-Bees mating optimization (HBMO) algorithm: A new heuristic approach for water resources optimization. Water Resour. Manage.
**2006**, 20, 661–680. [Google Scholar] [CrossRef] - Yang, C.; Chen, J.; Tu, X. Algorithm of Fast Marriage in Honey Bees Optimization and Convergence Analysis. In Proceedings of the IEEE International Conference on Automation and Logistics, ICAL 2007, Jinan, China, 18–21 August 2007; pp. 1794–1799.
- Curkovic, P.; Jerbic, B. Honey-bees optimization algorithm applied to path planning problem. Int. J. Simul. Model.
**2007**, 6, 154–164. [Google Scholar] [CrossRef] - Sato, T.; Hagiwara, M. Bee System: Finding Solution by a Concentrated Search. In Proceedings of the 1997 IEEE International Conference on Systems, Man and Cybernetics, Orlando, FL, USA, 12–15 October 1997; pp. 3954–3959.
- Teodorović, D.; Dell’Orco, M. Bee Colony Optimization—A Cooperative Learning Approach to Complex Transportation Problems. In Proceedings of the 10th EWGT Meeting and 16th Mini-EURO Conference, Poznan, Poland, 2005; pp. 51–60.
- Karaboga, D. An Idea Based on Honey Bee Swarm for Numerical Optimization; Technical Report for Erciyes University: Kayseri, Turkey, 2005. [Google Scholar]
- Karaboga, D.; Basturk, B.A. Powerful and efficient algorithm for numerical function optimization: Artificial bee colony (ABC) algorithm. J. Glob. Optim.
**2007**, 39, 459–471. [Google Scholar] [CrossRef] - Karaboga, D.; Basturk, B. On the performance of artificial bee colony (ABC) algorithm. Appl. Soft Comput. J.
**2008**, 8, 687–697. [Google Scholar] [CrossRef] - Seeley, T.D. The Wisdom of Hive: The Social Physiology of Honey Bee Colonies; Harvard University Press: Cambridge, MA, USA, 2009. [Google Scholar]
- Gould, J.L.; Gould, C.G. The Honey Bee; Scientific American Library: New York, NY, USA, 1988. [Google Scholar]
- Von Frisch, K. Bees: Their Vision, Chemical Senses, and Language; Cornell University Press: Ithaca, NY, USA, 1950. [Google Scholar]
- Huang, Z. Behavioral Communications: The Waggle Dance. Available online: http://photo.bees.net/biology/ch6/dance2.html (accessed on 29 June 2013).
- Talbi, E.-G. Metaheuristics: From Design to Implementation; Wiley: Hoboken, NJ, USA, 2009. [Google Scholar]
- Wolpert, D.H.; Macready, W.G. No free lunch theorems for optimization. Evol. Comput. IEEE
**1997**, 1, 67–82. [Google Scholar] [CrossRef] - Beheshti, Z.; Shamsudding, S.M.H. A review of population-based meta-heuristic algorithms. Int. J. Adv. Soft Comput. Appl.
**2013**, 5, 1–35. [Google Scholar] - Pham, D.T.; Castellani, M. The bees algorithm: Modelling foraging behaviour to solve continuous optimization problems. Sage J.
**2009**, 223, 2919–2938. [Google Scholar] - Ahmad, S. A Study of Search Neighbourhood in the Bees Algorithm. Ph.D Thesis, Cardiff University, Cardiff, UK, 2012. [Google Scholar]

© 2013 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).

## Share and Cite

**MDPI and ACS Style**

Yuce, B.; Packianather, M.S.; Mastrocinque, E.; Pham, D.T.; Lambiase, A.
Honey Bees Inspired Optimization Method: The Bees Algorithm. *Insects* **2013**, *4*, 646-662.
https://doi.org/10.3390/insects4040646

**AMA Style**

Yuce B, Packianather MS, Mastrocinque E, Pham DT, Lambiase A.
Honey Bees Inspired Optimization Method: The Bees Algorithm. *Insects*. 2013; 4(4):646-662.
https://doi.org/10.3390/insects4040646

**Chicago/Turabian Style**

Yuce, Baris, Michael S. Packianather, Ernesto Mastrocinque, Duc Truong Pham, and Alfredo Lambiase.
2013. "Honey Bees Inspired Optimization Method: The Bees Algorithm" *Insects* 4, no. 4: 646-662.
https://doi.org/10.3390/insects4040646