knight's tour puzzle generator
A puzzle generator - another Javascript learning project.
The kixote repo contains pages that display interactive path puzzles based on the moves of chess pieces, and the utilities that generate them.
A path puzzle is built from a numbering of the squares on a chess board. The numbering corresponds to a path taken by a particlar type of chess piece (different pieces for different puzzle types) as it moves over the whole board, landing on each square exactly once. In creating a path puzzle, once the all the squares are numbered, a certain amount of the numbers are hidden.
Someone solving the puzzle is tasked with filling in the missing numbers to re-discover the original path. In the interactive version here, the solution must be provided in sequential order. The solver can look ahead, but at each turn can only fill in the next empty cell in the sequence, tracing over the path originally followed by the chess piece.
There are three kinds of puzzles here:
There is also a knight’s tour generator page that allows the user to experiment with creating their own knight’s tours.
The mechanics of generating puzzles is the same for all types.
I started looking at puzzles like this a few years back. Some background on these can be found on these blog posts:
For even more background, see these posts:
See dmackinnon1.github.io/kixote/ for links to a live example of the various puzzle types.