You are on page 1of 10

Artificial bee colony algorithm - Scholarpedia

1 sur 10

Dervis Karaboga (2010), Scholarpedia, 5(3):6915.

http://www.scholarpedia.org/article/Artificial_bee_colony_algorithm

doi:10.4249/scholarpedia.6915

revision #91003 [link to/cite this article]

Dr. Dervis Karaboga, Erciyes University, Computer Engineering Department, Turkey


The Artificial Bee Colony (ABC) algorithm is a swarm based meta-heuristic algorithm that was introduced by
Karaboga in 2005 (Karaboga, 2005) for optimizing numerical problems. It was inspired by the intelligent
foraging behavior of honey bees. The algorithm is specifically based on the model proposed by Tereshko and
Loengarov (2005) for the foraging behaviour of honey bee colonies. The model consists of three essential
components: employed and unemployed foraging bees, and food sources. The first two components,
employed and unemployed foraging bees, search for rich food sources, which is the third component, close to
their hive. The model also defines two leading modes of behaviour which are necessary for self-organizing and
collective intelligence: recruitment of foragers to rich food sources resulting in positive feedback and
abandonment of poor sources by foragers causing negative feedback.
In ABC, a colony of artificial forager bees (agents) search for rich artificial food sources (good solutions for a
given problem). To apply ABC, the considered optimization problem is first converted to the problem of
finding the best parameter vector which minimizes an objective function. Then, the artificial bees randomly
discover a population of initial solution vectors and then iteratively improve them by employing the
strategies: moving towards better solutions by means of a neighbour search mechanism while abandoning
poor solutions.

Contents
1 Global Optimization Problem
2 The Artificial Bee Colony Meta-heuristic
2.1 Initialization Phase
2.2 Employed Bees Phase
2.3 Onlooker Bees Phase
2.4 Scout Bees Phase
3 Applications of ABC
3.1 An Unconstrained Optimization Problem: Neural Network Training for the XOR problem
3.2 A Constrained Optimization Problem: Welded Beam Design
4 Other Approaches Inspired from Honeybee Foraging Behaviour
5 Current Trends
6 References
7 Appendix -- Foraging Behaviour of Honey Bees
8 External Links
9 See also

A global optimization problem can be defined as finding the parameter vector


function

that minimizes an objective

26/05/2015 09:02

Artificial bee colony algorithm - Scholarpedia

2 sur 10

http://www.scholarpedia.org/article/Artificial_bee_colony_algorithm

which is constrained by the following inequalities and/or equalities:

is defined on a search space,


which is a
dimensional rectangle in
domains are limited by their lower and upper bounds (2).

). The variable

This problem is also known as a constrained optimization problem. If it is an unconstrained optimization


problem, then both

and

In ABC, the colony of artificial bees contains three groups of bees: employed bees associated with specific
food sources, onlooker bees watching the dance of employed bees within the hive to choose a food source, and
scout bees searching for food sources randomly. Both onlookers and scouts are also called unemployed bees.
Initially, all food source positions are discovered by scout bees. Thereafter, the nectar of food sources are
exploited by employed bees and onlooker bees, and this continual exploitation will ultimately cause them to
become exhausted. Then, the employed bee which was exploiting the exhausted food source becomes a scout
bee in search of further food sources once again. In other words, the employed bee whose food source has
been exhausted becomes a scout bee. In ABC, the position of a food source represents a possible solution to
the problem and the nectar amount of a food source corresponds to the quality (fitness) of the associated
solution. The number of employed bees is equal to the number of food sources (solutions) since each
employed bee is associated with one and only one food source.
The general scheme of the ABC algorithm is as follows:
Initialization Phase
REPEAT
Employed Bees Phase
Onlooker Bees Phase
Scout Bees Phase
Memorize the best solution achieved so far
UNTIL(Cycle=Maximum Cycle Number or a Maximum CPU time)

26/05/2015 09:02

Artificial bee colony algorithm - Scholarpedia

3 sur 10

http://www.scholarpedia.org/article/Artificial_bee_colony_algorithm

Initialization Phase
All the vectors of the population of food sources,

