> ... only using some limited, localized what-if analysis
Your "5:5 goes RT (if were UP => NO_ROOM("3"))" is what my guessing, teamed up with confinement analysis, determines. I don't know how to implement that any more efficiently. (If you do, I encourage you to try!)
> It is possible that the search might be improved by using the heuristic
> of working near the known frontier first, with iterative deepening in number of steps considered
Agreed. My guessing is expensive because it amplifies the amount of other expensive analysis (mainly confinement) that's run.
yes, "localized what-if analysis" is of course guessing - limited by the virtue of being performed by a human with very limited backtracking capacity. Not being able to keep in mind more than a few moves is what I refer to "localized" here (closeness to frontier), and is what forces me to consider only very shallow moves - what the iterative deepening would achieve, which would suspend (not abort) expensive solve() computation(s) in progress. Or you could use a good scheduler for a massively parallel solution that would run all of them at once, to take care of that automagically.
I've since seen more puzzle examples, on "puzzle-nurikabe dot com", where unfortunately the initial frontier expansion stops very early on, and extensive guesswork is unavoidable. There another heuristic sometimes works wonders, which I'm having troubles formalizing - painting all the (remaining) cells initially black, and expanding the islands from there, trying "to get away with as much as possible" guided by square condition mostly, at first, and then trying to push a few cells around to correct the problems which appear.