Author: mark4mark4 Date: Jun 3, 2008 15:24
ok so people here have been working on the euler problems and posting
challenges etc. well, this is something that has been floating around
my todo list for a long time but not been completed...
This is a problem to write a program to solve the old N2-1 puzzles
(sliding tiles in a square with one tile missing). The method I am
using is a manhattan distance huristic. this is all very simple but
what i wanted to do was create a table of patterns of LOCKED pieces so
that if a piece is solved for it need never be moved again unless not
moving it prevented a solution. for example...
1 2 3 x in this puzzle pieces 1, 2 and 3 are solved for. pieces
1 and 2 can be locked in place
x x x x and the rest of the puzzle can still be solved. if
however the 3 is locked no solution
x x x x is possible unless the last x on row 1 also happens to be
the 4.
x x x x
|