Count edges travelled, and keep wall-only distance separate from the actual sequence of turns.
Count steps, not squares
A route containing your current square plus four more squares is four steps long. On an empty board, teal on i5 has a four-step upward route to i9. Coral on a5 has a four-step downward route to a1.
A sideways step can be part of the best route if a wall blocks the direct file. You do not need to return to the same file, since every square on the goal row is a valid finish.
Recount after the candidate wall
The wall a5H forces coral to cross two files before continuing toward its goal. The new route is six steps. Teal's right-edge route does not intersect that wall and remains four.
For every candidate wall, record the change for both players. This comparison is more useful than counting only how far the opponent now has to travel.
Understand what the count leaves out
A wall-only shortest path ignores pawn occupancy and jumping. Near an opposing pawn, a jump may save a turn or a blocked encounter may alter your available moves. Walls not yet placed can also change the route.
Use a route count to compare plans, then verify the immediate legal moves and possible replies. It is not an engine score or a proof of a win.
A repeatable calculation
Follow the direct route until you reach a barrier, compare both ends, and continue to the nearest accessible goal square. If two routes tie, keep both in mind; one may be more vulnerable to the next wall.
- Count your current route.
- Count the opponent's current route.
- Apply a candidate action and recount.
- Check jumps and who moves next.
- Inspect the opponent's most relevant remaining wall.
Try it on the board.
Practise with Pathz, an independent Quoridor-style browser game.