Jump to content

15 puzzle solver: Difference between revisions

m
(Changed the way to initialize the solver.)
Line 3,471:
-- (clearly optimal by exhaustively disproving all lesser n)
<lang Phix>-- demo/rosetta/Solve15puzzle_simple.exw
enum left, down, up, right -- (nb 5-move flips it, as in down===5-up, etc)
 
constant valid_moves = {{ 0, 0, 5, 2}, { 1, 0, 6, 3}, { 2, 0, 7, 4}, { 3, 0, 8, 0},
7,818

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.