LibraryReference articles

Working backwards from the end, and what everyone knows that everyone knows

Reference article

Two players take turns removing one, two or three stones from a pile of twelve, and whoever takes the last stone wins. Nobody can see twelve moves ahead, but anybody can see the end: with one, two or three stones left, the player to move wins. So facing four stones is lost, whatever you take. That one fact, found at the end and carried backwards, settles the whole game before it starts.

The end of the game is the easy part

Take a pile of twelve stones. Two players alternate, and each turn removes one, two or three stones. Whoever takes the last stone wins. Trying to plan from the start is hopeless, because the number of ways the game can run is large and the early moves seem not to matter.

Plan from the end instead. If it is your turn and one, two or three stones remain, you take them all and win. Call those positions won for the player to move. Now look at four stones. Whatever you take, one, two or three, you leave three, two or one, and that is a won position for your opponent. So four stones is lost for the player to move.

Carrying the label back

That is the whole method, and it repeats. Five, six and seven stones are won, because from each you can take just enough to leave four. Eight is lost, because every move leaves five, six or seven. The lost positions are the multiples of four. Twelve is one of them, so the player who moves first loses against anyone who knows the pattern, and the second player wins by always topping up to four between them.

Bar chart of Stones to take to leave a lost pile against Stones in the pile. Winning take. 1: 1; 2: 2; 3: 3; 4: 0; 5: 1; 6: 2; 7: 3; 8: 0; 9: 1; 10: 2; 11: 3; 12: 0.Stones to take to leave a lost pile01234123456789101112Stones in the pile123012301230lostlostlostBar chart of Stones to take to leave a lost pile against Stones in the pile. Winning take. 1: 1; 2: 2; 3: 3; 4: 0; 5: 1; 6: 2; 7: 3; 8: 0; 9: 1; 10: 2; 11: 3; 12: 0.Stones to take to leave a lost pile01234123456789101112Stones in the pile123012301230lostlostlost
The stones to take from each pile size repeat one, two, three, and a gap at every multiple of four, where no move wins.

Notice what was never done: no tree of every possible game was written out. Each position was labelled once, using only the labels of the positions one move ahead. The work grows with the number of positions, not with the number of games, and that is the saving. It is called backward induction: the argument that holds at the end is handed back one step at a time to the start.

Why the labels are trustworthy

A label is a claim about best play from there on, and it was earned from the labels ahead of it. A position is won if at least one move reaches a lost position, and lost if every move reaches a won one. Both clauses are checkable by looking at the handful of moves available, which is why a long chain of them can be believed.

The same step-back habit is how prices of some contracts are found, from the final payoff backwards. The reasoning is identical even though the stones are gone.

A different kind of end: what is known

Some puzzles are not about moves at all but about what each person knows. A fact can be known to everyone and still not be usable. Suppose two colleagues each privately learn that a meeting is cancelled. Each knows. Does the first know that the second knows? Not unless they were told. And does the first know that the second knows that the first knows? Each extra layer needs its own evidence.

A fact is called common knowledge when every layer holds: everyone knows it, everyone knows that everyone knows it, and so on without end. A private glance gives the first layer only. A statement made aloud in front of everyone gives all layers at once, because everyone also sees that everyone heard it.

That is why a public announcement can change behaviour even when it tells people something they already knew. It adds no new fact about the world. It adds the higher layers, and those are what let people reason about each other.

Putting the two together

Many puzzles of the "what can you conclude from what the others did not do" kind combine both ideas. The reasoning starts from a simple case where the conclusion is immediate, and each larger case is settled by saying what would have happened in the case just below it. The common knowledge supplies the assumption that everybody is running the same argument. Writing the smallest case down first, and only then asking how the next one differs, is almost always the way in.

Where this breaks

Backward induction assumes both sides play the best move at every position. A real opponent who errs, or a game with hidden information, can make the labelled strategy wrong in practice even though it is right in the model. And the pile game works because the position is fully visible: if some of the stones were hidden, the labels above would not apply.

How we know this landed

Two checks. In the pile game with ten stones, the first player should take two, leaving eight, which is lost for the mover. And three stones remaining with the move to you is won, since you take all three. If either answer feels wrong, go back to the labelling of four stones, which everything else rests on.

In short

Start where the answer is obvious, mark what is won or lost there, and step back one move at a time. When the reasoning is about what people know, the missing ingredient is usually a fact everyone knows that everyone knows, which a public statement supplies and a private glance does not.

Terms used here

Related

And, or, and not

Both of two things is rarer than either alone, either of two is commoner, and not happening is the leftover. All three settled by listing results rather than by remembering rules.

Writing out everything that can happen

Two coins give four results, not three, and heads then tails is not the same as tails then heads. Counting done by hand, on paper, before a single formula turns up.

More on these topics

Topics

Also in the library