Student work
Artificial life
Bee foraging

Please note

The simulation needs a Java-Plugin (1.3.x) installed for your internet browser. If you do not already have one installed, the browser will prompt you to download the Plugin from “Sun”, who is the inventor of Java. Please download the JRE (=Java runtime environment) into a directory on your computer (e.g. “c:\temp”), execute the downloaded file for installation on your system (double-click on the file). Afterwards you will be able to reload the simulation page. Maybe you will have to restart your browser to succeed.

Run the simulation

Please click here.

Description of the simulation

This simulation shows how bees decide between different nectar sources. On the right hand of the screen, there is the hive with a set of bees located in and moving around randomly. Some bees decide to go scouting, that means to leave the hive and fly around randomly. If they do now find a source after some time, they give up and fly back to the hive. If they find some source, they load themselves with nectar and fly home. There they dance around in the hive, pointing to the source. If a receptive bee is near enough, it faces the dancing bee and takes this information.

This bee then also leaves the hive, flies to the point she has information about. If she finds something, she takes nectar and returns back to the hive, dances, ....

If she doesn't find the sources, she switches to searching for some time, flying circles and searches for some time. Despite this processes, bees can simply forget their source and follow a dance to another one.

User interface, parameter settings and the setup of the environment

In the upper field of the simulation you find some sliders that allow you to setup the environment and some basic parameters of the actors.

On the left hand, you find 3 sliders controlling each nectar source (a total of 9 sliders for 3 sources). The first one controls the sugar concentration, the remaining two sliders control the location of the source (x and y coordinates). For applying the changes in source locations, you have to restart the simulation by pressing the “Setup” button. Changes in the sugar concentration take effect immediately.

On the right hand of the upper field you find some sliders that allow you to configure basic parameters like the probability of an actor to start scouting, to forget about a source or to start another foraging trip to an already visited source. Please note that these values are very small, because the decisions they trigger are made once every time step of the simulation. Other sliders control the errorness (noisiness) of information transfer via dancing, the maximum duration of scouting trips. Two additional sliders let you control colony parameters like the nectar-need of the colony (reacts immediately) and the total number of bees (the number is set after pressing the “Setup”-button).

Three buttons allow you to start & continue the simulation, to setup the environment and to let each source be found immediately by one bee (speed up waiting time a bit).

A set of monitors informs you about the number of bees, about the number of scouts, about the number of bees being recruited on each nectar source (even if they are at home in the hive, they still remain “on that source” until they forget it or they are recruited for another source) and about the colony’s honey reserves.

The major part of the screen is captured by the “world”, which shows the hive on the right size and the nectar-sources on the left.

Rules and states of bees

