I am creating a puzzle game, which, being played manually for easy levels, is designed to solve computer programs for more complex ones. A puzzle is a fill on a hexagonal board. You can try the prototype here .
alt text http://www.hacker.org/flood/screen.png
Here's how the puzzle works: choosing a color from above, you fill the fill, starting from the top left tile. This will gradually transform the board into a solid color. The challenge is to do this in a certain number of moves.
I have created several puzzles like this, and the key is to use an algorithm that generates boards that are difficult to solve without knowing how they were created. For example, here we can create a board by reversing the fill of the bay: work back from a solid board until it is flooded. We know how many steps it took, and we can set it as the lower bound for the solution.
The problem I am facing is that when I try to use this approach, my upper bound is too high. It becomes trivial to solve the puzzle within this number of moves, even moving randomly.
An approach that is not a solution generates a random board, and then optimally solves it and sets it as a goal. The point is to create a puzzle where the optimal solution is NP time, or at least hard P.
So, I'm looking for an algorithm that can generate extremely hard boards, where solving them as they grow becomes a serious problem.
algorithm puzzle hex flood-fill
adum
source share