s, are initialized

population size) by

scout bees and control parameters are set. Since each food source,

is a solution vector to the

optimization problem, each


vector holds
minimize the objective function.

), which are to be optimized so as to

variables, (

The following definition might be used for initialization purposes (5):

where

and

are the lower and upper bound of the parameter

respectively.

Employed Bees Phase


Employed bees search for new food sources (
source (

) having more nectar within the neighbourhood of the food

) in their memory. They find a neighbour food source and then evaluate its profitability (fitness).

For example, they can determine a neighbour food source

where

is a randomly selected food source, is a randomly chosen parameter index and

number within the range

After producing the new food source

greedy selection is applied between


The fitness value of the solution,
following formula (7)

where

using the formula given by equation (6):

is a random

its fitness is calculated and a

and
might be calculated for minimization problems using the

is the objective function value of solution

Onlooker Bees Phase


Unemployed bees consist of two groups of bees: onlooker bees and scouts. Employed bees share their food
source information with onlooker bees waiting in the hive and then onlooker bees probabilistically choose
their food sources depending on this information. In ABC, an onlooker bee chooses a food source depending
on the probability values calculated using the fitness values provided by employed bees. For this purpose, a
fitness based selection technique can be used, such as the roulette wheel selection method (Goldberg, 1989).
The probability value
with which
expression given in equation (8) :

is chosen by an onlooker bee can be calculated by using the

26/05/2015 09:02

Artificial bee colony algorithm - Scholarpedia

4 sur 10

After a food source

http://www.scholarpedia.org/article/Artificial_bee_colony_algorithm

for an onlooker bee is probabilistically chosen, a neighbourhood source

is

determined by using equation (6), and its fitness value is computed. As in the employed bees phase, a greedy
selection is applied between

and

Hence, more onlookers are recruited to richer sources and positive

feedback behaviour appears.

Scout Bees Phase


The unemployed bees who choose their food sources randomly are called scouts. Employed bees whose
solutions cannot be improved through a predetermined number of trials, specified by the user of the ABC
algorithm and called limit or abandonment criteria herein, become scouts and their solutions are
abandoned. Then, the converted scouts start to search for new solutions, randomly. For instance, if solution
has been abandoned, the new solution discovered by the scout who was the employed bee of

can be

defined by (5). Hence those sources which are initially poor or have been made poor by exploitation are
abandoned and negative feedback behaviour arises to balance the positive feedback.
In summary, the ABC algorithm,
1) is inspired by the foraging behaviour of honeybees,
2) is a global optimization algorithm,
3) has been initially proposed for numerical optimization (e.g.: Karaboga, 2005),
4) can be also used for combinatorial optimization problems (eg: Pan et al, 2010),
5) can be used for unconstrained and constrained optimization problems (eg: Karaboga and Akay, 2009;
Karaboga and Basturk 2007b; Domnguez 2009),
6) employs only three control parameters (population size, maximum cycle number and limit) that are to be
predetermined by the user,
7) is quite simple, flexible and robust (some of the relevant publications expressing these merits of the ABC
algorithm are Rao et al, 2008; Kang et al, 2009; Singh, 2009; Karaboga, 2009, included in the References
list).

An Unconstrained Optimization Problem: Neural Network Training for


the XOR problem
Training an artificial neural network is an optimization task since it is desired to find the optimal set of
weights of a neural network in the training process. The goal is to optimize the network weights by
minimizing an objective function such as the mean square error (MSE) given by (9):

26/05/2015 09:02

Artificial bee colony algorithm - Scholarpedia

5 sur 10

where

is the error at the th iteration;

http://www.scholarpedia.org/article/Artificial_bee_colony_algorithm

is the vector of the weights in the connections at the th

iteration;
is the desired output node;
is the actual value of the th output node;
output nodes; and is the number of patterns.

is the number of

