by Mark J. P. Wolf. Originally appeared at Mathpuzzle.com on January 22, 2004.
Starting with the White Queen at a8, capture your way to the White King at h1. Pieces capture as they do in chess (except pawns, which can capture one square diagonally in any direction), and pieces can only capture pieces of the opposite color. However, once a capture is made your piece becomes the type of piece that was just captured (and moves accordingly on the next move) and all moves must end in a capture. Pieces that are captured are removed from the board, so the number of pieces on the board gradually decreases. (For an easy warm-up, try capturing the black queen in five moves, or the black pawn at a1 in nine moves).
View Racket source code
Switch to Whalesong version