W. Langstaff offered this conundrum in Chess Amateur in 1922. White is to mate in two moves. He tries playing 1. Ke6, intending 2. Rd8#, but Black castles and no mate is possible. But by castling Black shows that his last move must have been g7-g5. Knowing this, White chooses 1. hxg6 e.p. rather than 1. Ke6. Now if Black castles he can play 2. h7#.
“Not so fast!” Black protests. “My last move was Rh7-h8, not g7-g5, so you can’t capture en passant.”
“Very well,” says White. “If you can’t castle, then I play 1. Ke6.” And we’re back where we started.
“What was really Black’s last move?” asks Burt Hochberg in Chess Braintwisters (1999). “If a position has a history, it can have only a single history, and Black would not be able to choose what his last move was any more than I can choose today what I had for dinner last night.”
“This is not a real game, however, but a problem in chess logic. The position’s history does not exist in actuality but only as a logical construct.”