# What's the pathfinding algorithm the human brain uses?

I was trying to build a software simulation of people using different pathways in a city to get from point A to point B. I do know the Dijkstra's algorithm and the A* algorithm, but what they do is to find the shortest path between two nodes. Those algorithms can be used to do it, but they problem is that they only do that, they just find the perfect shortest path. And when I see realistic population movements in a city, I see different people choose different pathways to get from point A to point B, even the same person sometimes chooses a different pathway in two different moments.

I know part of that depends on emotional factors that would be impossible to predict. But my point is that when you look at a map and you decide yourself the path you are going to use to go from you location to a desired destination, you don't seem to run a Dijkstra or A* algorithm in your brain. In fact, I can't possible know the length of every road which is something necessary to run a Dijkstra or an A* algorithm. What algorithm does the brain use to choose a path? It's clearly not always the shortest path. I'm not just talking about the seemingly randomness that other factors like safety of the road can add to the result, or other emotional factors. Because even if my only goal is to choose the shortest path between two points, I am probably going to choose a pathway that is different from the one another person would choose, even with the same goal. I even saw that men and women tend to have brains adapted for this in a different way; in this Brain Games episode from National Geographic they briefly mention it, I don't know how scientifically accurate it is, but well, that's why I am asking.

I shorter words, I'm curious about the actual pathfinding algorithm the human brain uses. If there's one at all. Is there any paper or source that I could read about this?

• Welcome to Psychology.SE. Choosing the “shortest” route has different connotations with different people. Shortest could mean that, but it could actually mean quickest. Shortest could also take known road blocks or bottlenecks into account. There are a lot of factors which need to be born to mind and therefore your question unfortunately could be closed for being too broad for this reason unless you could narrow your definition of shortest for the purposes of the question. I would also argue that the brain doesn’t specifically choose the route. It is you who consciously chooses it.... – Chris Rogers Jun 25 '19 at 10:10
• ... What have you read on the subject of conscious choices and the psychology and neuroscience behind them? – Chris Rogers Jun 25 '19 at 10:11
• Well I'm not too focused particularly on "the shortest route". As I said, that's what the Dijkstra algorithm does, but it does choose the mathematical perfect shortest route between two nodes. I'm more interested in what algorithm does the human mind use to pick a route based on a certain goal: it could be the shortest route, the fastest route, the safest one, a combination of all those, it doesn't matter. I'm more interested in the neurological mechanism behind it (the algorithm) for how to trace a particular path to get from point A to point B. I don't know much about those subjects. – Dimakhaerus Jun 25 '19 at 10:21
• @ChrisRogers What's the difference between your brain choosing a route and you choosing a route? – Bryan Krause Jun 25 '19 at 21:36
• – Arnon Weinberg Jul 2 '19 at 6:01