Knight's Tour?
O.K, I'm real lame at Mathematics, so when I searched about this I didn't understand any of the "Squiggle... etc " stuff.
I thought I'd try The "Knight's tour Problem", and thought I'd "thought up" a simple algorithm for it.
After Much Hair pulling, and waiting whilst my code never turned out a "Tour"
I 'coded it again', Now it gives me lots of Tours real quick for an 8*8 board.
However it doesn't seem to solve the Tour for a 4 x 4 Board.
Is this because my code is really bad? Or is their no "Knights Tour" for a 4 * 4 board ?
Also My algorithm is basically this:
Pick any Square on the board.
Make it the Root Node of a Tree .
Recursively add all the possible moves from this spot to the tree.
Finish when all possible nodes have been added.
Any Node in the tree with a certain depth will be a solution.
Moves with least choices of nect Move are always added first.
Is that right?
I mean I've been reading webistes over and over, and can't follow the:
'Advanced mathemtical symbolism'
> Also My algorithm is basically this:
> Pick any Square on the board.
> Make it the Root Node of a Tree .
> Recursively add all the possible moves from this spot
> to the tree.
> Finish when all possible nodes have been added.
> Any Node in the tree with a certain depth will be a
> solution.
> Moves with least choices of nect Move are always
> added first.
I don't know about the last step but unless there is a flaw in your implementation, this algortithm should find all possible solutions. It may be the case that there is no solution on a 4 x 4 board. I don't know for sure.
When I Google
knight's tour on 4x4 board
I find the second one down says
leapers
There is no closed tour for a (1,2) leaper [knight] on a 4 xn board. 2. There is
no open tour for a (1,2) leaper on a 4x4 board. 3. There is no open tour ...
www.mathpuzzle.com/leapers.htm - 17k - Cached - Similar pages
Sure sounds to me like there is neither an open nor a close tour on a 4x4 board.
Of course, real mathematicians don't believe random posts on a web site in any way constitute a proof, but you might want to take a look anyway.