Skip main navigation

Predator Prey

Professor William Harwin uses a simulation to show a Braitenberg vehicle mimicking predator prey behaviour. Watch this video to find out more.
OK, what we’re going to do next is just use these two very simple ideas to initiate a predator-prey system. So let’s get rid of all the lights and the and the basic Braitenberg vehicles, and create a predator-prey system. So what we’re going to do is we’re going to create prey first. So we’ll make that. And we’ll just show you the dumb prey. Now, the dumb prey is exactly the same as a shy seeker, exactly the same behaviour. A slight difference, in the vehicles. Because prey tend to have eyes that face out a bit. We’ve done the same thing here. We’ve made the prey’s eye face out a bit more so if can see lights in a wider scan around.
We’ll now add a predator to this particular system. So let’s put a predator in. And predators see lights. But the lights this time are on the prey. It doesn’t see the light in the middle of the screen. It only sees the light on the prey. So predator is moving towards the prey. And essentially captures the prey. Now, that’s quite interesting. But the dumb prey has no response at all to the predator. So what we’re going to do is give the prey both a light shy seeking behaviour. So the prey is going to look towards light as if it was food.
But at the same time give it a sense of what the predator is doing by looking at the light on the predator. So it can respond both to the food and predator. Prey can’t see the predator at the moment. But the predator saw it. And in fact, the predator’s now chasing after the bright prey. Bright prey has now been caught by the predator. But things keep going. So actually let’s take this other dumb prey and make it into a bright prey.
So we’ll make that into a bright prey. Now we’re in a situation that the predator can’t see anything. The bright prey are now very happy around the light.
And so the world’s going to be relatively static now. So until we move one of these bright prey so it can be seen by the predator. So we’ll just move the bright prey. And it’s now in a position where it’s being chased. Predator now can see. Oops, that bright prey isn’t too bright. But it did respond slightly to the predator and is being moved away. We can add more light for the prey animals.
And in fact, we can add additional predators and prey into the system. We can make it more interesting for the predator and sort of observe the behaviour the prey as they try to escape from the predator.
Now it is also possible to set the system up. So you can actually have the point of view of either the prey or the predator. Which is quite interesting because you can sort of see the situations where the predator actually creeps up on the prey and the pray is unaware of what’s happening. But the predator goes very slowly, speeding up as it gets towards the prey animal.

In this video William demonstrates his second simulation, to show how you can assign lights to Braitenberg vehicles, to make them act as predator and prey.

The Braitenberg vehicles are hard wired to either move around searching for or avoiding lights. In real life, animals or insects move around looking for food or avoiding predators that want to eat it.

A predator is an animal that feeds on another.

A prey is an animal that is eaten by another – though itself will need food (which may be plants that don’t move).

A classic predator-prey example is foxes and rabbits.

As William demonstrates in this video, Braitenberg vehicles can be programmed to mimic Predator-Prey behaviour as follows:

  • First we ensure sensors can detect different colour light.
  • Prey food is coloured one way
  • Predators are coloured differently
    • Prey seeks food colour and avoids predator colour
  • Prey themselves are given a different colour light
    • Predators seek the light of the prey
This article is from the free online

Begin Robotics

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education