# King and Pawn Endgame

Here comes another retrograde chess puzzle, this time focussing on just the history behind the pawn structure. Constructing this was a fun challenge and I think the result is pretty cute. :)

Can you tell the order in which the pawns arrived at their final squares? Can you determine the paths they took to reach them?

As a bonus question, you may also ponder

how many rook moves were necessary to reach this position, at a minimum.

### Summary

The arrival of the pawns (that moved) to their final squares, from most recent to furthest in the past, are

f3, d4, e2, f4, d3, e6, f7, c3, h6

I believe the minimum number of rook moves is

13, of which 2 for the a1 rook, 2 for the a8 rook, 3 for the h8 rook, 6 for the h1 rook (including 3 tempo-wasting moves).

### Proof game

My proof game is off by 1 on the optimal rook moves -- explanation later. The forward proof game is here. The FEN

5k1K/1p2pP1p/4p2p/8/3p1p2/2PP1P2/2PPp1PP/8


and reverse proof game to paste into Retractor 2 are here:

f2-f3 c5xRd4 Ra4-d4 e3-e2 Ra1-a4 e4-e3 Rh1-a1 d5xBe4 Bf3-e4 d6-d5 Be2-f3 f5-f4 Bf1-e2 f6-f5 e2xBd3 Bb5-d3 Rg1-h1 Bd7-b5 Rh1-g1 Bc8-d7 Rg1-h1 d7xQe6 Qg4-e6 Ke8-f8 e6xQf7+ Kd8-e8 d5xNe6 Qh5-f7 Kg8-h8 Ng5-e6 Kf8-g8 Qh4-h5 c4xRd5 Kc7-d8 Ke8-f8 Kb6-c7 Kd8-e8 Ka7-b6 Kc7-d8 Ka8-a7 Kb6-c7 Kb8-a8 Ka5-b6 Kc7-b8 Ka4-a5 Qh5-h4 Qf3-g4 Kd8-c7 Kb3-a4 Ke8-d8 Kb2-b3 Kf8-e8 Kc1-b2 Qe8-h5 Kd1-c1 Nf7-g5 Ke1-d1 Rg5-d5 Qc6-f3 Qd8-e8 Qb5-c6 Rg8-g5 Qb1-b5 Rh8-g8 Qd1-b1 Ke8-f8 b3xRc4 b6xBc5 Ba3-c5 Ra4-c4 Bc1-a3 Ra8-a4 b2xBc3 a7xRb6 Ra6-b6 Ng5-f7 Ra1-a6 c7xNd6 Nc4-d6+ f7-f6 Na3-c4 Bg7-c3 a2xNb3 Bf8-g7 Nb1-a3 g7xNh6 Ng4-h6 Ne4-g5 Ne5-g4 Nf6-e4 Nf3-e5 Ng8-f6 Rh1-g1 Nd4-b3 Ng1-f3 Nc6-d4 Nf3-g1 Nb8-c6 Ng1-f3


### Reasoning

• The point of this retro-analysis is that White really needs to un-capture something, but cannot do so for a long time. This leads to tempo issues with Black pawns, because it cannot undo too many pawn moves lest the White King be caged in or its Bishops shut out (call this an "illegal cage" from now on).
• Let us first notice that each side captured 7 times, which is exactly the number of missing pieces in each side. So there are no spare un-captures (e.g. to give tempo).
• The origin squares of pawns are pretty much all obvious except for the d4 and e2 pawns, which can originate from a7 and c7, but we don't know exactly yet.
• Let us first determine who is to retract first.
• Only the d, e, and f pawns can retract for now to avoid obvious Bishop illegal cages.
• To avoid caging the White King, there can be a maximum of 7 Black Pawn retractions (regardless of the undetermined origin squares), ending with pawns on c5, d6, and f6.
• The most recent White un-capture is e2xd3. It requires at least 7 moves before White can do this, namely 3 Bishop moves (back to f1), 3 Rook moves (back to its cage behind f1), and 1 Pawn move (f2-f3), in some order.
• So White must retract first.
• Since Black desperately needs to un-capture a White Rook and then a White Bishop, the last 9 half-moves are fixed (except for Rh1-a1): f2-f3 c5xRd4 Ra4-d4 e3-e2 Ra1-a4 e4-e3 Rh1-a1 d5xBe4 Bf3-e4. In particular this fixes the order of arrival of four Black Pawns f3, d4, e2, f4.
• The fact that c5xRd4 occurred also solved the pawn-origin problem. The e2 pawn cannot come from a7, because then there would be no Light Square to un-capture the f1 Bishop on. So the d4 pawn came from a7 and its path is determined.
• Next, exd3 must un-capture the Black Light Bishop to make any progress. Thankfully, White can waste tempo using the Rook between h1 and g1. There are 3 forced tempo-wasting moves. Example retraction for the next 16 half-moves: d6-d5 Be2-f3 f5-f4 Bf1-e2 f6-f5 e2xBd3 Bb5-d3 Rg1-h1 Bd7-b5 Rh1-g1 Bc8-d7 Rg1-h1 d7xQe6 Qg4-e6 Ke8-f8 e6xQf7+. These moves are almost fixed, but the pawn moves d3, e6, f7 are surely fixed.
• It seems that we must waste another Rook move to get the h1 Rook back onto its home square. However, we can pre-empt this and retract it to g1 (instead of h1) on the 7th retraction. This optimisation was overlooked in the proof game.
• Also, the path of the c7 pawn is also fixed by this sequence as c7-d6-d5-e4-e3-e2 so as to not make an illegal Bishop cage. Now all pawn paths are determined.
• Finally, c3 is White's only dark square capture, implying the Black Dark Bishop died there. So the order of the last two pawn arrivals c3, h6 are fixed.
• In the retraction, take care not to run into tempo issues (Knights cannot waste a tempo).

• To come up with the solution, I slowly built up fragments of the history along lines with "most recent" at the top and "initial position" at the bottom. At the beginning, there are many lines that don't interact with each other. But the moment I saw how f7 joins two lines together is really cool.
• Thank you, now I see that the h8 rook can be restored from f7 in two moves by means of a discovery. I may make an optimised proof game later. Moving into check and thinking backwards is tricky :D Commented Jun 11 at 10:54