In a gray, linoleum-floored laboratory in Vienna, two dogs sit in side-by-side enclosures. One dog pulls a handle, and a tray laden with sausage moves down to where the other dog can reach it and excitedly gulp it down. How many times the first dog does this—giving a gift to another, with no benefit to itself—is a measure of what cognition researchers call “prosociality,” or, in essence, generosity. Specifically, how many times it gives food to a friend, or a strange dog, or just offers it to an empty enclosure can help researchers understand whether prosociality exists in dogs, part of a larger quest to understand which creatures are capable of generosity and how and when the trait evolved.

In the past, the Messerli Research Institute scientists who run this particular facility at University of Vienna have found that pet dogs give more to their friends—dogs who live in the same house with them—than to strangers. That fits with the idea that prosociality reinforces social bonds and may have evolved because it contributes to cooperation.

In a new study, however, they report that changing the procedure from simple handle-pulling to a more complex task gives different results. With this task—dogs touching buttons with their noses, cuing a researcher to slide a plate of food under the barrier to the other chamber—dogs still give more to friends than strangers. But, they also give food to an empty chamber when a friend or a stranger is leashed nearby. And, weirdly, they give even less food to a stranger than an empty room. These results don’t fit with the earlier, clearer signs of prosociality in dogs, says Mylene Chaumette, one of the first authors of the paper. It suggests that the task may have been too complex for the dogs to understand exactly what they were doing—they may have been performing the new task simply out of excitement from having learned a new trick, or reacting to the proximity of their friends, rather than comprehending the goal.