After writing "Why the 60 cm route check can fail a 63 cm gap" I left the problem alone for a while. I've now rewritten the route check from scratch, and before doing that I went back to see exactly when the old one got it wrong. These are my notes from that.

A room with one way through

I needed a room where the right answer was certain. Two wardrobes block a 300 × 400 cm room from wall to wall, with a single gap between them. To reach the far side you have to use that gap, so whether a 60 cm-wide person fits depends only on whether the gap is at least 60 cm.

I tried gaps of 59, 60, 61, 63 and 68 cm. The new check blocked the 59 cm gap and let the rest through. At exactly 60 cm a person brushes both wardrobes with nothing to spare; the site already treats touching as not overlapping, so that counts as getting through.

Wardrobe100×60Wardrobe139×60DOOR 80300400
61The path through a 61 cm gap

Why the old check failed

The old note said that checking points every 10 cm made the check up to 10 cm too strict. That was true, but it didn't explain everything. I moved the same 63 cm gap one centimeter to the right ten times, and the old check let it through only 4 times. For a 60 cm gap it was 1 out of 10, for 68 cm 9. Whether a multiple of 10 happened to fall inside the gap decided the answer. A check that changes its mind when a wardrobe moves 1 cm is hard to trust. The new one gave the same answer all ten times.

The layout from the note

With the wardrobe at 185, the old check said "not found" and the new one finds a way. Looking again, that spot sits between two corners 63 cm apart across and 23 cm apart down, so they are really 67.1 cm apart. The old check drew square buffers around furniture and saw only the 63 cm. The new one rounds the corners of the buffer. The narrowest point on the path it found is 66.1 cm, about a centimeter under the corner distance, because the path is drawn through evenly spaced points.

Single bed110×200Desk105×50Wardrobe100×60DOOR 80320380
185Wardrobe at 185: 63 cm across, 67.1 cm corner to corner

Two answers held back

I also tried eight corner-to-corner gaps from 58 to 63.6 cm. The old check blocked all eight, the 63.6 cm one included. The new one blocked 59.5 cm and under, let 60.1 cm and over through, and for 59.8 cm, 60 cm said "not verified" instead of answering. Those gaps are within 0.2 cm of 60, and even with points 1.25 cm apart it couldn't settle them. I'd rather it say it doesn't know than guess.

How the new check decides

Once it finds a path, it walks along it and measures the distance to every wall and piece of furniture the whole way. If any stretch comes closer than 30 cm, that path is dropped, so "connected" means the path really is walkable. For "blocked" it works the other way: it leaves open every spot where someone might possibly stand and checks that there's still no way through. If neither check settles it, the answer is "not verified".

The count

In these runs the old check called a gap of 60 cm or more blocked 21 times, and called an impassable gap open 0 times. The new check gave 0 wrong answers and held back 2.

60 cm is this site's benchmark, not a legal standard. Turned sideways people fit through narrower gaps, and carrying a laundry basket they need more.

Data

EXP-002Calculated only, no room was measuredNew calculation v2.0.0 · old v1.0.0Checked 21/21 PASS

GapRight answerOldNewNarrowest point on the path (cm)Result
59 cmBlockedNot foundBlocked–PASS
60 cmConnectedConnectedConnected60PASS
61 cmConnectedConnectedConnected61PASS
63 cmConnectedConnectedConnected63PASS
68 cmConnectedConnectedConnected68PASS
GapPositions the old check passedPositions the new check passedResult
59 cm0/100/10PASS
60 cm1/1010/10PASS
63 cm4/1010/10PASS
68 cm9/1010/10PASS
Wardrobe left edgeGap acrossCorner to cornerOldNewNarrowest pointResult
2068487.1ConnectedConnected80PASS
1957376.5ConnectedConnected75.2PASS
1906871.8ConnectedConnected69.9PASS
1856367.1Not foundConnected66.1PASS
Diagonal gap (cm)Right answerOldNewResult
58BlockedNot foundBlockedPASS
59BlockedNot foundBlockedPASS
59.5BlockedNot foundBlockedPASS
59.8BlockedNot foundNot verifiedPASS
60ConnectedNot foundNot verifiedPASS
60.1ConnectedNot foundConnectedPASS
61ConnectedNot foundConnectedPASS
63.6ConnectedNot foundConnectedPASS

Where the right answers came from. For the blocked-off room the answer is one rule: the gap lets a person through if it's at least 60 cm. For corner-to-corner gaps, the rule is the same with the distance between the corners. Separately, a Python program that doesn't use the planner's code put a point every centimeter on the floor, marked where a person could stand, and spread out from the door to see if it got through. The old results were compared with a Python rewrite of the old rules.

Open in the planner

Running these three lines in the site's repository rebuilds the files. If the calculation code changes and these files aren't rebuilt, the site won't build, so the numbers on this page can't drift away from what the planner does.

python tools/scenarios.py --dump
node tools/run_experiments.mjs
python tools/verify_experiments.py