denis_berthier wrote:It seems that your smart choice of cells reduces this sensitivity, without cancelling it.
Actually, it seems my cell choice was not as smart as it could have been. Here's my
bete noir, 1B, tamed at last:
18:45:36 Puzzle id = Reduction_1B
18:45:36 Hints = 44, max chain len = 6
18:45:39 NS = 1, DFS = 3399, et = 2.837261
18:45:41 Puzzle id = Reduction_1B
18:45:41 Hints = 44, max chain len = 6
18:45:41 Reversed all hints
18:45:44 NS = 1, DFS = 3131, et = 2.656407
So that's about 10 times faster than the previous best effort, and what I'd call an acceptable time (for generation purposes).
And it is now stable under iso's!
I rewrote the cell selection logic - now I ignore chains, and simply concentrate on
pairs, ie (a < b). I pick the pair with the least number of available settings. This virtually guarantees it will follow chains in any case.
I realised (finally!) that no matter how reduced it is, a well-formed puzzle will still have the property that satisfying all pairs will be sufficient to solve it.
It follows that a uniqeness test needs only to consider the grid state once all pairs have been satisifed. If there are still free cells following domain shaving (with implied moves applied) then it's not U, there are multiple solutions.
Similarly, if more than 1 "all pairs satisfied" states are detected, it's not U.