Knight's Tour

Functions to complete an open knight's tour on an N*N chessboard
99 descargas
Actualizado 16 dic 2019

Ver licencia

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.

Citar como

Martin Thomas (2024). Knight's Tour (https://www.mathworks.com/matlabcentral/fileexchange/73700-knight-s-tour), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2019b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Just for fun en Help Center y MATLAB Answers.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versión Publicado Notas de la versión
1.0.0