Intelligent Design Icon Intelligent Design
Neuroscience & Mind Icon Neuroscience & Mind

Animal Algorithms: Ant Foraging Is a “Rational” Behavior

Eric Cassell
Photo: Black garden ants, by Katja Schulz from Washington, DC, USA, CC BY 2.0 , via Wikimedia Commons.

Animals face a number of decisions when foraging for food. An example of such a decision would be: Should I keep foraging in this area when food availability decreases, or should I move to a new area? There are also decisions balancing risk against reward when the animal is potentially threatened by predators. Interestingly, foraging efficiency has become the subject of computer modeling and quantitative analysis. This has transformed foraging theory into a highly mathematical discipline, pursued in a range of studies. 

The purpose of the modeling is to evaluate the optimality of animal foraging approaches and strategies. One mathematical model, developed to analyze foraging behavior, is called the Optimal Diet Model. From examining these studies, it is immediately evident that a wide range of animals employ highly optimal foraging methods. The conclusion from a survey of 134 studies of optimal diet theory is that animal often achieve near optimum choices, maximizing the amount of food obtained compared to the energy expended.1 In other words, when foraging for food, animals generally make rational decisions. Yet there are a lot of unanswered questions about how these decisions are made.

Risk and Reward

An experiment with ant foraging, documented in a recent paper, examined how ants make risk/reward decisions.2 The experiment was conducted with ants of the species Lasius niger (black garden ants) that were trained to feed on sucrose solutions of two different concentrations. In each of the experiments the ants were given a choice between a source with a constant concentration of sucrose and a source with a concentration that varied. The constant concentration was considered the “safe” option, while the variable concentration was considered the “risky” option. The experiment was conducted under several different conditions, where the average of the variable concentration was either equal to, lower, or higher than the constant concentration.

The experiment showed that the ants generally preferred the constant concentration over the variable ones. One conclusion of the study by Massimo De Argo et al. was that, “Ants were extremely risk-averse, with 91 percent choosing the safe option.” The title of the paper, however — “Irrational risk aversion in an ant” — is ironic and misleading. In fact, the study confirms that ants behave in a rational manner. The reason the authors claim the behavior is irrational is because even in the cases where the average value of the variable concentration was higher than the constant one, the ants chose the constant one. However, considered in the context of risk assessment, the constant value is less risky. Therefore, from the perspective of the ants, it appears to be the more rational choice. 

Using Algorithms to Make Decisions

Of course, ants and other animals do not make such decisions in a “conscious” manner as humans would. Instead they rely on algorithms, using relatively simple heuristics. It isn’t practical for the algorithms to account for all possible situations, especially given that ants have such tiny brains (typically less than one million neurons). Therefore, it makes sense for the algorithms to account for the most common foraging conditions, and to make the most risk-averse decisions. This is evidently how the algorithms are designed.

Animal psychologists Mary Olmstead and Valerie Kuhlmeier observe that, “Taken together, lab and field experiments suggest that foraging decisions are controlled by a complex combination of environmental and motivational factors. Maximizing energy gain from feeding must be balanced against risks associated with unpredictable outcomes.”3 Thus some studies with pigeons and rats (as well as humans) have shown a preference for taking the riskier options when given a choice. 

An example is the human habit of gambling. One possible explanation for this behavior is that, “High, but infrequent, outcomes are more memorable, so individuals assume that these occur at higher rates than they do. In other words, humans and animals select the risky option because they are over-calculating the rate at which it pays off.”4 Therefore, De Argo and the paper’s co-authors are surprised that ants do not exhibit this behavior. However, a reasonable explanation is that since ants do not have the cognitive capacity to make judgments in complex situations, they rely on programmed decision algorithms with simplifying assumptions. In the experiment, the ants were able to process sufficient information via an algorithm designed to select the less risky options. Thus, all things considered, they make quite “rational” decisions.


  1. Andrew Sih and Bent Christensen, “Optimal Diet Theory,” Animal Behaviour, 61, 2001, 379-390.
  2. “Irrational risk aversion in an ant,” Massimo De Argo et al.Animal Cognition, 2021, 24:1237-1245.
  3. Olmstead and Kuhlmeier, Comparative Cognition, Cambridge, Cambridge University Press, 2015.
  4. Olmstead and Kuhlmeier.