Knights Tour Problem

The puzzle is to try to move a Knight on a chess board using its normal moves (one or two rows and two or one columns) so that each square is visited once only. If the last square is a knight's move from the first, the tour is closed.

You select various board size and the start square as row,col.

Backtracking is used to try to find a solution, though this is aborted if it is taking too long. You may need to change the start square to find a solution, or use a speed up option.

If Closed is ticked then the program keeps looking for a closed tour. Note there is no closed tour if the board size is odd.

Press ShowMoves to see how it does it - using backtracking - where each move is shown - note this takes a long time! Use the slider to adjust the animation speed.

There are options for speeding up, seeing the complete tour, creating a puzzle to solve and solving it. Press the appropriate Help button.

Board

Start at (r,c) Closed Tour

Speedup: Check for Impossible Warnsdorff Heuristic

Puzzle Mode

Solving

Display