Each single actor (bee) can be in one of the following states, following a special set of behavioral rules then:

  • in-hive (yellow bee); Moves around in the hive randomly. With a given probability the be can switch to scouting and leave the hive. If the bee return successfully from a source, she can dance, if the (inverse) dancing threshold isn't already lowered to 0. With a given probability the bee can just forget about her source. With a given probability she can just fly out to her last source to forage again. If she meets a dancing bee, she switches to this source and leaves the hive.
  • dancing (color-of-the-source): Dancing starts if a random variable falls below the current dancing threshold. This threshold is than lowered by 20%. The nearer thelocation of the nectar source was and the higher the sugar concentration was, the higher is the initial dancing threshold. Also the duration of the dances is longer then. During the dances, the bee switches to the color of the source, so we can follow the sharing of information (amounts of informational pieces) visually on screen. The source information can be gathered by followers (state: in-hive), but we can adjust the noisiness of this process. After the dancing time is elapsed, the bee falls back to state "in-hive" (yellow). But she might dance again ...
  • scouting (green): Bees leave the hive and fly around randomly. If they find a source, they take the color of the source and fly home directly (state: returning). With a given probability, they just stop scouting and fly back without anything (white bee).
  • foraging (color-of-the-source): A bee that had already successfully foraged or scouted or got information via a dance flies directly to the direction for the distance she knows. This information might be a little wrong ((noisiness !). If she finds something there, she switches to returning. If not, she switches to searching for a given time.
  • searching (color-of-the-source): The bee came with information about the location of the source but missed it. She flies circles and searches for some time. If she doesn’t find the source, she returns without success (white bee)
  • returning (color-of-the-source or white). If the bee returns from a successful foraging trip or from successful scouting, it has the source color. If she simply gave up searching due to quite empty honey reserves, she is white. In both cases , she flies back to the hive entrance directly.

Please note: The probability values are very low, because the events may be triggered every time a bee acts (moves one step) !!!! This is very frequently, so e.g. higher values would let all bees start scouting and then almost immediately end the scouting trips again.

The model just treats possible-foragers/scouts, so no other bees are moving around in our hive. In nature, a hive will not be that empty just because of foraging activities. There the colony also has to raise brood, store nectar & pollen, produce honey, produce new combs and clean and defend the hive.

By pressing the “go” button you can stop and continue the simulation run. By double-clicking on a bee, you can open her “state variable monitor” and examine her internal state variables like nectar reserves, dancing thresholds etc. If you leave the monitor open and continue the simulation run, you can follow the internal changes of individuals.


  • Change the distances between the different sources and the hive (DO NOT FORGET TO PRESS THE SETUP BUTTON TO INITIALIZE EVERYTHING). Then, after the bees decided for a good choice (means many bees are foraging on this source), lower the concentration of that source or raise that of another source. See what happens.
  • Try to find combinations where bees simultaneously forage on all three sources at a same level. Is this a stable decision (means do they keep this up for a longer time) ?
  • Try to figure out the influence of the sources parameters (distance and conzentration).
  • Try to figure out the influence of the probability settings.
  • Try to figure out the influence of the number of bees,
  • Try to figure out the influence of the communication noise.
  • Why is there also (in most) trials also some information available about not so profitable sources ?

And last

  • How does the collective decision work ?
  • Explain the core process !

And do not forget: this is not the hole story: In nature, bees do not only decide between nectar sources, they also decide between nectar, pollen, water and propolis. A special caste of food-receivers also plays an important role in the collective decisions,

This stuff will be the topic of another simulation, so hold on ...
(but don’t hold your breath, it make take some time ....)



The simulation was written in StarLogo by: Thomas Schmickl, Department for Zoology, Karl-Franzens-University Graz, Austria (Europe), (preferred adress),

The model is based on findings of Tom Seeley about honey bees foraging decisions, as you can read in:
  • Seeley T.D. (1995) The wisdom of the hive: The social physiology of honey bee colonies. Harvard University Press
  • Seeley T.D. (1997) Honigbienen: im Mikrokosmos des Bienenstocks. Birkhäuser Verlag
  • Seeley T.D., Camazine S. and Sneyd J. Collective decision-making in honey bees: how colonies choose among nectar sources (1991) Behav. Ecol. Sociobiol. 28:277-290
  • Bartholdi J.J. III, Seeley T. D., Tovey C.A. and Vate J.H.V. (1993) The pattern and effectiveness of forager allocation among flower patches by honey bee colonies. J. Theor. Biol. 160:23-40
  • Seeley T.D. (1994) Honey bee foragers as sensory units of their colonies. Behav. Ecol. Sociobiol. 34:51-62
State definitions were inspired from:
  • Sumpter D.J.T. and Broomhead D.S. (1998) Formalising the link between worker and society in honey bee colonies, In: Lecture notes in artificial Intelligence, Vol. 1534:95-110
  • Biesmeijer J.C. and de Vries H. (2001) Exploration and exploitation of food sources by social insect colonies: a revision of the scout-recruit concept. Behav. Ecol. Sociobiol (2001) 49:89-99
  • De Vries H. and Biesmeijer J.C. (1998) Modelling collective foraging by means of individual behaviour rules in honey-bees. Behav. Ecol. Sociobiol 44: 109-124

Known bugs

Sometimes there seem to be bees just having stopped on the screen. This seems to be an update-bug in StarLogo. Clicking on them or minimizing & restoring the StarLogo window makes those artifacts disappear. In the simulation, they are already at home or already foraging again, but on the screen an old image of them was frozen. Newer versions of StarLogo might solve this problem.

[Home] [Self-organization] [Ecology] [Populations] [Artificial life] [Student work] [Software] [Links] [Contact]