When we dream, we work out the problems and anxieties we come across in our waking hours. But according to a recent study from University College London, humans may not be the only ones who do this.

Researchers from UCL's Institute of Behavioural Neuroscience measured brain activity in a group of four rats and found results that suggested when the animals observed food they couldn't get to, in their dreams, they constructed alternate routes to reach their desired destination.

Related: Secrets to a Good Night's Sleep: The Do's, Don'ts and What We Still Don't Know

For this study, the team paid focused on the hippocampus, the part of the brain that deals with memories, emotions and navigating the world around us. They measured the activity of detail-storing "place cells" in the rat's brains, when they were awake and when they were asleep.

In the experiment, the scientists set up a T-shaped track and had the rats run the course -- but they purposefully put the food in a part of the track that the animals could see but couldn't reach, thanks to a transparent barrier. After animals slept, they were put back in the track and we're allowed free reign of the space. The rat's brain activity was monitored during periods of rest and visits to the track.

Related: This Is Your Brain on Not Enough Sleep (Infographic)

Researchers found that when the rats were put back on the track, the place where they had seen the food but were unable to reach it, caused the rats' place cells to fire in the same patterns as when they were sleeping.

Senior author Dr. Hugo Spiers explained that when an animal goes exploring, they house a map of the space in the hippocampus, and when they are resting, they essentially "replay" what they saw when they were awake, according to a release from the University. "It has been speculated that such replay might form the content of dreams," said Spiers.

Related: Your DNA Might Determine If You're an Early Bird or a Night Owl

Of their findings, co-lead author Dr Freyja Ólafsdóttir noted “What’s surprising here is that we see the hippocampus planning for the future, actually rehearsing totally novel journeys that the animals need to take in order to reach the food.”

The researchers also think that the findings could have an impact on what we know about how both animals and humans think. "Because the rat and human hippocampus are similar, this may explain why patients with damage to their hippocampus struggle to imagine future events,” said Spiers.

Related: Tips to Help You Get Better Sleep -- Tonight!