Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flow Free Like Random Level Generation with only one possible solution?

I've implemented the algorithms marked as the correct answer in this question: What to use for flow free-like game random level creation?

However, using that method will create boards that may have multiple solutions. I was wondering if there is any simple restrictions or modification that can be made to the algorithm to make sure that there is only one possible solution?

solutions

like image 675
Åke Gregertsen Avatar asked Nov 13 '22 15:11

Åke Gregertsen


1 Answers

Creating unique Numberlink/Flow Free is very difficult. If you look at my algorithm proposal in the mentioned thread, you'll find an algorithm that lets you create puzzles with the necessary condition that solutions must not have a 2x2 square of the same color. The discussion at http://forum.ukpuzzles.org/viewtopic.php?f=3&t=41, however, shows that this is insufficient, since there are also many non-trivial non-unique puzzles.

From my looking into this problem, it seems the only way to solve this problem is to have a separate algorithm for testing uniqueness, and discarding bad instances. One solver that's made precisely for uniqueness testing algorithm is Imo's solver. Another option is to use multiple different solvers and check that they come up with the same solution.

like image 52
Thomas Ahle Avatar answered Nov 15 '22 06:11

Thomas Ahle