Knight Swap Puzzle
White knights on one side, black knights on the other. Make them change places using only knight moves, in as few moves as you can.
0 moves · Par 16 · Not solved yet
Use the arrow keys to move between squares, Home and End for the ends of a rank, Enter or Space to pick up a knight and again to choose where it jumps, and Escape to put it down.
The board, untangled
Knights swapped!
Your best scores are saved in this browser only.
How the knight swap puzzle works
On the 3×3 board two white knights start in the bottom corners and two black knights in the top corners. Your goal is to put the white knights where the black ones began, and the black knights where the white ones began. Any knight can move at any time, but it may only jump to an empty square. Puzzles like this one are often credited to Paolo Guarini, who recorded it in 1512, which is why you may also see it called Guarini’s puzzle.
The 4×3 version has three files and four ranks, with three white knights on the bottom rank and three black knights on the top. The goal is the same: swap the two rows.
The trick: untangle the board
On a 3×3 board the middle square is out of reach. A knight standing there would need to jump two squares in some direction, and every such jump leaves the board. The other eight squares join up in a single loop: from a1 a knight can reach b3, from b3 it can reach c1, and so on all the way round, back to a1.
Draw those eight squares as a circle, one knight’s move apart, and the puzzle becomes simple. The knights sit around the circle white, gap, white, gap, black, gap, black, gap. They can only step to a neighbouring point, so they can never pass each other. The only way to swap the colours is to walk every knight four steps the same way round the circle.
What is the fewest number of moves?
Sixteen on the 3×3 board: four knights, each making four steps. That is par in this game, and solving in par earns three stars. Three stars mean par or better, two stars mean within 24 moves, and any solution earns one.
The 4×3 board is not a single loop, so knights can take shortcuts across it, but it has six knights to move. A search of every reachable position shows its fewest is also 16 moves.