DeAgostini/Getty Images

The three-spined stickleback -- is it looking for new friends?DeAgostini/Getty Images

Are fish wise to the benefits of having friends?

A study just published in the journal Royal Society B has determined that three-spined sticklebacks can not only recognize other sticklebacks they've previously lived among, but will also spend more time with those familiar faces rather than "strangers."

VIDEO: Why Do Fish Come in So Many Colors?

And the kicker? Fish were more likely to find hidden caches of food if their familiar "friends" had also recently found them. Fish friendship has its rewards.

A research team from University of St. Andrews, Anglia Ruskin University and Canada's McMaster University gathered 80 three-spined sticklebacks and put them into two groups for six weeks.

Next, the scientists put the fish into smaller groups of 10, making sure that five fish came from each of the two tanks. The fish in these smaller groups were tagged and their searches for food were videotaped.

The team used statistical analysis techniques to look more closely at the little swimmers' social groups. That's how they observed that the fish tended to hang out more often with familiar fish, and that those hidden stores of food were easier to find for fish that were familiar with each other.

What Do Fish Think About?

"Our study has shown that we can use statistical tools to uncover the fine structure of animal groups, to understand how they move and to predict how information passes among individuals," said Mike Webster, of the University of St Andrews’ School of Biology.

Andrews hopes that his team's research can lead to a greater understanding of group dynamics in animal populations -- how new behaviors can spread and help creatures adapt to environmental changes.

"It could also allow us to track or predict the spread of diseases, and to change the ways that we manage populations of livestock or wild animals in order to minimize the damage that these diseases cause," Webster added.