If you have to walk a different route to the shops, it's normally not too much of a stretch to consult our 'inner satnav' and chart a new course.
That's because the human brain has a range of built-in mechanisms that help you find your way.
But the underlying brain computation that goes into even simple navigation, such as planning the most direct route between points A and B, remains pretty murky.
Now, neuroscientists can unpick the navigational circuitry of the human brain by looking at artificial versions.
A team from Google DeepMind and University College London in the United Kingdom have trained a form of artificial intelligence to traverse a virtual environment from one point to another.
The computer program, described in the journal Nature today, developed "neurons" similar to "grid cells", which are the brain cells found in mammals that bestow navigation skills.
Grid cells were discovered in 2005 by Norwegian neuroscientists May-Britt and Edvard Moser, earning them a share of the 2014 medicine Nobel Prize.
When a rat wanders around, its grid cells fire. And when scientists measured where a rat was located when grid cells fired, those spots — called "firing fields" — formed a hexagonal pattern.
They don't work alone; grid cells operate with other brain cells to help us keep our bearings.
For instance, "place cells" activate when a mammal occupies a specific location, and "head direction cells" — unsurprisingly — fire when its head points in a specific direction.
This internal navigation system evolved in mammals over tens of millions of years. Could an artificial system be trained to do the same?
From mammal to machine
To find out, the DeepMind team started with a neural network: a series of algorithms inspired by the brain, said University of Queensland computational neuroscientist Geoffrey Goodhill, who was not involved in the study.
"We know the brain learns by changing strengths of connections between neurons," Professor Goodhill said.
Over the past few years, DeepMind has unveiled headline-grabbing computer programs which rely on neural networks.
AlphaGo played the board game Go so well it trounced professional players. It was blitzed by its successor, AlphaGo Zero, which won 100 games to zero.
But even AlphaGo Zero was no match for what came next — AlphaZero. With less than a day of training, AlphaZero beat world-champion programs in chess, the Japanese game of shogi and Go.
While DeepMind states that brain research can benefit from artificial intelligence, "up to now, its work hasn't really fed back into helping understand neuroscience," Professor Goodhill said.
"But that's what this paper starts to do."
The DeepMind team trained a neural network to navigate a virtual 2.2 by 2.2-metre environment with what's called "path integration", which adds distance and direction to track location.
Mammals commonly use path integration. It doesn't rely on landmarks, so it's a great way to get around in the dark — like navigating the path from bed to the toilet in the middle of the night.
After being trained, the DeepMind neural network developed "grid units", which fired in a hexagonal pattern — just like grid cells found in our brain.
They weren't deliberately programmed to arise.
The DeepMind team retrained their network 100 times. Grid cells emerged each time.
Grid cells help calculate shortcuts
So, DeepMind had a network with grid cells. Could they use it to create a program that could navigate unfamiliar environments and calculate a direct route from A to B?
To test this, they incorporated the grid-cell network into a larger system designed to navigate virtual environments.
Their "artificial agent" received velocity information and images of its surrounds, like a real animal.
When the artificial agent was let loose in a virtual environment, it was able to adjust its route to take a shortcut, even in unfamiliar regions.
This skill is called "vector-based navigation".
Remove the grid cells from the neural network, and the artificial agent struggled to get around efficiently.
The work supports the idea that grid cells in the brain are important to plan and calculate a path, even if you've not been there before.
"We have found evidence that the function of grid cells may extend far beyond solely giving us a GPS-like localisation signal," said Dharshan Kumaran, DeepMind researcher and study co-author.
More AI insights to come
Finding brain-like features in a trained neural network isn't new, Professor Goodhill said.
"You often find in these networks that there will be internal representations similar to the internal representations you find in the brain," he said.
One example is neural networks that process and categorise images.
"In the visual part of the brain, you have cells which respond to oriented edges," Professor Goodhill said.
"You also find these in artificial networks trained in image processing.
And according to Professor Goodhill, it's just the start of artificial intelligence providing new insights into the workings of the human brain.
"More things will emerge about our own biology. I think there's a lot of potential there," he said.
"It's exciting to see this integration between artificial [intelligence] and neuroscience."