Researchers found sheepdog follow two simple rules when it comes to herding livestock.  

The finding could help lead to the development of robots that can gather and herd livestock, control crowds, and even help clean up the environment, the Natural Environment Research Council reported.

For the first time scientists used GPS technology to look at how sheepdogs are so proficient at their herding jobs Until researchers were not sure how dogs got stubborn sheep to move in the direction they wanted with such ease.

The researchers fitted the sheep and a sheepdog with backpacks containing extremely accurate GPS devices. They then used the acquired data coupled with computer simulations to create a "mathematical shepherding  model."

The team found dogs usually just use two simple rules in their method: one in which the livestock are dispersed and driven forward and another where they are aggregated. The model revealed a single shepherd could herd a flock of more than 100 individuals by employing these rules.

"If you watch sheepdogs rounding up sheep, the dog weaves back and forth behind the flock in exactly the way that we see in the model," said NERC fellow, Andrew King of Swansea University. "We had to think about what the dog could see to develop our model. It basically sees white, fluffy things in front of it. If the dog sees gaps between the sheep, or the gaps are getting bigger, the dog needs to bring them together."

At every time step in the model the dog made a decision about whether or not the herd was adequately cohesive. If the herd was determined to be cohesive the dog would start pushing them towards the target.

"Other models don't appear to be able to herd really big groups - as soon as the number of individuals gets above 50 you start needing multiple shepherds or sheepdogs," King said. "There are numerous applications for this knowledge, such as crowd control, cleaning up the environment, herding of livestock, keeping animals away from sensitive areas, and collecting or guiding groups of exploring robots."

The findings were published in the Journal of the Royal Society Interface.