The neural networks are being successfully applied to solving problems in pattern classification, function
approximation, optimization, pattern matching and associative memories.
Exclusive-OR (XOR) is a difficult classification problem mapping two binary inputs to a single binary output
as (0 0;0 1;1 0;1 1)> (0;1;1;0). This classical benchmark problem is a hard task also for the neural networks.
In the simulations a 2-2-1 feed-forward neural network having six
connection weights and no biases (having six parameters, XOR6), a 2-2-1
feed-forward neural network having six connection weights and three
biases (having 9 parameters, XOR9) and a 2-3-1 feed-forward neural
network having nine connection weights and four biases (having thirteen
weights, XOR13) were used.
In Table 1, mean MSE values of 30 runs of each configuration are
recorded for ABC and for the standard Particle Swarm Optimization
(PSO) (Eberhart and Kennedy, 1995); each run of the algorithms was
started with a random population with different seeds. The population
size, SN, was set to 50 and the limit value was set to SN*n, where n is
dimension of the weight set.

Figure 1: An example of
neural network structure for
the XOR problem

Table 1: Mean MSE of 30 runs of


ABC and standard PSO algorithms in
ANN training process
XOR6

XOR9

XOR13

ABC 0.007051 0.006956 0.006079


PSO 0.097255 0.057676 0.014549
From the results presented in Table 1, it is clear that the basic ABC algorithm is more successful than the
standard PSO at training neural networks on the XOR benchmark problem in all cases (Karaboga et al.,
2007).

A Constrained Optimization Problem: Welded Beam Design


The welded beam design is a real-life application problem. As illustrated in Fig.2, the problem consists in
dimensioning a welded steel beam and the welding length so as to minimize its cost subject to constraints on
shear stress,
bending stress in the beam,
buckling load on the bar,
end deflection of the beam,
and side constraints. There are four design variables

which in structural engineering are commonly symbolized by the letters shown in Fig. 2 (
). Structural
analysis of this beam leads to the following nonlinear objective function subject to five nonlinear and two
linear inequality constraints as given below:

26/05/2015 09:02

Artificial bee colony algorithm - Scholarpedia

6 sur 10

http://www.scholarpedia.org/article/Artificial_bee_colony_algorithm

subject to

The optimum solution is located on the boundaries of the feasible region, and the ratio of the feasible region
to the entire search space is quite small for this problem, which makes it a truly difficult problem for any
optimization algorithm.
Generally, a constraint handling technique should be
incorporated to the optimization algorithms proposed
for solving unconstrained problems. Therefore, in order
to handle the constraints of this problem, the ABC
algorithm employs Debs rules, which are used instead of
the greedy selection employed between
and
in
the version of ABC proposed for unconstrained
optimization problems (Karaboga and Basturk, 2007).
Debs method uses a tournament selection operator,
where two solutions are compared at a time by applying
the following criteria (Deb, 2000):
Any feasible solution satisfying all constraints is
preferred to any infeasible solution violating any of
the constraints,

Figure 2: The Welded Beam Design Problem

Among two feasible solutions, the one having better fitness value is preferred,
Among two infeasible solutions, the one having the smaller constraint violation is preferred.
Table 2 presents the values of the variables and the constraints for the optimum solution found by ABC. Table
3 shows the summary statistics obtained from 30 runs of the ABC algorithm as compared to those of the
-ES method (Montes and Coello, 2005). The low mean and standard deviation values show the
robustness of the ABC algorithm.
Table 2: Parameter and constraint values of the best solution obtained by the ABC algorithm
x1

x2

x3

x4

g1

g2

g3

g4

g5

g6

g7

f(x)

0.20573 3.470489 9.036624 0.20573 0 -2E-06 0 -3.43298 -0.08073 -0.23554 0 1.724852


Table 3: Statistics of the results obtained by the ABC and (
Best
ABC
(

-ES) algorithms

Mean Std. Dev. Evaluations

1.724852 1.741913 3.1E-02


-ES) Montes and Coello, 2005 1.724852 1.777692 8.8E-2

30000
30000

Approaches for Combinatorial Optimization

26/05/2015 09:02

Artificial bee colony algorithm - Scholarpedia

7 sur 10

http://www.scholarpedia.org/article/Artificial_bee_colony_algorithm

