You are currently viewing Studying zebrafish behaviour: robotics and automation

Studying zebrafish behaviour: robotics and automation

In today’s article we will take a step back from zebrafish embryos and discuss how adult zebrafish collective behaviours can be studied using robotic systems.

Danio rerio, commonly known as zebrafish is a small but robust cyprinid, commonly found in food plains of the south of Asia, particularly India. They thrive in shallow and slow flowing-waters and can generally be found in standing water bodies, often connected to rice cultivation. This is most likely due to the high content of zooplankton in rice cultivations, a major component of the zebrafish diet. Zebrafish are a social species which prefer to swim in groups. This behaviour seems to be innate as they quickly form shoals after hatching. Although Danio rerio is recognised as an important vertebrate model organism in genetics, developmental biology, neurophysiology and biomedicine, they are also excellent model systems to study cognition and learning, development, behavioural and evolutionary ecology and behavioural genetics. More recently, zebrafish have been commonly used as model organisms to study fish-robot interactions, an interesting mean to study animal behaviours.

In this article we will discuss how zebrafish behaviours can be observed and analysed thanks to robots which are capable of reproducing collective animal behaviours and interacting within groups of social animals.

Domesticated zebrafish

Zebrafish are commonly used for fundamental and applied research. Moreover, they have become an interesting model to understand the genetic basis of behaviour. However, they are not as popular for behavioural and ecology studies, probably due to the lack of knowledge regarding wild zebrafish’s nature as an individual and a social creature. Indeed, laboratory zebrafish lines have evolved over generations. While they have increased their reproductive capacity, they have also lost their fear of predators and evading strategies1. Two domesticated zebrafish strains are commonly found in laboratories: the leopard danio which presents a spotted rather than a stripped pattern and arose by spontaneous mutation from the wild type D. rerio, and the longfin D. rerio which has elongated fins, resulting from a dominant mutation. TL or Tübingen is the wild-type strain which is generally featured in experiments and carries both aforementioned mutations1

Figure 1: Leopard D. rerio.

Figure 2: Longfin D. Rerio.

Wild zebrafish

Zebrafish can be found in their natural habitat all over the Indian subcontinent1. They usually occupy slow moving and standing water bodies such as floodplains, man-made lakes, ponds and irrigation channels. However, some studies have reported zebrafish living in small rivers and streams. When zebrafish reside in shallow waterbodies, they usually remain at a depth of 30 cm, in unshaded locations and where aquatic vegetation and silty substratum can be found1. On the other hand, zebrafish found in moving water flows generally remain within the margins of the river or stream2 and maintain a vertical distribution to occupy the whole water column1. While zebrafish tend to be the most abundant species within their habitat, they also seem to assemble with other species2. Esomus danricus and Aplocheilus panchax are a few of the many species which have been found to cohabit with Danio rerio3, although they are potential competitors

Figure 3: Esomus danricus (Indian flying barb).

Figure 4: Aplocheilus panchax (blue panchax).

The most common zebrafish predators are snakeheads and freshwater garfish but catfish and some avian species have also been identified as threats. Additionally, adult zebrafish have been found to be zebrafish eggs and larvae predators. Zebrafish display fright reactions to predators in response to visual and olfactory cues1. Additionally, alarm behaviours are triggered in response to pheromones released upon injury. These behaviours translate in an increased shoal cohesion and either agitated swimming or freezing, increased aggression and decreased feeding.

Zebrafish social behaviours

Zebrafish are social creatures. Zebrafish shoal as soon as they have hatched. However, shoaling preferences depend on rearing conditions. Indeed, zebrafish reared in isolation do not discriminate among shoals of conspecifics or other species1. Additionally, cross-reared zebrafish show a preference for associating with other species. Association preferences seem to be related to phenotypes and stripes appear to be a key shoaling cue4. Therefore, species recognition in the zebrafish is based on phenotype matching against a template according to early experience1. In addition to pattern recognition, zebrafish also use olfactory cues for species and kin recognition1. Although individual recognition and phenotype matching are significant in shoaling decisions, shoal size and activity levels are also important. Indeed, zebrafish usually show a preference for larger shoals1. Interestingly, environmental factors and sexes can affect these preferences. For instance, colder water will increase preference based on activity level rather than size. Moreover, male zebrafish will privilege shoals with many females rather than a large group size5.

Among their shoals, zebrafish establish dominance hierarchies which may involve aggressive behaviours, ranging from chasing to biting attitudes. To establish dominance, two fish will interact head to tail and circle one another1. Once dominance has been determined it remains stable over time. Dominance is installed during mating and foraging and aggressive behaviours can be observed around food patches as well as rearing environments1 These behaviours and interactions make zebrafish potential models to explore behavioural and development plasticity.


