Playing with their food

Here is another retrograde chess puzzle! For once, this should be much more approachable than all my previous stuff (but hopefully still quite cute), so please feel free to have a go if you would like.

Can you determine the last eight single moves that lead to this position?

Wow what an awesome puzzle. You had me puzzling for 2 hours straight, drawing chess boards over and over. Some curses may have escaped my mouth >:) Kudos and thanks for making it.

8: d4 en passant to c3
7: c2 -> c4
6: d5 -> d4
5: Ka3 captures pawn on b3
4: a4 en passant to b3
3: b2 -> b4
2: d6 -> d5
1: Kb4 captures rook on a3
0 (bonus): Rc3 -> a3

Reasoning:
8: It's currently checkmate. Only the Bishop checks the king. It seems that the last move must have been the bishop, but there is no field that would not already have been checkmate before. Another possiblity is a discovered check by moving from c4 to c3, but that doesn't work as the pawn on c4 would also have given checkmate already. That leaves one very tricky option. Some white piece blocked the bishop and was captured, while the capturing piece did not end up on the same square. Holy Hell, it's en passant!

7: The white King is in check and can't move, the only legal move is c2 -> c4. (we already know black will play en passant, so this move was obvious)

6: The white King is in check again by the bishop on g8, and once more, the bishop cannot move away from giving check. But the pawn on d4 can un-move to c5, blocking the bishops view.

5: The only non-king piece (pawn on c2) can't move further back, so the king is to move. The king has no tile to go where only 1 black piece (that could still unmove away) could hit him. This again seems unsolvable, but this time I suspected another en-passant trickery was at play here. Problem is there isn't enough pawns. So let's uncapture some!

3: Move 5 only made sense after discovering move 4 and 3 as well

2: same as move 6, the bishop that checks cannot uncheck. A pawn will move back to block the bishop

1: the two pawns can't move as we need them on their starting squares later on. The King cant move to a2 as the kings may never touch, even in retrograde chess puzzles. He cannot go b3 since the pawn on a4 cannot unmove. He cannot capture on a4 since he would be in check by 2 pieces, its impossible for both to uncheck at the same time (the a5-rook couldn't uncheck anyways). Which leaves us with b4. Problem is that both the bishop and the queen hit this field. But since they are on the same diagonal, some other piece could block them. This other piece is required to be captured this move since it never appears again later on, which means it must travel from c3 to a3 in the previous (0th) move. The only piece that can do that, while not giving check on c3 is a Rook.

• Nice! You figured it out, well done! :) Commented Jun 21 at 16:10
• I'm a little confused, how can Kb4 capture Ra3 when there is a rook on a5? This is a final position I restored according to your moves but I might have done something wrong since rook on a5 protects rook on a3... lichess.org/editor/5bb1/6pp/3p4/rp6/1Kp5/2r1p3/1PPb4/… Commented Jun 21 at 16:36
• There's a pawn on a4 at that point Commented Jun 22 at 19:19
• Here's the starting position before move 1: lichess.org/editor/5bb1/6pp/3p4/rp6/pK6/r3p3/1PPb4/… Commented Jun 22 at 19:28