cover

The Route Detective

How does a map app find the fastest route?
You tap "go" on your phone, and instantly the app announces: "Fastest route found โ€” 23 minutes." ~~How did it do that?~~

You tap "go" on your phone, and instantly the app announces: "Fastest route found โ€” 23 minutes." How did it do that? You didn't measure every street. The app didn't drive down every road. Yet somehow it knows. Let's follow the route the app takes to find your route.

First, the app needs a map โ€” ~~not the picture you see, but a secret map underneath~~ made of dots and lines. **Every in

First, the app needs a map โ€” not the picture you see, but a secret map underneath made of dots and lines. Every intersection is a dot. Every street is a line connecting two dots. Your house is one dot. Your destination is another dot. The app's job: find the best path of lines between them.

~~Now comes the clever part.~~ The app doesn't try every possible route โ€” there are **millions**. Instead, it explores o

Now comes the clever part. The app doesn't try every possible route โ€” there are millions. Instead, it explores outward from your dot like a drop of water spreading across paper. It checks nearby dots first: "Can I get there in 2 minutes? 3 minutes?" It keeps spreading, always choosing the shortest time to each new dot.

But how does it know how long each street takes? ~~It's watching everyone.~~ Right now, **thousands of phones** are movi

But how does it know how long each street takes? It's watching everyone. Right now, thousands of phones are moving down that street โ€” some fast, some stuck in traffic. The app averages their speeds and updates its secret numbers every few minutes. That line between dots? It says "4 minutes today" because real cars just drove it in 4 minutes.

~~The spreading ripple keeps going.~~ When it reaches your destination dot, the app stops and rewinds: "I got here from

The spreading ripple keeps going. When it reaches your destination dot, the app stops and rewinds: "I got here from that dot, which came from that dot, which came fromโ€ฆ" It traces backward, connecting the dots, and suddenly you have a route โ€” the one that took the least time to reach through the spreading search.

~~But wait~~ โ€” what about left turns? What about that weird intersection where you always get stuck? The app knows those

But wait โ€” what about left turns? What about that weird intersection where you always get stuck? The app knows those, too. Each dot has a secret cost: "turning left here adds 30 seconds." The app adds those costs while it spreads, so the route it finds avoids the annoying stuff.

Sometimes the app offers you three routes: the fastest, the one with no highways, the scenic one. ~~It's not finding thr

Sometimes the app offers you three routes: the fastest, the one with no highways, the scenic one. It's not finding three routes โ€” it's finding one route three times, using different rules. "Fastest" means minimize time. "No highways" means pretend highway-dots don't exist. Same spreading search, different map.

And if traffic suddenly appears? ~~A red blob blooms~~ on your screen. The app is already **re-spreading from where you

And if traffic suddenly appears? A red blob blooms on your screen. The app is already re-spreading from where you are now, using the new slow speeds it just learned from other phones up ahead. In seconds, it finds a better path and calmly says, "Rerouting." You didn't ask. It just knew.

So that's the trick: ~~the app isn't psychic~~. It's just very fast at spreading, very good at remembering what thousand

So that's the trick: the app isn't psychic. It's just very fast at spreading, very good at remembering what thousands of other phones just learned, and very patient about checking dots in order. The fastest route isn't out there waiting to be found โ€” it's built, dot by dot, every time you tap "go."

How was this book?

A Wonderleaf Book

The Route Detective

โ€” How does a map app find the fastest route? โ€”

Wonderleaf Editions
โ€” ex libris โ€”
A Wonderleaf Book

The Route Detective

How does a map app find the fastest route?

Wonderleaf Editions ยท MMXXVI
Scene 1
You tap "go" on your phone, and instantly the app announces: "Fastest route found โ€” 23 minutes." ~~How did it do that?~~
The Route Detective2
Scene 1

You tap "go" on your phone, and instantly the app announces: "Fastest route found โ€” 23 minutes." How did it do that? You didn't measure every street. The app didn't drive down every road. Yet somehow it knows. Let's follow the route the app takes to find your route.

3The Route Detective
Scene 2
First, the app needs a map โ€” ~~not the picture you see, but a secret map underneath~~ made of dots and lines. **Every in
The Route Detective4
Scene 2

First, the app needs a map โ€” not the picture you see, but a secret map underneath made of dots and lines. Every intersection is a dot. Every street is a line connecting two dots. Your house is one dot. Your destination is another dot. The app's job: find the best path of lines between them.

5The Route Detective
Scene 3
~~Now comes the clever part.~~ The app doesn't try every possible route โ€” there are **millions**. Instead, it explores o
The Route Detective6
Scene 3

Now comes the clever part. The app doesn't try every possible route โ€” there are millions. Instead, it explores outward from your dot like a drop of water spreading across paper. It checks nearby dots first: "Can I get there in 2 minutes? 3 minutes?" It keeps spreading, always choosing the shortest time to each new dot.

7The Route Detective
Scene 4
But how does it know how long each street takes? ~~It's watching everyone.~~ Right now, **thousands of phones** are movi
The Route Detective8
Scene 4

But how does it know how long each street takes? It's watching everyone. Right now, thousands of phones are moving down that street โ€” some fast, some stuck in traffic. The app averages their speeds and updates its secret numbers every few minutes. That line between dots? It says "4 minutes today" because real cars just drove it in 4 minutes.

9The Route Detective
Scene 5
~~The spreading ripple keeps going.~~ When it reaches your destination dot, the app stops and rewinds: "I got here from
The Route Detective10
Scene 5

The spreading ripple keeps going. When it reaches your destination dot, the app stops and rewinds: "I got here from that dot, which came from that dot, which came fromโ€ฆ" It traces backward, connecting the dots, and suddenly you have a route โ€” the one that took the least time to reach through the spreading search.

11The Route Detective
Scene 6
~~But wait~~ โ€” what about left turns? What about that weird intersection where you always get stuck? The app knows those
The Route Detective12
Scene 6

But wait โ€” what about left turns? What about that weird intersection where you always get stuck? The app knows those, too. Each dot has a secret cost: "turning left here adds 30 seconds." The app adds those costs while it spreads, so the route it finds avoids the annoying stuff.

13The Route Detective
Scene 7
Sometimes the app offers you three routes: the fastest, the one with no highways, the scenic one. ~~It's not finding thr
The Route Detective14
Scene 7

Sometimes the app offers you three routes: the fastest, the one with no highways, the scenic one. It's not finding three routes โ€” it's finding one route three times, using different rules. "Fastest" means minimize time. "No highways" means pretend highway-dots don't exist. Same spreading search, different map.

15The Route Detective
Scene 8
And if traffic suddenly appears? ~~A red blob blooms~~ on your screen. The app is already **re-spreading from where you
The Route Detective16
Scene 8

And if traffic suddenly appears? A red blob blooms on your screen. The app is already re-spreading from where you are now, using the new slow speeds it just learned from other phones up ahead. In seconds, it finds a better path and calmly says, "Rerouting." You didn't ask. It just knew.

17The Route Detective
Scene 9
So that's the trick: ~~the app isn't psychic~~. It's just very fast at spreading, very good at remembering what thousand
The Route Detective18
Scene 9

So that's the trick: the app isn't psychic. It's just very fast at spreading, very good at remembering what thousands of other phones just learned, and very patient about checking dots in order. The fastest route isn't out there waiting to be found โ€” it's built, dot by dot, every time you tap "go."

19The Route Detective

~ finis ~

Tiny picture books for big little questions.

โ€” a small constellation of questions โ€”
โœฆWonderleaf
Editions