Knight's Tour
The knight's tour is a problem of a knight visiting every square of a chessboard without revisiting any square; following the same movement rules it has while in a game of chess. An open knight's tour does not start where it began, as a closed tour would. This problem can be dated as far back as the 9th Century
This code creates an N*N chessboard and the knight then attempts to travel the full board, starting from (1,1). This algorithm brute forces, but the StepCheck function ensures that previously visited squares aren't chosen.
Cite As
Martin Thomas (2026). Knight's Tour (https://nl.mathworks.com/matlabcentral/fileexchange/73700-knight-s-tour), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
