OK, all the "bennys" almost-locked set ideas are based on disjoint sets. So
that is what I implemented. These functions are in
http://www.stolaf.edu/people/hansonr/sudoku/almostlocked.js
addAlmostLocked()
1. All almost-locked sets are identified, both in the cell-based form of
bennys (which I refer to as "Y") and in the row/column-based form
extension I seem to have innovated (which I refer to as "X").
Ah -- now, there's one caveat-- I ignore sets that contain naked pairs. This
is a single line in the code -- we could remove it and see if there is any
change -- but I figured that all the naked pair analysis is done already, so
why include them? It just seemed redundant. Correct me if I was wrong
about that. So, for example:
{12 12 54 546} is an almost-locked set, but could there be any
improvement over just using {54 546}? My intuition says no. My intuition is
sometimes wrong, of course....
checkAlmostLocked()
2. All directly weakly-linked almost-locked sets are identified, and any
common weakly associated nodes are eliminated. (basic bennys idea)
3. All mutually doubly-linked almost-locked sets are identified, any
candidates other than the linking candidates themselves that consist of
only a single cell are forced TRUE, and all weakly associated nodes to
either of these sets are eliminated. (my idea?)
checkWeakAlmostLocked()
4. The weakly associated nodes are integrated into the 3D Medusa system
by simply counting weakly associated nodes of an almost-locked set as
weakly associated nodes of any strong chain that is itself weakly
associated with that almost-locked set. (Easier done than said!) This
basically "extends the influence" of all the strong chains that are weakly
associated with almost-locked sets. The real problem here, I think, is that
once this is done, the system works independently of the "source" of the
weak links. So it is NOT easy to trace what exactly caused some more
complex eliminations. That's because the 3D Medusa never actually
calculates or finds any "cycles" -- it just uses relationships to chains.
Not implemented:
A. Any situation where three or more almost-locked sets all of which
involve more than 2-valued cells or conjugate pairs in sequence and
which lead to an elimination. bennys might have shown a few of these.
They would have to involve NO 2-valued cells or conjugage pairs, I think,
because those would be taken care of by 3D Medusa linking to their
component almost-locked "subsets". I can't prove that.
B. (Almost)n-locked sets where n>1. Interesting; where does it end?
C. Strongly linked almost-locked sets that involve more than the original
3D Medusa (simple 2-valued cells and 2-location conjugate pairs). No one
has even suggested this yet; I'm just still trying to figure out if it is of any
real benefit or just a lot of trouble. Could REALLY complicate things, and
it might not even be implementable (by me).