Jump to content

Knight's tour

From Simple English Wikipedia, the free encyclopedia
Revision as of 19:55, 24 February 2021 by imported>Cuddles9999 (Reverted 1 edit by 79.106.209.145 (talk) identified as vandalism to last revision by Belwine. (TW))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
File:Knight's tour anim 2.gif
An open knight's tour of a chessboard

A knight's tour is a set of moves of a knight on a chessboard. The knight visits every square only 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, otherwise it is open.

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

References[change]

  1. Deitel, H. M.; Deitel, P. J. (2003). Java How To Program Fifth Edition (5th ed.). Prentice Hall. pp. 326–328. ISBN 978-0131016217.