- Introduced by
- Dervis Karaboga & Bahriye Basturk
- Year
- 2007
- Type
- Swarm Intelligence Metaheuristic
- Family
- Metaheuristics
What does it do?
Artificial Bee Colony (ABC) is a population-based swarm intelligence metaheuristic for numerical optimization, formally published by Karaboga and Basturk in 2007.
It is modeled on the foraging behavior of a honey bee colony, with candidate solutions treated as food sources that are handled by employed, onlooker, and scout bees. The method searches continuous, bounded problems through iterative neighborhood moves and probabilistic selection, and it does not require gradient information.
The intuition behind the method
Imagine a hive where some bees exploit known flower patches, others watch their dances and choose the richest patches probabilistically, and a third group scouts entirely new locations when a patch runs dry. In ABC, food sources are candidate solutions and nectar quality is fitness. Employed bees refine their assigned solution; onlooker bees allocate more effort to promising ones; scouts reinitialize exhausted sources. This division of labor balances local exploitation with global exploration without requiring gradient information.
History
Dervis Karaboga is credited with the algorithm, and its peer-reviewed formulation was published with Bahriye Basturk in the Journal of Global Optimization in 2007 (the second author also appears as Bahriye Akay in some bibliographic records). The design is inspired by the foraging behavior of honey bees, including the way they share information about food sources. Since its publication, many variants have been proposed in the literature, including versions for other problem types.
When to use it
Choose ABC for single-objective problems with continuous decision variables that lie within known lower and upper bounds, particularly when gradients are unavailable or expensive to compute, since the algorithm needs only objective evaluations at candidate points. It is a reasonable option for engineering design and parameter-tuning problems of this kind. Do not use the basic formulation for combinatorial problems or for multi-objective problems, because its update rules and bound handling are defined for box-constrained continuous search. For problems with general constraints, add a constraint-handling mechanism first. The basic method may underperform on high-dimensional problems without modification, so large variable counts call for caution. Where fast exploitation near a good solution is the priority, Particle Swarm Optimization or Differential Evolution may be preferable.
Limitations and considerations
- The basic employed-bee move changes one randomly chosen dimension per trial, so progress per function evaluation can be slow when many variables must change together
- The limit parameter is problem-dependent: a value that is too small discards sources before they are refined, and a value that is too large delays escape from stagnant sources
- The onlooker probability depends on fitness values and is defined only for nonnegative fitness, so the method is not directly applicable to discrete or combinatorial encodings without domain-specific design
- Population diversity can still collapse in highly multimodal landscapes, because the scout mechanism reinitializes only sources that have failed repeatedly rather than the whole colony
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Only two control parameters, colony size and the abandonment limit, must be set in the basic method
- Greedy replacement in the employed phase and fitness-proportional selection in the onlooker phase concentrate effort on sources that are already good, while the scout phase keeps exploring new regions
- Gradient-free: it needs only objective values at candidate points, so non-differentiable or black-box objectives can be used without modification
- Scout reinitialization replaces a source once its trial counter exceeds the limit, whatever its fitness, so stagnant sources are abandoned rather than kept indefinitely
Applications
- Neural network weight optimization and hyperparameter tuning over continuous parameters; discrete or categorical hyperparameters need an adapted encoding and update rule
- Engineering design problems with bounded continuous variables, such as truss weight minimization and PID controller tuning
- Parameter tuning of controllers and other models with continuous parameters
- Feature selection, which requires a discrete encoding and an adapted update rule, because the basic continuous formulation does not cover binary choices
How it works
How it works
The colony is seeded with SN food sources (candidate solutions), each sampled uniformly at random between the lower and upper bound of every decision variable. This gives the initial population broad coverage of the bounded search space before iterative improvement begins.
Formula
x_{ij} = x_{j}^{\min} + \text{rand}(0,1)\,(x_{j}^{\max} - x_{j}^{\min})Each employed bee generates one candidate by changing one randomly chosen dimension of its current source, using a randomly chosen partner source k (k different from i) and a random factor in [-1, 1], as in the employed-bee formula. If the candidate has better fitness, it replaces the current source (greedy selection); otherwise the source is kept and its trial counter is increased.
Formula
v_{ij} = x_{ij} + \phi_{ij}(x_{ij} - x_{kj}), \quad k \neq i,\; \phi_{ij} \in [-1,1]Onlooker bees use information shared by the employed bees (the waggle-dance analogy) and choose food sources with probability p_i, which is proportional to each source's fitness relative to the total fitness of the colony. They then apply the same neighborhood move as employed bees, so effort concentrates on sources that are currently better. The formula as written assumes nonnegative fitness values.
Formula
p_i = \frac{f_i}{\sum_{n=1}^{SN} f_n}When a source's trial counter exceeds the limit, the source is abandoned and its employed bee becomes a scout that replaces it with a new random solution drawn within the bounds. This keeps stagnant sources from persisting and reintroduces diversity into the colony.
Formula
x_{ij} = x_{j}^{\min} + \text{rand}(0,1)\,(x_{j}^{\max} - x_{j}^{\min}), \quad \text{if } \text{trial}_i > \text{limit}Common pitfalls
- A colony size that is too small reduces diversity, while a limit that is too low triggers excessive scouting and wastes function evaluations
- The onlooker formula treats larger fitness values as better and assumes them to be nonnegative, so a minimization objective must be converted to a fitness value before selection; using the raw objective gives the wrong preference. A convention used in the original ABC formulation is fit = 1/(1+f) for f >= 0 and fit = 1+|f| for f < 0; other monotone transformations also appear in the literature.
- Applying the basic method to constrained problems without a constraint-handling strategy produces infeasible solutions, and the reported fitness values are then misleading
- Treating the algorithm as parameter-free and skipping tuning of the colony size and limit leads to unreliable results
- Reporting a single run hides run-to-run variation; because the algorithm is stochastic, several independent runs are needed before performance is compared
Frequently asked questions
How does ABC differ from Particle Swarm Optimization (PSO)?
PSO moves each particle using a velocity influenced by its personal best and the swarm's best position. ABC instead assigns solutions to employed, onlooker, and scout roles, uses greedy replacement within the employed phase, and abandons sources that stop improving. The two methods organize search effort differently, and neither is generally superior; performance depends on the problem and the parameter settings.
What values should I choose for colony size and the limit parameter?
A commonly used starting point is SN food sources, with an equal number of employed and onlooker bees (total colony size 2×SN), and a limit of SN×D, where D is the number of decision variables. These are heuristic starting points rather than validated optima; use pilot runs or systematic tuning for production work.
Can ABC handle constrained optimization problems?
The basic ABC formulation handles only box constraints, through variable bounding during initialization and the scout phase. For general equality or inequality constraints, practitioners typically integrate constraint-handling techniques such as penalty functions, feasibility-based tournament selection, or repair operators. Without such additions, ABC solutions may be infeasible, and reported fitness values will be misleading.
Related methods
Sources
Karaboga, D., & Basturk, B. (2007). A powerful and efficient algorithm for numerical function optimization: artificial bee colony (ABC) algorithm. Journal of Global Optimization, 39(3), 459–471.
Open DOI reference