Oxford Reference defines artificial intelligence as “the theory and development of computer systems to perform tasks that normally require human intelligence.” However, since observing the natural intelligence of social insects such as bees and ants in finding and communicating about resources, scientists have created a variety of algorithms inspired by these social insects.
As a sophomore majoring in data science and working in the bee lab this summer, I grew curious about how the honey bee behavior I was observing in the field could connect to computer science. After noticing that a colony would rely on individual honey bees to find high-quality food sources, exploit them, and then advertise these sites to other bees, “recruiting” more bees to the best sites, I became interested in the applications of this foraging technique.
On searching, I found the Artificial Bee Colony Algorithm, or ABC for short. The ABC has been applied to a variety of problems ranging from medical imaging, training artificial neural networks and designing a welded beam to finding the minima of a sphere, scheduling college classes, and forming the foundations of a facebook recommendation system. These are just a few examples of ABC’s impact on industry, business, biology, and more in the future. So how does this powerful algorithm work?
[1] GIF of particle swarm converging on a solution- in this case, the global minimum. Red X’s represent individual swarm particles searching for solution with vectors, represented by yellow arrows.
First introduced by Karaboga in 2005, ABC is a swarm-based meta-heuristic algorithm which essentially means that the algorithm uses a “swarm” of artificial bees, mirroring how a real hive self-organizes and collectively makes decisions (Seeley et al 1991).The algorithm uses this artificial swarm to narrow down a large sample of “resources,” which represent solutions to a problem, to find a relatively very good one, especially with limited information. The ABC imitates how a real hive tries to solve the problem of how to allocate foragers to the very best available source of nectar while taking into account factors like nectar quality, distance, and more. The ABC also utilizes another important tool that a real hive uses: the waggle dance. As a signal that conveys the locations of resources, the waggle dance is extremely useful for collective decision-making as we will see below. Karaboga’s algorithm is based on Tereshko and Loengarov (2005)’s model of honeybee foraging: employed bees forage for food sources, recruiting unemployed bees for richer resources while abandoning poorer ones. For the algorithm, the artificial colony uses three types of bees: employed, onlooker, and scout. Scout and onlooker bees are both also considered unemployed bees. ABC then has several phases: initialization, employed, onlooker, and scout.
[2] Waggle Dance Diagram
Initiation Phase:
In the initialization phase, random food sources are generated. The number of food sources are proportional to the number of employed bees. The food source’s position is a potential solution to whatever problem is being solved while the nectar amount is proportional to the solution’s “fitness” to the problem; in other words, how good of a solution is it? Then, bees are added to this solution environment, either placed randomly or evenly depending on the user and the problem. Once initialized, the algorithm then loops through the rest of the phases.Employed Phase:
In the employed bee phase, employed bees explore the neighborhood around their original food source. If they find a better food source, they upgrade and replace their old with the new. While the search is random, employed bees have memory and are able to compare their original and new food source.Onlooker Phase:
Then, in the onlooker phase, employed bees go back to the hive and waggle dance to communicate the fitness information (analogous to nectar quality) and location of the food source to recruit onlooker bees. Onlooker bees are unemployed bees at the hive who wait for directions from employed bees. From the employed bees’ waggle dances, onlooker bees are more likely to learn the location and pick the food source being advertised to them that has better fitness. The job of onlooker bees is to reinforce the best solutions (positive feedback).Scout Phase:
The scout phase then occurs when a food source neighborhood has been explored thoroughly and is exhausted. The employed bee then abandons it and becomes a scout bee that chooses a food source randomly, which could potentially be far away from the previous resource and might be lower or higher quality. Almost like a second initialization phase, the job of scout bees is to just find new areas so that the colony isn’t stuck exploring the same solution when there might be other better ones.[3] GIF of swarm behavior optimization over 3D graph. Red dots are exploring members of the swarm exploring each peak as possible solutions. In this case, the tallest peak is the best solution.
The algorithm then runs for the max number of cycles that the user sets, eventually converging on a solution. Finding an optimal solution to a very complex problem may take far too long to be feasible so as a heuristic approach, the ABC will find a relatively good solution in a reasonable amount of time. Check out this youtube video for a pretty great visualization of how the algorithm works! By using the natural intelligence honeybee colonies have evolved to collectively make decisions and solve problems, the ABC is an efficient algorithm with a wide range of applications. Due to its efficiency and flexible applications, ABC’s artificial colony is sure to be kept as busy bees for years to come.
Further Readings:
Karaboga, D, (2005). An idea based on honey bee swarm for numerical optimization. Technical Report TR06, Erciyes University, Engineering Faculty, Computer Engineering Department, 2005.
Ram, Naresh. “Implementing Artificial Bee Colony Algorithm to Solve Business Problems.” Towards Data Science, 4 Mar 2022,
Ram, Naresh. “Implementing Artificial Bee Colony Algorithm to Solve Business Problems.” Towards Data Science, 4 Mar 2022,
Seeley, T.D., Camazine, S. & Sneyd, J. (1991) Collective decision-making in honey bees: how colonies choose among nectar sources. Behav Ecol Sociobiol. 28: 277-290.
Tereshko, V., Loengarov, A. (2005), Collective decision-making in honey bee foraging dynamics, Computing and Information Systems, 9 (3): 1-7, University of the West of Scotland, UK.
Media Credits:
[1] Public Domain Image By Ephramac: https://commons.wikimedia.org/wiki/File:ParticleSwarmArrowsAnimation.gif
[2] Diagram by Morgan Carr-Markell
[3] Public Domain Image By Hennegrolsch:
No comments:
Post a Comment