In 2001, Lucic and Teodorovic introduced a Bee System based on the foraging behaviour of bee colonies for
solving difficult combinatorial optimization problems (Lucic and Teodorovic, 2001). Teodorovic and Dell
(2005) proposed a Bee Colony Optimization (BCO) meta-heuristic for the ride-matching problem in 2005.
Another algorithm simulating foraging behaviour is the BeeAdHoc model described by Wedde and Farooq
(2005c), which is an energy efficient routing method in mobile ad hoc networks. In 2005, Drias and Yahi
(2005) described a meta-heuristic named Bees Swarm Optimization and its adaptation to the features of the
MAX-W-SAT problem was introduced to contribute to its resolution. Chong et al. (2006) proposed a bee
colony optimization algorithm based on dance durations to select a new path; the algorithm was applied to
job shop scheduling. Quijano and Passino (2007) introduced a model of honey bee social foraging for solving
a class of optimal resource allocation problems.
Approaches for Numerical Optimization
In 2005, Yang (2005) developed a virtual bee algorithm (VBA) to solve numerical optimization problems. The
original algorithm works with only two variables. Pham et al. (2005) described the Bees Algorithm which
performs a kind of neighbourhood search combined with random search and can be used for both
combinatorial optimization and numerical optimizations.

The initial applications of ABC were in the area of numerical optimization since it was originally proposed for
these kinds of problems (Karaboga, 2005).
Current research topics include the extension of ABC to the optimization of hybrid functions; to the solution
of integer programming and engineering design problems (Rao et al., 2008; Singh, 2009; Karaboga, 2009);
to the solution of combinatorial (Pan et al, 2010) and multi-objective optimization problems (Omkar et al,
2010) and to the solution of clustering (Karaboga and Ozturk, 2010), neural network training (Karaboga and
Ozturk, 2009) and image processing (Xu and Duan, 2010) problems.
Several papers reporting the research related to ABC and its applications can be found at
http://mf.erciyes.edu.tr/abc

Chong, C. S., Sivakumar, A. I., Malcolm Low, Y. H., Gay, K. L. (2006). A bee colony optimization algorithm to
job shop scheduling. In Proceedings of the 38th conference on Winter simulation WSC '06, pages 1954-1961,
California.
Deb, K. (2000). An efficient constraint handling method for genetic algorithms, Computer Methods in
Applied Mechanics and Engineering, 186(2- 4):311338, Elsevier, Netherlands.
Domnguez, O. C. (2009), An adaptation of the scout bee behavior in the Artificial Bee Colony algorithm to
solve constrained optimization problems, Laboratorio Nacional de Informtica Avanzada (LANIA), MsC,
Thesis, Supervisor: Efrn Mezura-Montes.
Drias, H. S. S., Yahi, S. (2005). Cooperative bees swarm for solving the maximum weighted satisfiability
problem. In Computational Intelligence and Bioinspired Systems, volume 3512/2005 of LNCS: 318 325,
Springer, Berlin.
Goldberg, D.E. (1989), Genetic algorithms in search, optimization and machine learning, Addison-Wesley
Professional, ISBN: 0201157675.
Kang, F., Li, J., Xu, Q. (2009), Structural inverse analysis by hybrid simplex artificial bee colony algorithms,

26/05/2015 09:02

Artificial bee colony algorithm - Scholarpedia

8 sur 10

http://www.scholarpedia.org/article/Artificial_bee_colony_algorithm

Computers & Structures, 87 (13:14), 861-870, Elsevier, Netherlands.


