In computer science and operations research , the artificial bee colony algorithm ( ABC ) is an optimization algorithm based on the intelligent foraging behaviour of honey bee swarm, proposed by Karaboga in 2005. 

## Algorithm

In the ABC model, the colony consists of three groups of bees: employed bees, onlookers and scouts. It is assumed that there is only one artificial employed bee for each food source. In other words, the number of employed bees in the colony is equal to the number of food sources around the hive. Employed bees go to their food source and come back to hive and dance on this area. The employed bee whose food source has been abandoned becomes a scout and starts to search for finding a new food source. Onlookers watch the dances of employed bees and choose food sources depending on dances. The main steps of the algorithm are given below.: 

• Initial food sources are produced for all employed bees
• REPEAT
• Each employed bee goes to a food source in her memory and determines a neighbour source, then evaluates its nectar amount and dances in the hive
• Each onlooker watches the dance of employed bees and chooses one of their sources depending on the dances, and then goes to that source. After choosing a neighbour around that, she evaluates its nectar amount.
• Abandoned food sources are determined and are replaced with the new food sources discovered by scouts.
• The best food source found so far is registered.
• UNTIL (requirements are met)

In ABC, a population based algorithm, the position of a food source represents a possible solution to the optimization problem and the nectar amount of a food source corresponds to the quality (fitness) of the associated solution. The number of the employed bees is equal to the number of solutions in the population. At the first step, a randomly distributed initial population (food source positions) is generated. After initialization, the population is subjected to repeat the cycles of the search processes of the employed, onlooker, and scout bees, respectively. An employed bee produces a modification on the source position in her memory and discovers a new food source position. Provided that the nectar amount of the new one is higher than that of the previous source, the bee memorizes the new source position and forgets the old one. Otherwise she keeps the position of the one in her memory. After all employed bees complete the search process, they share the position information of the sources with the onlookers on the dance area. Each onlooker evaluates the nectar information taken from all employed bees and then chooses a food source depending on the nectar amounts of sources. As in the case of the employed bee, she produces a modification on the source position in her memory and checks its nectar amount. Providing that its nectar is higher than that of the previous one, the bee memorizes the new position and forgets the old one. The sources abandoned are determined and new sources are randomly produced to be replaced with the abandoned ones by artificial scouts.

## Artificial bee colony algorithm

ABC is a swarm intelligence algorithm proposed by Karaboga in 2005, which is inspired by the behavior of honey bees. Since the development of ABC, it has been applied to solve different kinds of problems. Artificial bee colony (ABC) algorithm is a recently proposed optimization technique which simulates the intelligent foraging behavior of honey bees. A set of honey bees is called swarm which can successfully accomplish tasks through social cooperation. In the ABC algorithm, there are three types of bees: employed bees, onlooker bees, and scout bees. The employed bees search food around the food source in their memory; meanwhile they share the information of these food sources to the onlooker bees. The onlooker bees tend to select good food sources from those found by the employed bees. The food source that has higher quality (fitness) will have a large chance to be selected by the onlooker bees than the one of lower quality. The scout bees are translated from a few employed bees, which abandon their food sources and search new ones.

In the ABC algorithm, the first half of the swarm consists of employed bees, and the second half constitutes the onlooker bees.

The number of employed bees or the onlooker bees is equal to the number of solutions in the swarm. The ABC generates a randomly distributed initial population of SN solutions (food sources), where SN denotes the swarm size.

Let ${displaystyle X_{i}={x_{i,1},x_{i,2},ldots ,x_{i,n}}}$ represent the ${displaystyle i^{th}}$ solution in the swarm, Where ${displaystyle n}$ is the dimension size. Each employed bee ${displaystyle X_{i}}$ generates a new candidate solution ${displaystyle V_{i}}$ in the neighborhood of its present position as equation below:

${displaystyle V_{i_{k}}=X_{i_{k}}+Phi _{i_{k}}times (X_{i_{k}}-X_{j_{k}})}$ Where ${displaystyle X_{j}}$ is a randomly selected candidate solution ( ${displaystyle ineq j}$ ), ${displaystyle k}$ is a random dimension index selected from the set ${displaystyle {1,2,ldots ,n}}$ , and ${displaystyle Phi _{i_{k}}}$ is a random number within ${displaystyle [-1,1]}$ . Once the new candidate solution ${displaystyle V_{i}}$ is generated, a greedy selection is used. If the fitness value of ${displaystyle V_{i}}$ is better than that of its parent ${displaystyle X_{i}}$ , then update ${displaystyle X_{i}}$ with ${displaystyle V_{i}}$ ; otherwise keep ${displaystyle X_{i}}$ unchanged. After all employed bees complete the search process; they share the information of their food sources with the onlooker bees through waggle dances. An onlooker bee evaluates the nectar information taken from all employed bees and chooses a food source with a probability related to its nectar amount. This probabilistic selection is really a roulette wheel selection mechanism which is described as equation below:

${displaystyle P_{i}={frac {fit_{i}}{sum _{j}{fit_{j}}}}}$ Where ${displaystyle fit_{i}}$ is the fitness value of the ${displaystyle i^{th}}$ solution in the swarm. As seen, the better the solution ${displaystyle i}$ , the higher the probability of the ${displaystyle i^{th}}$ food source selected. If a position cannot be improved over a predefined number (called limit) of cycles, then the food source is abandoned. Assume that the abandoned source is ${displaystyle X_{i}}$ , and then the scout bee discovers a new food source to be replaced with ${displaystyle i^{th}}$ as equation below:

${displaystyle X_{i_{k}}=lb_{j}+rand(0,1)times (ub_{j}-lb_{j})}$ Where ${displaystyle rand(0,1)}$ is a random number within ${displaystyle [0,1]}$ based on a normal distribution and ${displaystyle lb,ub}$ , are lower and upper boundaries of the ${displaystyle i^{th}}$ dimension, respectively.

## Extensions and variants

In 2011, Wu et al. proposed a fitness-scaled chaotic artificial bee colony.  They termed their method as FSCABC.

In 2015, Wang et al. compared FSCABC with biogeography-based optimization and found they obtained equal performances.