Laboratory of Autonomous Robotics
and Artificial Life


Institute of Cognitive Sciences and Technologies, CNR

Co-evolving Predator and Prey Robots

Dario Floreano, Francesco Mondada, Stefano Nolfi

In these experiment we co-evolved predator and prey robots. The task of the prey is to escape the predator (the fitness of the prey corresponds to the number of predators that it is able to avoid during 10 trials). The task of the predator is to catch the prey (the fitness of the predator correspond to the number of preys captured during 10 trials).


Figure 1. Left: The prey and the predator robots (from left to right). The prey robot is faster but only have infrared sensors that provide information on its local environment. The predator is slower than the prey but also has a camera with which it can identify the prey from a long distance. Right: The environment in which the robots co-evolve consists of an arena surrounded by walls. The cable have rotating contacts and provide the electric power to the two robots so to avoid the need to recharge their batteries. 

One interesting aspect of these experiments is that the task of the two species of robots become progressively more complex. In the first generations, in fact, predators should capture prey that display simple behaviors and prey should escape predators that have not jet evolved behavior. Therefore the task is simple for both species. In the successive generations, however, predators and prey display progressively more complex and effective behavior so that the task become progressively more complex. The continuation of this process might lead to an 'arms race' in which the two species are forced to develop progressively more complex behaviors.

One further aspect to notice is that the two species tend to select behaviors that are adapted and tuned to the behavior currently exhibited by the competitors. This force co-evolving robots to continuously develop new behavioral strategies that are effective against ever changing competitors.

This latter aspect can be clearly seen in the following videos:

The video on the left shows the behavior of two typical predators and prey. These two robots belong to different generations and therefore did not "lived" in the same evolutionary period.   As you can seen, the prey robot moves fast in the environment avoiding walls by trying to exploit its speed. The predator locates the prey and follows it in the attempt to catch it but is unable to reach it given that the prey is faster. 

The video on the right, instead, shows the behavior of two individuals of the same generations. The prey move fast avoiding walls also in this case. The predator, on the other hand, developed a strategy that is effective against this type of prey that consists in waiting the right moment to attack by anticipating the prey.

Finally, an interesting aspect to observe is that by evolving robots that adapt during their lifetime as a result of a learning process we observed the emergenve of robots able to display different behavioral strategies and to select the right strategy at the right moment. In particular, we observed the emergence of predators that first check the behavior displayed by the current prey and then : (a) move straight toward the prey by trying to catch it (if the prey does not move to much to avoid to be anticipated), or (b) wait the right moment to attack by trying to anticipate the prey (if the prey move fast by trying to exploit its speed).

This work has been one of the main source of inspiration of the fiction book of Michael Crichton, Prey.


Nolfi S., Floreano D. (1998). Co-evolving predator and prey robots: Do 'arm races' arise in artificial evolution? Artificial Life, 4 (4), pp. 311-335. pdf

Floreano D., Nolfi S. (1997). God Save the red Queen! Competition in co-evolutionary robotics. In J.R.Koza, K.Deb, M.Dorigo, D.Foegel, B.Garzon, H.Iba & R.L.Riolo (Eds.) Genetic Programming 1997: Proceedings of the Second Annual Conference. San Francisco, CA: Morgan Kaufmann, pp. 398-406, pdf

Floreano D., Nolfi S. (1997). Adaptive behavior in competing co-evolving species. In P. Husband & I. Harvey (Eds), Proceedings of the Fourth Conference on Artificial Life, MIT Press, Cambridge, MA, 378-387, pdf