The next time you see a rat darting for cover, consider this: it might just want to have a playful game of hide-and-seek.

A group of neuroscientists in Germany spent several weeks hanging out with rodents in a small room filled with boxes, and found the animals were surprisingly adept at the childhood game – even without being given food as a reward.

They recorded joyful leaps and ultrasonic giggles – which previous work has shown to be signs of happiness – when the rats found the humans or were caught by them.

The researchers’ paper was published in the journal Science on Thursday, and offers new insight into play behaviour, an important evolutionary trait among mammals.

“When you work a lot with rats over the years, you see how intelligent these animals are, and how social,” said co-author Konstantin Hartmann from the Humboldt University of Berlin.

Working with adolescent male rats in a room of 30 square metres (320 square feet), a scientist would either find a cardboard box to crouch behind in a hiding role, or give the rat a headstart to find cover while the scientist searched.

Over a period of one to two weeks, the rats were taught that starting the game inside a closed box that was opened remotely meant they were seeking, while starting the game with the box open meant they were hiding.

They quickly developed advanced strategies, including revisiting spots humans had previously hidden when they were seeking, and choosing to take cover in opaque rather than transparent boxes when hiding.

To help train them, the authors rewarded the rats not with food or water, which would invalidate the experiment, but with positive social interaction in the form of physical contact, explained Hartmann.

“They chase our hand, we tickle them from the side, it’s like a back and forth a little bit like how you play with small kittens or puppies,” he said.

The scientists suspect though that the rats were motivated not just by this interaction but that they also liked to play for the sake of play itself.

The animals would let out high-pitched giggles three times above the human audible range and would execute so-called “joy jumps” during the game – both associated with feelings of happiness.

Once they were discovered, the rats often jumped away and “playfully re-hid” at a new location, sometimes repeating the process several times – indicating they wanted to prolong the play session and delay the reward.

Play is an important part of cognitive development for adolescent mammals, and rats make for ideal models to study brain activity in humans because of their evolutionary proximity to humans.