Fish and chips: animal cognition & machine learning

How can machine learning support research into animal cognition and vice versa?

From Rosenblatt’s perceptron, through Hebbian Learning, to Yann LeCun’s ConvNets, we have borrowed heavily from basic research in biology, psychology and animal behavior.

Okay, now it’s time to pay it back. In our most recent work, for example, machine learning was used to investigate how physiological parameters like cortisol (a.k.a. the “stress hormone”) can influence decision-making in fish. In this context, a group of Siamese fighting fish (Betta splendens) was subjected to a foraging task that can be framed as a multi-armed bandit problem. By means of the results obtained with the fish and using a reinforcement learning algorithm, we could see that basal cortisol worked as a tuning parameter in the so-called exploration-exploitation dilemma. We also observed that individuals with very low and very high levels of basal cortisol have a lower foraging performance when compared to individuals with intermediate levels, thus leading to an inverted U-shaped curve for reward accumulation.

In our opinion, this interplay of machine learning and animal cognition has the potential to benefit both areas by:

(1) shedding light on the influence of environmental and physiological variables on animal behavior and cognition;

(2) helping to design better, more reliable decision-making algorithms that can later be deployed in autonomous systems such as mobile robots and self-driving cars.

For more details, check out our work (open access) at

Bessa WM, Cadengue LS and Luchiari AC (2023) Fish and chips: Using machine learning to estimate the effects of basal cortisol on fish foraging behavior. Frontiers in Behavioral Neuroscience 17:1028190. doi: 10.3389/fnbeh.2023.1028190