lksudoku wrote:Therefore the only difference (below 6.5) is in the puzzle
001002003020010400300900070006000004010090030800000900030004007004050090600700200 4258 6.00 5.60
Which is the puzzle I mentioned in which there are 3 possible UR type 1, and choosing two of them yields 6.00 rating while choosing the third one yields a 5.60 rating
This rating difference cannot be avoided because it depends on the choice of a UR out of a list of more than one, when choosing one destroys the other (and all choices are correct for the specific step as they have the same rating)
This could be easily fixed in an updated version. In the case of UR type 1, you don't need to consider the target cell at all. Three corners of an UR type 1 always eliminates both UR candidates, even if they are not present in the target cell anymore. So basically a code that looks for UR type 1 should only look for the three corners. Once they are found, it eliminates the candidates from the target cell, if they are present.
In the case of UR type 4, the code should look for the pair 'ab' and the strong link on 'a' or 'b' that together could create the UR. Once found, the other candidate is eliminated from the strong link cells, if they are present.
These two fixes should correct the rating for this particular puzzle.
In the case of UR type 2 and 3, the cells with extra candidates do not need both candidates a and b to perform the elimination. As long as one has 'a' and the other has 'b' the elimination can be done, thus the solver shouldn't look for anything more than this pattern:
- Code: Select all
ab | aX
ab | bX
There is still the problem that may occur if one UR cell is somehow solved, which in the case of a UR type 1 leads to this pattern:
- Code: Select all
A | B
B | aX
where none of the cells A and B are given. To fix this problem, the solver needs to keep track of which cells are among the original given cells and which are solved cells and treat them differently when applying uniqueness techniques. Any solved cell A can be treated as a candidate pair ab when looking for uniqueness eliminations. In the case above, the solver would then see the three corners of the UR type 1.
If it makes things faster, you could say that any solved cell A can be treated as a candidate pair ab where b is a candidate present in that cell in the initial grid (before any eliminations), or even restrict the value of b to any candidate that has been eliminated from that cell with a technique rated 4.2 or higher. The lower rated techniques cannot destroy a potential UR (neither can Jellyfish or Quads, so candidates eliminated by these could also be excluded). Actually, I don't think even an XY-wing can solve a cell in a potential UR without also solving itself, thus making the UR elimination, but I'm not 100% sure about this. But this restriction of candidate b is not necessary, because even if B is a given candidate in the same unit, you won't find any UR anyway.
These same rules can be applied to BUG-lites. Using these fixes, you will always find these URs, even if they don't appear at the time in the solving path.
RW
[Edit: Alternatively all problems mentioned above can be fixed in one sweep by having all uniqueness techniques treat all candidates eliminated by techniques rated 4.2 or higher (excluding Jellyfish and Quads) as candidates that may or may not be present. Though I'm not sure how easy this is to implement...]