Listen up loners: A new study says having friends can make you smarter, at least if you’re a baby cow.

Researchers from the University of British Columbia found that young calves that live alone performed worse on tests of cognitive skill than calves that live with a buddy.

On most dairy farms, calves are removed from their mothers soon after they are born and put in a pen or a hutch where they live alone for eight to 10 weeks while they wean. The practice developed to keep disease from spreading among susceptible baby cows.

But a few years ago, researchers at UBC’s Animal Welfare Program were observing two sets of calves on a farm run by the school. One set of calves had been raised in a group environment — the other set had been raised individually.

When the two groups joined the herd, the researchers noted that the individually raised calves took longer to figure out how to find the feed and operate the feeder than the calves that had been raised in a more social environment. The individually raised calves also seemed unable to regulate their behavior.

“They were kind of like that annoying kid on the playground,” said Dan Weary, a professor at UBC’s Animal Welfare Program, and an author of the study’s paper published in PLOS ONE.

“First they were really shy, and then they started following the other calves around and wouldn’t leave them alone. It was like they didn’t have an off switch,” he said.

To determine what was going on, the researchers designed two tests to see if cows raised in groups are smarter than cows raised alone.

The first test, borrowed from the world of lab rat testing, evaluated the calves’ ability to re-learn something.

The researchers built a Y-shaped maze with a white bottle on one end and a black bottle on the other. When the calves first took the test, the white bottle had milk and the black bottle was empty. After the calves got used to this outcome, however, the researchers changed the test—putting the milk in the black bottle and leaving the white bottle empty.

It took both sets of calves about the same amount of time to learn that the white bottle had the milk, but it took the individually raised calves longer to figure out where the milk was when the researchers changed it to the black bottle.

The second test looked at how long it took calves to get bored of a new object. The researchers showed the calves the same object eight times over two days. The calves housed in pairs spent less time examining the object in each successive session. The calves raised alone spent the same time looking at the object each time.

“Most people think dairy cows are creatures of routine, that change is a big deal for these animals,” Weary said, “but maybe that’s because we are setting these animals up to thrive in very simple environments.”

For a calf in a static environment to be successful it needs to learn one rule once, Weary explained. But add another calf to the mix and you add complexity.

On average cows live four years. But while the eight to 10 weeks they spend alone is just a small fraction of their life, it is an important one for their development, Weary said.

In the paper, the authors suggest cows raised in pairs are more flexible than cows raised alone. And, they say, flexible cows are good for dairy farmers. After all, even dairy cows are subjected to changes in their environment such as interacting with new robotic milking equipment and automated feeders.

“Individuals that are more flexible might adapt more quickly to these changes, improving the lives of the animals and the farmers that work with them,” the authors write.