Karaboga, D, (2005). An idea based on honey bee swarm for numerical optimization. Technical Report TR06,
Erciyes University, Engineering Faculty, Computer Engineering Department, 2005.
Karaboga D., Basturk B. (2007), Artificial bee colony (ABC) optimization algorithm for solving constrained
optimization problems, Advances in Soft Computing: Foundations of Fuzzy Logic and Soft Computing, ,
volume 4529/2007 of LNCS: 789-798, Springer, Berlin.
Karaboga, D., Basturk, B., Ozturk, C. (2007), Artificial bee colony (ABC) optimization algorithm for training
feed-forward neural networks, Modeling Decisions for Artificial Intelligence, volume 4617/2007 of LNCS:
318-319, Springer, Berlin.
Karaboga, D., Akay,B. (2009), A Comparative Study of Artificial Bee Colony Algorithm, Applied Mathematics
and Computation, 214, 108-132, Elsevier, Netherlands.
Karaboga, D., Ozturk, C. (2009),Neural Networks Training by Artificial Bee Colony Algorithm on Pattern
Classification, Neural Network World, 19 (3), 279-292, Institute of Computer Science AS CR, v. v. i., Czech
Republic.
Karaboga, D., Ozturk, C. (2010), A novel clustering approach: Artificial Bee Colony (ABC) algorithm, Applied
Soft Computing, Elsevier, Netherlands, In Press.
Karaboga, N. (2009), A new design method based on artificial bee colony algorithm for digital IIR filters,
Journal of Franklin Institute, 346 (4): 328-348, Elsevier, Netherlands.
Kennedy, J., Eberhart, R.C. (1995), Particle Swarm Optimization, In Proceedings of 1995 IEEE International
Conference on Neural Networks, 4: 19421948, Perth, Western Australia.
Lucic, P. and Teodorovic, D. (2001). Bee system: Modeling combinatorial optimization transportation
engineering problems by swarm intelligence. In Preprints of the Tristan IV Triennial Symposium on
Transportation Analysis, pages: 441-445, SaoMiguel, Azores Islands, Portugal.
Mezura-Montes, E., Coello Coello, C. (2005), Useful infeasible solutions in engineering optimization with
evolutionary algorithms. Advances in Artificial Intelligence, volume 3789/2005 of LNCS: 652662, Springer,
Berlin.
Omkar, S.N., Senthilnath, J. , Khandelwal, R., Narayana Naik, G., Gopalakrishnan, S. (2010), Artificial Bee
Colony (ABC) for multi-objective design optimization of composite structures, Applied Soft Computing,
Elsevier, Netherlands, In Press.
Pan, Q-K. Tasgetiren, M. F., Suganthan; P. N., T. Chua, J. (2010), A Discrete Artificial Bee Colony Algorithm
for the Lot-streaming Flow Shop Scheduling Problem, Information Sciences, Elsevier, Netherlands, In Press.
Pham, D. T., Ghanbarzadeh, A., Koc, E., Otri, S., Rahim, S., Zaidi, M. (2005). The bees algorithm. Technical
report, Manufacturing Engineering Centre, Cardiff University, UK.
Quijano, N. and Passino, K. (2007). Honey bee social foraging algorithms for resource allocation, part i:
Algorithm and theory, In Proceedings of American Control Conference, 2007. ACC '07, pages 3383-3388,
New York.
Rao, R. S., Narasimham, S.V.L., Ramalingaraju, M., Optimization of distribution network configuration for
loss reduction using artificial bee colony algorithm, International Journal of Electrical Power and Energy
Systems Engineering (IJEPESE) , 1 (2) :708-714, World Academy of Science, Engineering and Technology.
Singh, A. (2009), An artificial bee colony algorithm for the leaf-constrained minimum spanning tree problem,
Applied Soft Computing, 9 (2), 625-631, Elsevier, Netherlands.

26/05/2015 09:02

Artificial bee colony algorithm - Scholarpedia

9 sur 10

