in reply to Block-sliding puzzle
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Block-sliding puzzle
by ambrus (Abbot) on Nov 17, 2009 at 18:40 UTC | |
If you run this for larger boards (say 13 or 15, which takes quite some time) then you can easily see the general pattern of solutions you get (7n-3 steps for board size 2n+1 or 2n+2). You could write a program that generates that solution, that way you'd get a simple program to generate a solution that's quite good. If you actually wanted to prove that that solution is optimal, I don't know an algorithm that's much better than this brute force one. You could of course optimize this brute force solution to run a few orders of magnitude faster if you really needed to run it for large boards. | [reply] |
by tempest69 (Initiate) on Nov 20, 2009 at 04:00 UTC | |
now A and C are in vertical position. A at the edge A must now take 3 moves to the other side of C, using B as a stopBlock. then C and A continue taking turns of three to inch tward the horizontal center until the goal state is reached. There might be a trick to handle moving up the sides a bit more efficiently.. but the horizontal steps are pretty well stuck. | [reply] |
by tempest69 (Initiate) on Nov 20, 2009 at 05:37 UTC | |
| [reply] [d/l] |