I am trying to write a program for solving nurikabe puzzle. I need a method to approximately represent the state of the game in one number, to choose the best way for the algorithm to continue. I can't seem to find any obvious link between solutions of different nurikabe boards, thus no way to estimate how far the current state is from the final one. I thought about manhattan distance between islands, density of islands etc.
$\begingroup$
$\endgroup$
4
-
$\begingroup$ By representing the state of the game with a single number, do you mean that number would be lower or higher based on how close it is to being solved? Like a score? $\endgroup$– StevishCommented Dec 27, 2023 at 16:04
-
$\begingroup$ Yes, that is exactly what I have meant. $\endgroup$– PapoucCommented Dec 27, 2023 at 23:24
-
$\begingroup$ This sounds like a question about devising a scoring function to use for solving a Nurikabe puzzle through stochastic search methods. One example of this method is Solving Nurikabe with Ant Colony Optimization by Amos et al. Briefly, the solution begins with a completely black grid, and after running the ant colony algorithm the solutions are scored according to the number of times the rules of Nurikabe were broken ("constraints broken"). $\endgroup$– codewarrior0Commented Dec 28, 2023 at 1:53
-
$\begingroup$ While coming up with such an algorithm is arguably a puzzle itself, this question might be better suited for CompSci SE or StackOverflow $\endgroup$– codewarrior0Commented Dec 28, 2023 at 1:57
Add a comment
|