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.
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
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
- Gaming > Just for fun >
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0 |