# 'Two simple rules' explain sheepdog behaviour

The relationship between a shepherd and his sheepdog has always seemed almost magical, but scientists now say it can be explained by two simple rules.

Researchers have used GPS data to reveal the mathematical secrets of how sheepdogs do their job.

The new model helps to explain why one shepherd and a single dog can herd an unruly flock of more than 100 sheep.

It could be used to help develop "shepherd robots", for controlling crowds or cleaning up an oil spill.

The first rule: The sheepdog learns how to make the sheep come together in a flock. The second rule: Whenever the sheep are in a tightly knit group, the dog pushes them forwards.

## Selfish herd

NERC fellow Dr Andrew King of Swansea University helped to design backpacks fitted with highly accurate GPS technology. These trackers were attached to a flock of sheep and a sheepdog.

"At the beginning we had lots of different ideas. We started out looking from a birds eye view, but then we realised we needed to see what the dog sees. It sees white, fluffy things. If there are gaps between them or the gaps get bigger, the dogs needs to bring them together."

According to Dr King, sheepdogs are making the most of the "selfish herd theory" to bring the animals close together and move them where they want.

"One of the things that sheep are really good at is responding to a threat by working with their neighbours. It's the selfish herd theory: put something between the threat and you. Individuals try to minimise the chance of anything happening to them, so they move towards the centre of a group."

A colleague, Dr Daniel Strombom from Uppsala University in Sweden, used the GPS data from the collars to develop computer simulations. This enabled them to develop a mathematical shepherding model.

The algorithm displays the same weaving pattern exhibited by sheepdogs. It helps to solve what has been called the 'the shepherding problem': how one agent can control a large number of unwilling agents.

The research was published in Journal of the Royal Society Interface.

## 'No surprises'

Biologist Dr King also studies swarm behaviour in other species, such as baboons and fish.

"If you are looking at a shoal of fish, it's really unpredictable. You can't just rock up with a camera. With this research you could get really good fine detail because you could reproduce it."

The scientists hope that the principle can be applied in many different contexts.

"Perhaps mathematicians and engineers or roboticists could put this in to their modelling. For example, if you want to send out swarms of drones to gather information and bring them all back."

There may be environmental uses too. "If you think of oil on top of water that you want to bring together, in theory you could develop a robot using this model that could help do this."

However, some shepherds are sceptical of the value of the research.

"It confirms something that shepherds know from many years of watching and working with border collies," said Jane Drinkwater, a shepherd in South Wales.

"Their instinct is to get around the prey, and to draw the prey together as one bunch. The only thing I would say is that they won't always pull the prey towards the handler - they may by instinct head in the opposite direction."