To study zebrafish behaviours, robotic lures have been found to be very useful. Indeed, robots gather many characteristics which make them perfect models to interact with zebrafish and study social behaviours. First of all, robots can be built and modulated as desired to fit within the environment and social context of the model of interest. Furthermore, they are easy to control. Finally, as they are physical entities they will be able to have real interactions within a social circle and communicate with living creatures. Such an ecological setup is ideal to observe social behaviours and reproduce dynamics and actions as they would occur in nature6. Using robots is therefore not only useful to study zebrafish behaviours but also to influence and modulate them.

The first robotic devices built to interact with animals among a mixed animal-robot society were developed within the context of the European LEURRE project7. A robot was created to integrate a wild society of cockroaches and constitute a mixed group of robots and animals. The aim of the study was to observe how a robotic device can take part in decisions as a member of the society. This project demonstrated that robots can be socially integrated within a species circle and be a useful tool to interact in a closed-loop with them. Since then, efforts within the robotic field have been concentrated in extending these findings to fish. Four robotic devices have been imagined to interact with fish6. These devices were thought to interact with fish inside or outside of the aquarium and have demonstrated that robots can indirectly modulate fish behaviour through fish lures6. However, none of them interact directly with the fish or reproduce honestly their trajectory and locomotion patterns. For that reason, Bonnet et al. designed a robot capable of integrating zebrafish communities6. By mimicking zebrafish collective behaviours, the robots interact in a closed-loop with the fish.

The laboratory of Robotic Systems at the EPFL designed an experiment to demonstrate that robots can behave similarly to a group of animals and that a mixed robot-animal society will behave in the same way a society uniquely composed of animals would6

Figure 5: Zebrafish lure. The miniature model has the potential to mimic zebrafish’ morphology and movements6.

To this end, they used three miniature wheeled mobile FishBot robots coupled to zebrafish lures which perfectly reproduce fish speed and accelerations. Moreover, an algorithm was developed to determine fish swimming and turning directions. This information is given to the robot’s controller so the robot swims in the same direction as the fish in a closed-loop6. When the robots were programmed to only swim in one direction, the robots influenced the swimming directions of the fish and thus influenced the choices and the behaviour of an entire community6. Additionally, when the robots were set to follow the zebrafish’s decisions rather than imposing a decision, the shoal’s behaviours were similar to the ones of the robots6. Therefore, for robots to integrate a circle of zebrafish and modulate their collective decisions, they need to swim alongside the shoal6.

Figure 6: Experimental setup. A glass fish tank is placed in an aluminium supportive structure.

The experiment was run in a glass fish tank placed in a supportive structure above the ground. The bottom of the aquarium was covered with teflon to avoid any reflections and to create a smooth surface to facilitate motion of the fish lure. The robots were placed underneath the tanks to modulate the lure’s movements through magnetic interactions. The fish were placed in water at 26°C. This way, no distress was caused to the fish. Moreover, water level was around 6 cm so the fish lure wold easily be perceived by the fish. To study collective behaviours, zebrafish were placed in a circular arena and were constrained to swim in a circular corridor. The  direction in which the fish swim (meaning clockwise or anticlockwise) is used to assess the effect of the robots on the collective decisions of the fish6.

At Bionomous, we also offer a customised system to study adult zebrafish behaviours. Our automated setup is built to allow zebrafish to swim in multiple constrained environments while being tracked in real time, using a top camera. This setup is compatible with mobile robots to activate various lures to interact with zebrafish in a closed-loop.

Finding an efficient and ecological way to study zebrafish behaviours is necessary as the use of zebrafish for research is in continuous growth. Indeed, fully understanding a model’s nature in a laboratory setup as well as in the wild is critical to benefit from its full potential. Therefore, robotics offer the potential to further study and understand zebrafish social behaviours as individuals and within a society. Such discoveries might expand the use of zebrafish to other research fields, typically for ecological and behavioural studies.

Share if you liked it! 


  1. Spence, R., Gerlach, G., Lawrence, C. & Smith, C. The behaviour and ecology of the zebrafish, Danio rerio. Biol. Rev. 83, 13–34 (2007).
  2. McClure, M. M., McIntyre, P. B. & McCune, A. R. Notes on the natural diet and habitat of eight danionin fishes, including the zebrafish Danio rerio. J. Fish Biol. 69, 553–570 (2006).
  3. Hamilton, I. M. & Dill, L. M. Monopolization of food by zebrafish ( Danio rerio ) increases in risky habitats. Can. J. Zool. 80, 2164–2169 (2002).
  4. Rosenthal, G. G. & Ryan, M. J. Assortative preferences for stripes in danios. Anim. Behav. 70, 1063–1066 (2005).
  1. Ruhl, N. & McRobert, S. P. The effect of sex and shoal size on shoaling behaviour in Danio rerio. J. Fish Biol. 67, 1318–1326 (2005).
  2. Bonnet, F., Gribovskiy, A., Halloy, J. & Mondada, F. Closed-loop interactions between a shoal of zebrafish and a group of robotic fish in a circular corridor. Swarm Intell. 12, 227–244 (2018).
  3. Halloy, J. et al. Social Integration of Robots into Groups of Cockroaches to Control Self-Organized Choices. Science 318, 1155–1158 (2007).