http://www.scholarpedia.org/article/Artificial_bee_colony_algorithm

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.
Teodorovic, D., Dell, M. O. (2005). Bee colony optimization - a cooperative learning approach to complex
transportation problems, In Proceedings of 10th EWGT Meeting and 16th Mini EURO Conference, pages: 5160.
Vries, H., Biesmeijer J.C. (1998), Modelling collective foraging by means of individual behaviour rules in
honey-bees, Behavioral Ecology and Sociobiology , 44: 109-124, Springer, Berlin.
Wedde, H., Farooq, M. (2005). The wisdom of the hive applied to mobile ad-hoc networks. In Proceedings of
the Swarm Intelligence Symposium 2005, pages: 341-348, Pasadena, California.
Xu, C., Duan, H. (2010), Artificial bee colony (ABC) optimized edge potential function (EPF) approach to
target recognition for low-altitude aircraft, Pattern Recognition Letters, Elsevier, Netherlands, In Press.
Yang, X. S. (2005). Engineering optimizations via nature-inspired virtual bee algorithms. In Artificial
Intelligence and Knowledge Engineering Applications: A Bioinspired Approach, volume 3562/2005 of LNCS:
317-323, Springer, Berlin.
Internal references
Marco Dorigo (2007) Ant colony optimization. Scholarpedia, 2(3):1461.
Howard Eichenbaum (2008) Memory. Scholarpedia, 3(3):1747.
Marco Dorigo, Marco A. Montes de Oca, Andries Engelbrecht (2008) Particle swarm optimization.
Scholarpedia, 3(11):1486.
Hermann Haken (2008) Self-organization. Scholarpedia, 3(8):1401.
Marco Dorigo and Mauro Birattari (2007) Swarm intelligence. Scholarpedia, 2(9):1462.

An interesting swarm is a honey bee colony which performs tasks within and out of the hive in an intelligent
manner. Since the availability of the nectar sources around the hive varies in space and time, the colony of
bees has to adapt its foraging behaviour to the changes in the environment. For instance, an appropriate
division of the workers efforts between exploring new sources and exploiting the available ones is very
important for the maintenance of the colony (Vries and Biesmeijer, 1998). As stated before, the minimal
model of forage selection that leads to the emergence of collective intelligence of honey bee swarms consists
of three essential components: food sources, employed foragers, and unemployed foragers (Tereshko and
Loengarov, 2005).
(i) Food sources: The profitability of a food source is related to several factors such as its closeness to the
nest, richness of energy, and the ease of extracting the energy from the source. In the minimal model, the
profitability may be defined by one of these quantities.
(ii) Employed foragers: These foragers are associated with a specific food source they exploit. They carry
information to the hive and share it with other foragers waiting in the hive by dancing.
(iii) Unemployed foragers: These foragers consist of scouts and onlookers. The scouts randomly search
the environment surrounding the hive for new food sources, and the onlooker bees waiting in the hive detect
a food source by means of the information presented to them by the employed foragers (Tereshko and
Loengarov, 2005).

26/05/2015 09:02

Artificial bee colony algorithm - Scholarpedia

http://www.scholarpedia.org/article/Artificial_bee_colony_algorithm

The exchange of information among the foragers is very important for the formation of collective knowledge.
The most important part of the hive for exchanging information is the dancing area where different types of
dances are performed: Waggle dance, Round dance, Tremble dance, etc. Communication among bees related
to the quality of food sources is called the waggle dance. Since information about all the current rich sources
is available to onlooker bees on the dance floor, they watch numerous dances and direct themselves to
profitable sources. Employed foragers share their information in proportion to the profitability of their food
sources. As the information circulating about them increases, the probability of the onlooker bees choosing
the more profitable sources also increases (Tereshko and Loengarov, 2005).

http://mf.erciyes.edu.tr/abc http://mf.erciyes.edu.tr/abc]: This is the official web site dedicated to the ABC
Algorithm

Algorithm, Swarm intelligence, Ant colony optimization, Flocking and swarming

10 sur 10

Sponsored by: Eugene M. Izhikevich, Editor-in-Chief of Scholarpedia, the peer-reviewed open-access


encyclopedia
Reviewed by (http://www.scholarpedia.org/w/index.php?title=Artificial_bee_colony_algorithm&
oldid=64965) : Anonymous
Accepted on: 2010-03-23 17:19:36 GMT (http://www.scholarpedia.org
/w/index.php?title=Artificial_bee_colony_algorithm&oldid=74841)
Categories:
Computational Intelligence Bees Artificial intelligence Collective intelligence
Optimization
This page was last modified on
21 October 2011, at 04:04.
This page has been accessed
88,778 times.
"Artificial bee colony algorithm"
by Dervis Karaboga is licensed
under a Creative Commons
Attribution-NonCommercialShareAlike 3.0 Unported
License. Permissions beyond the
scope of this license are
described in the Terms of Use

26/05/2015 09:02

You might also like