knight's tour

(classic problem)

Definition: A series of moves of a chess knight that visits all squares on the board exactly once.

See also Hamiltonian cycle.

Note: The associated problem is to find such a series of moves. The problem can be generalized to an n × m rectangular chess board. Solutions may be found using backtracking.

Author: PEB


Oleg Kiselyov's derivation (Prolog)
Go to the Dictionary of Algorithms and Data Structures home page.

If you have suggestions, corrections, or comments, please get in touch with Paul Black.

Entry modified 4 October 2021.
HTML page formatted Mon Oct 4 14:22:58 2021.

Cite this as:
Paul E. Black, "knight's tour", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed. 4 October 2021. (accessed TODAY) Available from: