Skip to content

obinmatt/knights-tour

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

KnightPuzzle

Prolog program that finds a knight's path on a given N*N chessboard, where N is an input. It starts from the fixed location (1,1), then visits each square once. There are two files, 'knightPuzzle', which is a naive solution that tries any possible position, while 'warnsdorffKnightPuzzle' utilizes Warnsdorff's rule heuristic to find the best possible knight's path. Compile using swi-prolog or gprolog.

About

My solution to the Knight's tour problem in Prolog.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages