Gridlock Escape

Par and hints

Fewest moves, proven.

Par is the number you play against, and a hint is a single step, not a walkthrough. This page explains what each one really is.

A solution is not the shortest solution

Level 18 can be solved in five moves, as Working backwards shows. It can also be solved in six:

  1. ABCDEFG
    Start
  2. ABCDEFG
    1. D slides 2 squares up
  3. ABCDEFG
    2. F slides 1 square left
  4. ABCDEFG
    3. C slides 1 square down
  5. ABCDEFG
    4. G slides 1 square left
  6. ABCDEFG
    5. C slides 2 squares down
  7. ABCDEFG
    6. A, the hero, slides 1 square right and drives out

Solved in 6 moves. Par is 5.

The extra move is C. It slid down one square as soon as F had left its column, then had to slide again once G had moved. If G had gone first, C would have dropped three squares in one move. A slide counts as one move however far the vehicle travels, so the order of the moves matters more than their length.

Stars follow from the gap to par. Three stars need par exactly. Two stars allow the larger of two spare moves and 30% of par, rounded. One star is any other solve.

Moves needed for each star rating at three example pars
Par Three stars Two stars One star
5 5 6 to 7 8 or more
20 20 21 to 26 27 or more
49 49 50 to 64 65 or more

Wasted moves tend to have one of three shapes, and they are worth checking for after every solve:

How the game knows par

Par is not an estimate. The solver starts from the board as it is, tries every legal slide, then every legal slide from each of those positions, layer by layer, and never visits the same position twice. The first layer that contains a solved position gives the fewest moves. If the search finishes without finding anything shorter, nothing shorter exists.

The search is small enough to run in a moment. Level 1 has 56 reachable positions, level 18 has 137 and level 26 has 91. The largest level in the game has 37,740, which is more than anyone can try by hand and trivial for a computer.

Because every slide can be undone, the reachable positions form a web that you can walk in either direction, and par is the distance from the start to the nearest solved position in it. The level generator picks, from each web, the position farthest from every solution (how the levels are made has the details). All 200 levels start at such a point. In practice that means no first move can take you farther from a solution than you already are. A level offers about six first moves on average, and 2.9 of them, about half, begin a shortest solution. In 25 levels exactly one first move does.

What a hint is, and how to spend one

A hint lights up one vehicle and shows where to slide it. It is the first move of a shortest solution from the board as it stands now, not from the start. The game solves the position again for every hint, so a hint is right after any number of wrong turns. It also has no plan to show you: it knows the next move and nothing beyond.

Used well, a hint is a check on your reading, not a replacement for it.