I've discovered a new solving technique based on some special subsets of candidates which are a generalization of ALSes.
Those sets are called ---terminology might change--- ALSS (Almost locked subsets) and can be used exactly like ALSes in ALS-XZ/Chain rule
A more thorough description and discussion is found in: http://forum.enjoysudoku.com/new-technique-almost-locked-sub-sets-t33134.html
I want to fork HoDoKu to use this technique as well and the change seems minimal;
Just add to the list of ALSes all the ALSSes (and marking them to distinguish the techniques later in the config system) you can find
However, I have a slight problem:
ALSSes which are not ALS arise from different places, and the problem I have affects almost all of them:
Example is one that avoids DP, an example is given in the thread which I'll repeat:
- Code: Select all
+---------------------------------------------------------------------------+
| - - - | - - - | - - - |
| - - - | - - - | - - - |
| - - - | - - - | - - - |
|----------------------------+--------------------+-------------------------|
| 4- ab12347 4- | - - - | - ab1247 a47 |
| c3456 c3456 - | - c56 - | - - - |
| - b12 - | - - - | - b12 - |
|----------------------------+--------------------+-------------------------|
| - - - | - - - | - - - |
| - - - | - - - | - - - |
| - - - | - - - | - - - |
+---------------------------------------------------------------------------+
The {347} of the 'a' cells form an ALSS to avoid a DP => Something that sould be detected in the UniquenessSolver.java file
The ALS(S)-XZ pattern (which yields eliminations) described is implemented in the AlsSolver.java file (or in a new file with almost the same code) so in order to register the ALSS into this solver UniquenessSolver.java must import the ALS solver; but that's only the case when the ALSS method is enabled or needed which is a result of configuration;
How do I make such conditional dependency (something like #if in C/C++ is a way) [where StackOverflow says every way to simulate #if in Java requires some external tools which I don't see integrated to HoDoKu just for this one technique]?
Is there a workaround that would work specificly in HoDoKu?
Thanks in advance,
Omer Rosler