Knight's tour

An open knight's tour of a chessboard
An animation of an open knight's tour on a 5 × 5 board

A knight's tour is a sequence of moves of a knight on a chessboard such that the knight visits every square exactly once. If the knight ends on a square that is one knight's move from the beginning square (so that it could tour the board again immediately, following the same path), the tour is closed (or re-entrant); otherwise, it is open.[1][2]

The knight's tour problem is the mathematical problem of finding a knight's tour. Creating a program to find a knight's tour is a common problem given to computer science students.[3] Variations of the knight's tour problem involve chessboards of different sizes than the usual 8 × 8, as well as irregular (non-rectangular) boards.

  1. ^ Brown, Alfred James (2017). Knight's Tours and Zeta Functions (MS thesis). San José State University. p. 3. doi:10.31979/etd.e7ra-46ny.
  2. ^ Hooper, David; Whyld, Kenneth (1996) [First pub. 1992]. "knight's tour". The Oxford Companion to Chess (2nd ed.). Oxford University Press. p. 204. ISBN 0-19-280049-3.
  3. ^ Deitel, H. M.; Deitel, P. J. (2003). Java How To Program Fifth Edition (5th ed.). Prentice Hall. pp. 326–328. ISBN 978-0131016217.