The farm animals were shown pairs of faces.
If they walked towards the picture of a face they had seen before, they were given some food.
Amazingly, some sheep scored eight out of 10 in the test - and could even recognise pictures they had seen two years ago.
Do I know ewe?
Even the shepherd's face was remembered, along with the other members of the flock.
Dr Keith Kendrik, who ran the tests, thinks that if sheep can remember faces they must have some intelligence.