ArticleslgStudy

computer science

Bees algorithm

Bees algorithm is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Bees algorithm rather than just read about it. In short: In computer science and operations research, the bees algorithm is a population-based search algorithm which was developed by Pham, Ghanbarzadeh et al. in 2005. It mimics the food foraging behaviour of honey bee colonies.

Bees algorithm — main illustration
Bees algorithm — illustration

Key takeaways

  • Bees algorithm belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Bees algorithm to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Bees algorithm from memory before moving on to harder problems.

Reference excerpt

In computer science and operations research, the bees algorithm is a population-based search algorithm which was developed by Pham, Ghanbarzadeh et al. in 2005. It mimics the food foraging behaviour of honey bee colonies. In its basic form, the algorithm combines local neighbourhood search with global exploration of the search space. It can be used for both combinatorial optimization and continuous optimization. The only condition for the application of the bees algorithm is that some measure of distance between the solutions is defined. A number of studies have demonstrated the specific capabilities and effectiveness of the bees algorithm.

Metaphor A colony of honey bees can extend itself over long distances (over 14 km) and in multiple directions simultaneously to harvest nectar or pollen from multiple food sources (flower patches). A small fraction of the colony constantly searches the environment looking for new flower patches. These scout bees move randomly in the area surrounding the hive, evaluating the profitability (net energy yield) of the food sources encountered. When they return to the hive, the scouts deposit the food harvested. Those individuals that found a highly profitable food source go to an area in the hive called the “dance floor”, and perform a ritual known as the waggle dance. Through the waggle dance a scout bee communicates the location of its discovery to idle onlookers, which join in the exploitation of the flower patch. Since the length of the dance is proportional to the scout’s rating of the food source, more foragers get recruited to harvest the best rated flower patches. After dancing, the scout returns to the food source it discovered to collect more food. As long as they are evaluated as profitable, rich food sources will be advertised by the scouts when they return to the hive. Recruited foragers may waggle dance as well, increasing the recruitment for highly rewarding flower patches. Thanks to this autocatalytic process, the bee colony is able to quickly switch the focus of the foraging effort on the most profitable flower patches.

Algorithm The bees algorithm mimics the foraging strategy of honey bees to look for the best solution to an optimisation problem. Each candidate solution is thought of as a food source (flower), and a population (colony) of n agents (bees) is used to search the solution space. Each time an artificial bee visits a flower (lands on a solution), it evaluates its profitability (fitness). The bees algorithm consists of an initialisation procedure and a main search cycle which is iterated for a given number T of times, or until a solution of acceptable fitness is found. Each search cycle is composed of five procedures: recruitment, local search, neighbourhood shrinking, site abandonment, and global search.

Pseudocode for the standard bees algorithm 1 for i = 1, ..., ns i scout[i] = Initialise_scout() ii flower_patch[i] = Initialise_flower_patch(scout[i]) 2 do until stopping_condition = TRUE i Recruitment() ii for i = 1, ..., na 1 flower_patch[i] = Local_search(flower_patch[i]) 2 flower_patch[i] = Site_abandonment(flower_patch[i]) 3 flower_patch[i] = Neighbourhood_shrinking(flower_patch[i]) iii for i = nb, ..., ns 1 flower_patch[i] = Global_search(flower_patch[i])}

In the initialisation routine ns scout bees are randomly placed in the search space, and evaluate the fitness of the solutions where they land. For each solution, a neighbourhood (called flower patch) is delimited. In the recruitment procedure, the scouts that visited the nb≤ns fittest solutions (best sites) perform the waggle dance. That is, they recruit foragers to search further the neighbourhoods of the most promising solutions. The scouts that located the very best ne≤nb solutions (elite sites) recruit nre foragers each, whilst the remaining nb-ne scouts recruit nrb≤nre foragers each. Thus, the number of foragers recruited depends on the profitability of the food source. In the local search procedure, the recruited foragers are randomly scattered within the flower patches enclosing the solutions visited by the scouts (local exploitation). If any of the foragers in a flower patch lands on a solution of higher fitness than the solution visited by the scout, that forager becomes the new scout. If no forager finds a solution of higher fitness, the size of the flower patch is shrunk (neighbourhood shrinking procedure). Usually, flower patches are initially defined over a large area, and their size is gradually shrunk by the neighbourhood shrinking procedure. As a result, the scope of the local exploration is progressively focused on the area immediately close to the local fitness best. If no improvement in fitness is recorded in a given flower patch for a pre-set number of search cycles, the local maximum of fitness is considered found, the patch is abandoned (site abandonment), and a new scout is randomly generated. As in biological bee colonies, a small number of scouts keeps exploring the solution space looking for new regions of high fitness (global search). The global search procedure re-initialises the last ns-nb flower patches with randomly generated solutions. At the end of one search cycle, the scout population is again composed of ns scouts: nr scouts produced by the local search procedure (some of which may have been re-initialised by the site abandonment procedure), and ns-nb scouts generated by the global search procedure. The total artificial bee colony size is n=ne•nre+(nb-ne)•nrb+ns (elite sites foragers + remaining best sites foragers + scouts) bees.

Variants Several modified and hybrid variants of the bees algorithm have been proposed, including the enhanced bees algorithm (EBA), grouped bees algorithm (GBA), modified bees algorithm (MBA) and hybrid modified bees algorithm (MBA). The pseudo-MATLAB code for the grouped BA (GBA) is as follows.

See also Ant colony optimization algorithms Artificial bee colony algorithm Evolutionary computation Lévy flight foraging hypothesis Manufacturing Engineering Centre Mathematical optimization Metaheuristic Particle swarm optimization Swarm intelligence

References

External links The bees algorithm website Boffins put dancing bees to work – BBC News The bees algorithm workshop

Illustrations

Bees algorithm: The bee algorithm mimics the foraging behavior of honey bees.
The bee algorithm mimics the foraging behavior of honey bees.

Worked examples

Example 1 — a first encounter with Bees algorithm

Start with the simplest possible case. Write down what Bees algorithm claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Bees algorithm before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Bees algorithm ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Bees algorithm

In research
Bees algorithm appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Bees algorithm in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Bees algorithm is common in secondary-school and first-year university syllabi. It links to neighbouring topics Nature-inspired metaheuristics, so understanding it makes those chapters shorter.
In everyday life
Look for Bees algorithm outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Bees algorithm” →

How to study Bees algorithm in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Bees algorithm means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Bees algorithm out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Bees algorithm in simple terms?

In computer science and operations research, the bees algorithm is a population-based search algorithm which was developed by Pham, Ghanbarzadeh et al. in 2005. It mimics the food foraging behaviour of honey bee colonies.

Why does Bees algorithm matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Bees algorithm?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Bees algorithm.

Tags

  • Nature-inspired metaheuristics

Keep exploring