Can a Drone Keep a Map True? Weeks 2-4: Fly Only Where It Matters
In week 1 I taught a simulated drone to see cars on Paris streets. That was the easy part. The question of the project is harder: can a drone keep a map true by flying only where a look can change a decision? Weeks 2 to 4 answer it, with the rules written down before the scores. The answer is yes, but the margin is smaller than the headline number says, and that is the interesting part.
The source is on GitHub: mraad/map-keeper. The simulator is mraad/drone-sim.
A street network small enough to be exact
The decision is a car route from Place Saint-Michel (A) on the left bank to the Hôtel de Ville (B) on the right bank. Every route must cross Île de la Cité. I wanted exact inference over every combination of open and blocked streets, with no sampling and no approximation. My own inquisitive-map code does that, with a hard limit: 24 nodes, 40 segments, 256 routes and 12 uncertain segments, so 212 = 4,096 possible worlds.
The OpenStreetMap data of the scene has 315 intersections and 390 segments. A script reduces it to fit:
- Keep primary, secondary and tertiary streets.
- Merge intersections closer than 20 m.
- Remove dead ends, because no A-to-B route uses them.
- Join segments through nodes that touch only two segments.
The result is 15 nodes, 23 segments and 140 routes. With primary and secondary streets only, there were just 4 routes, which is not much of a decision.
A catalog that gets old
The catalog keeps one record per uncertain segment: the probability that the segment was blocked right after the last look, and the time of that look. Between looks, the record ages. I model each segment as a two-state process: a block arrives at rate λ and clears at rate μ, with memoryless waiting times. The belief then has a closed form:
p(t) = π + (p0 − π) · e^(−(λ+μ)·t), π = λ / (λ+μ)
With a mean block of 30 minutes and blocks present 10% of the time, the half-life of a record is 18.7 minutes. Note that the belief does not decay to zero. It returns to the long-run share π. Real blockages are not memoryless, so I also registered a test where the truth is heavy-tailed. More on that below.
Two monitors watch the catalog. A stale monitor flags a record after one half-life. A decision-risk monitor flags a segment only when one look at it is worth 30 seconds or more of expected route time. On average, 10 of 12 records are stale, but only 0.25 segments per world are worth a look. Old data and data that matters are different things.
The detector's false positives, measured where they matter
My first detector model took the week-1 false-positive rate per frame: 0.5 false cars per empty frame. With that rate, a look at an open street reports "blocked" 39% of the time, and almost no look is worth a flight. But those false cars are real cars in the aerial photo, and a car parked beside a street does not block it. The route only cares about a car on the carriageway.
So I wrote a rule before counting: a box counts only if its centre is within 4 m of a street centreline. Then I re-scored the saved week-1 detections. Only 4 of the 21 false boxes were on the carriageway: 1.91 per km of street (95% interval 0.52 to 4.89). The false "blocked" rate now depends on the segment length: 5% for the shortest segment (26 m), 34% for a typical one (220 m) and 67% for Pont Neuf (578 m).
Rules first, then 1,000 worlds
Before writing any policy code, I committed a pre-registration to Git: rates, detector, loss, budget, policies, seeds and the pass/fail gate. The loss is in seconds:
loss = route time (30 km/h) + flight time (10 m/s) + 600 s if the route enters a blocked segment
The decision-aware drone looks at the segment with the largest value of a look per second of flight. It stops when no look is worth its own flight time. Its competitors fly on the same 1,000 worlds with the same detector reports:
- lawnmower: a fixed tour over all 23 segments, 689 s of flight. This sets the flight budget for everyone.
- catalog-only: no flight at all.
- uncertainty-first and random: look at the uncertain segments, with no value model.
- decision-aware, no stop: the same ranking, without the stopping rule.
| Policy (1,000 paired worlds) | Total loss | Flight | Route enters a block | Looks |
|---|---|---|---|---|
| decision-aware | 199.9 s | 5.9 s | 14.4% | 0.59 |
| catalog-only | 208.7 s | 0.0 s | 17.3% | 0 |
| decision-aware, no stop | 751.0 s | 598.3 s | 8.1% | 38.6 |
| random | 821.5 s | 644.5 s | 10.8% | 10.6 |
| uncertainty-first | 822.9 s | 646.4 s | 10.7% | 10.5 |
| lawnmower | 863.0 s | 689.4 s | 10.2% | 23 |
The registered gate passed by a mile: lawnmower loses 663 s more than decision-aware (standard error 5 s). It also passed with a wrong rate in the truth (true half-life twice the catalog's), with heavy-tailed blocks (Weibull, shape 0.5), and in all 25 sensitivity cells.
Now the honest part. That gate was the wrong bar. The lawnmower always pays 689 s of flight, so any policy that flies little passes, including one that never flies. The comparison that matters is against catalog-only. There, decision-aware wins by 8.8 s (standard error 2.9), about 4% of the loss. It averages 0.59 looks per world and cuts the share of routes that drive into a block from 17.3% to 14.4%. The advantage holds with the wrong rate (12.9 s) and the wrong shape (12.6 s), and it grows with the penalty: about zero at 300 s, about 100 s at 2,400 s.
Two more lessons from the table. The stopping rule does most of the work: the same ranking without it flies 598 s and loses by 551 s. And ranking by uncertainty is no better than ranking at random. More looks do buy fewer blocks (8.1% against 14.4%), but at a price the loss does not repay.
One flight with the real detector
Week 4 flew one of the 1,000 worlds live in drone-sim, with the real YOLO detector from week 1 on every frame. I picked the world with a fixed rule: the first one where catalog-only drives into a block and decision-aware does not. 30 of the 1,000 worlds qualify. In this world, Quai Saint-Michel (s12) is blocked by three cars, and the catalog does not know it.
The drone makes three looks. The first, at Place Saint-Michel, finds nothing. The second flies Quai Saint-Michel at 45 m: 6 frames, 9 vehicle boxes on the carriageway, "blocked". The probability that the quai is blocked goes from 0.13 to 0.31, and that is already enough to move the route to Pont Saint-Michel. A third look at the quai confirms it (0.58).
Total loss with the flight: 154 s (107 s of driving, 47 s of flight). Catalog-only: 716 s, because its route meets the block and pays the 600 s penalty. The real detector gave the same three reports as the simulated one in the evaluation. The 34-second demo video shows each frame and each map step.
The map is map-pane, my live web map that an agent drives from the terminal. A script sends each step as GeoJSON layers and takes a screenshot.
What this does and does not show
- The demo is one selected world. It shows the mechanism. The evidence is the 1,000-world evaluation.
- The two looks at the quai rendered almost the same frames. The model treats them as independent, so the second look overstates the evidence. Real repeated looks are correlated too.
- The streets are real. The blocks, the rates and the detector model are simulated. Streets are two-way in the model, and segments are independent.
- The policy looks one step ahead only.
- The false-box rate comes from 4 boxes. Its interval spans a factor of 9.
Next
The result I take away: a drone that knows when not to fly beats both full coverage and no coverage, but against no coverage the margin is small at a 600 s penalty and large when a wrong route is expensive. The two obvious next steps are a fairer gate (decision-aware against catalog-only, registered as the main test) and a detector model where repeated looks are correlated. Everything, including the pre-registration, the raw per-world results and the failed first detector, is in the repository. More to come.
Comments