← All posts

Nearest first: the four ranking rules we deleted

Over the life of U-tour the landmark queue picked up four clever ways to choose what to narrate next. Each produced the same complaint. The queue is now ordered by distance and not much else.

When several landmarks are inside the trigger cone at once, something has to decide which one gets narrated. This is the part of a tour guide that feels like it should be smart. It was, four separate times, and every version was worse than the dumb one.

The complaint was identical each time, and it came from the same place: walking along, being told about something further away than the thing you were standing next to. From the pavement that is indistinguishable from the app picking at random. Here are the four rules, in the order we removed them.

1. Ahead beats everything

The first version split the queue into "inside the forward cone" and "outside it", and ranked everything in the first group above everything in the second. It sounds right. In practice a landmark five hundred metres straight ahead beat one twenty metres to your left, because the near one was a few degrees outside the cone. You walked past the near thing in silence while the app warmed up a story about something you couldn't see yet.

2. The bearing penalty

Version two was gentler. Instead of a hard split it inflated the cost of anything off to the side, by up to a third at ninety degrees. Same complaint, smaller magnitude. A landmark beside you still lost to one further off that happened to be more in line with your stride.

3. Prefer the recorded voice

U-tour narrates with a server-side recording when one has been synthesised and falls back to the on-device voice when it hasn't. Switching voices mid-tour is jarring, so version three penalised landmarks whose recording wasn't ready yet, by a factor of two and a half. That let a voiced landmark at two hundred metres beat an unvoiced one at ninety. The listener was walked past the near thing to preserve a voice.

4. Significance

The most defensible of the four, and still wrong. Each landmark carries a rating of how significant it is, and the queue let a landmark rated five win from two and a half times further out. The problem is what the rating is: a judgement about the place, made by a model that has never seen the street. Distance is a fact about the listener. Weighing the two against each other lost roughly one cue in five to something across a junction.

What's left

Distance. The cone still decides whether it is time to say something. It no longer decides which. Nearest first, and that is the whole rule.

The cost is worth stating plainly. The queue will sometimes narrate a landmark you have just walked past, and it falls back to the on-device voice more often, because the nearest thing is the one least likely to have finished synthesising. Both were judged better than the alternative, which was the app forming its own opinion about what you should hear and overriding your position with it.

The exceptions, and why they aren't a fifth rule

Two things do bend the order, and the reason they survive is that they are a different shape from the four above.

The first is a pin. If you tap a landmark in the queue browser while looking at its photograph and say "that one", it jumps the queue, from within a bounded reach and, when the heading is trustworthy, from in front. That is not the app's opinion. It is yours, and honouring it is not second-guessing anyone.

The second is a narrow tie-breaker. Every removed rule was unbounded: a multiplier or a partition that could pull a landmark past any number of nearer ones. The tie-breakers can only reorder landmarks that are already about the same distance away, measured from whatever is nearest right now. On a quiet street that band holds one candidate and the tie-breakers do nothing. In a city centre it holds several, and choosing between things you can all see at once is a different act from walking you past the near one to reach a favoured far one.

The property being bought is that the rule limits itself by density. Where it could go wrong, it is inert. Where it does something, everything it chooses between is already in front of you.