Google Maps (& similar apps) Directions Algorithm

Hmm, why would the algorithm differ between shortest and fastest? It’s just a different set of costs assigned to each road segment.

That’s true. But I would hope it would take into account turns/stoplights/stop signs and such. That really slows you down.

My department manages a road network. For emergency vehicles, we allow them to go on paved bike trails if they are wide enough. Also, we can take in how steep a hill is, or if it would be legal or possible for it to cross a median.

But turns/stoplights/stop signs and so on would, in the aggregate, just manifest as a different total weight for the road. So if two roads are both 35 MPH, but one has a lot more stoplights and side streets than the other, it might end up having a lower effective speed… but storing that effective speed in the database is no more difficult than storing 35 MPH would be.

My preference is always to go past the gas station where I buy gas. It never remembers that. But I’m using a business-attached account, so it refuses to remember my travel history at all. (My guess is that people didn’t want their employers to have access to that kind of information).

If I leave the house at 7:30 AM, it directs me down the freeway. Not realizing that by the time I get to the city (8:30AM), that sucker is gonna be stationary at the city end.

(I get all kinds of garbage for routes where Google doesn’t know that crossings or intersections exist, or where roads were blocked decades ago. Even worse for pedestrians

Here is a crazy idea for someone to falsify: perhaps part of the algorithm is to deliberately throw in some alternative routing, in order to continually probe the network and detect slowdowns, road closures, etc.? That is one hypothetical explanation as to why someone might be getting different directions for a routine daily drive, though it may be far-fetched.

Alternately, if there are a bunch of people going between (roughly) the same points, you don’t want to put them all onto the same route, even if it is “best”, because then that one route would become so clogged that it wouldn’t be best any more. So you put 60% of the traffic on the route that’s 3 lanes each way, and 40% on the route that’s 2 lanes each way.

What always cu guessed me about Google maps was that it would take me somewhere one tour then a totally different way on the return trip. Even late at night when traffic want as issue.

Also, for the longest time I always wondered how Maps knows so much about local traffic conditions, knowing almost exactly where a slow up started in even the smallest street (indicated by green, yellow and red highlights in the route). Then it occurred to me, probably every Google phone that had location turned on is sending speed information to Google.

It’s really quite amazing, especially something like me who spent 20 years as a Service Tech for BellSouth using paper maps to navigate. Young people have no idea how amazing this technology is, always being there for them.

Yep, and on any route that has a decent amount of traffic and regular commuters it’s possible to infer a lot about traffic conditions.

I saw a YouTube video that I probably have no hope of ever finding again where a guy was showing a line of stopped traffic on a local street and the corresponding red indication in Google Mpas. He then proceeded to hop on his motorcycle and lane split his way through that traffic at or near the regular speed limit. And then, because the sample size was small or whatever, the road then magically switched to green as the algorithm took his maneuver as indication that the traffic had cleared. That was the first time I realized that much of this traffic info is user generated.

You can opt out of sharing your information with Google. But most people don’t bother to.

What surprised me was once, I asked for directions from a certain point on the West Side to a certain point downtown, by bicycle. I knew how to get there, but I wasn’t sure which bridge-crossing would give me the shortest route (the Cuyahoga River separates the west side from downtown, so all routes must be channeled over one of a small number of bridges). What surprised me was that the downtown part of the route took all of the same unintuitive zig-zaggy turns that I would have taken, learned from long experience of which lanes are harder to cross over, and such. Until I realized that the population of people biking from the West Side to that particular destination downtown while carrying a droid probably consists mostly of me.

Prune might not have been the right word- I meant that it probably has some kind of way to identify routes that are already losing, and stops calculating any further.

I know of that setting & have it set to fastest. What I’m talking about is needing it for the first mile (say you invited me over. I need directions out of your neighborhood back to the main road/interstate; after that I know the way home) & then just keeping it on after that but actually going my own route.

Once I miss a turn, it keeps trying to route me back to that ‘missed’ road for some period of time, a mile or two. Eventually it gives up & decides that I’m so far along my ‘new’ route that it’s longer to go back to the way it wanted me to go & calculates a new route but the ‘new’ route (my way) is now faster than the way it originally tried to take me.

In that case I can only speculate that the GPS was cheating and the original “fastest” route was not the mathematically optimal fastest route— maybe it was indeed doing some “pruning” because the regular search algorithm was too slow for whatever reason and you had to get going. Or it could have been using some sort of A* algorithm with a non-optimal heuristic; there are are a lot of possibilities (I presume the precise algorithm used is a secret).