Open from a1
- Input
- 8x8, a1, aberto
- Expected output
- a1 b3 c1 a2 b4 a6 b8 d7 f8 h7 ... e7 d5
Pure Warnsdorff, no backtracking. 64 squares; the last is d5, which is not one jump from a1, so the tour does not close.
Knight's Tour: Puzzle and Solver
knight's tour 8x8 solution
On the 8x8 chessboard the knight must make 63 jumps to visit all 64 squares without repeating any. A solution exists from every starting square, and the solver below builds one in milliseconds, numbering the path square by square.
Pure Warnsdorff, no backtracking. 64 squares; the last is d5, which is not one jump from a1, so the tour does not close.
The first 47 squares match the open tour. The last square, c2, is one jump from a1, so the knight can start the cycle over.
The solver found an open tour from all 64 squares, checked square by square in the tests.
It is the problem of taking a chess knight through every square of a board, visiting each exactly once, using only its L-shaped move. When the last square is one knight move from the first, the tour is called closed or re-entrant, because it forms a circuit.
Yes. From any of the 64 squares an open tour exists. Closed tours exist as well and, because they return to the start, can be rotated to begin on any square.
In an open tour the last square can be anywhere. In a closed tour it sits one knight jump from the first, forming a circuit. Every closed tour becomes open if you ignore the final jump, but not the other way around.
Not always. It is a heuristic: it usually finds the tour without backing up, but it can get stuck on ties and on some boards. That is why the solver breaks ties with extra criteria and backtracks when needed.
Start on a1. Press Solve.
Sources: Schwenk (1991) for closed tours; Cull and De Curtins (1978) for open ones.
Everything runs in your browser: no move or tour is sent to any server.