## Hodoku missing a loop elimination?

Post the puzzle or solving technique that's causing you trouble and someone will help

### Re: Hodoku missing a loop elimination?

Hi StrmCkr, I had some trouble understanding your example, for a couple of reasons. First of all, could you please add one line of code to your solver that prints rYcX-coordinates instead of (or in addition to) the cell numbers (which should preferably start at 1 and not 0, btw)? It's pretty tiresome to do that conversion in one's head every time

Secondly, I don't quite follow what your example wanted to demonstrate. All of the eliminations you showed are already produced by Hodoku using just the doubly-linked ALS XZ between AB. (In fact, your puzzle is the Hodoku example for doubly-linked ALS-XZ, minus basics. I knew I'd seen it somewhere! )

Code: Select all
`.-----------------------------.-----------------------.-------------------.| 124579     C579-2    1579-4 | 2468   246789  24689  | 45679  3    5679  || 6          A279     A479    | 5      234-79   234-9 | 1      8   A79    || 4579        8        3      | 46     1       469    | 45679  2    5679  |:-----------------------------+-----------------------+-------------------:| 248-1     CB12      B14     | 9      5       7      | 3      46   68-1  || 34578-1     6        57-14  | 148    348     1348   | 4578   9    2     || 2345789-1  C3579-12  579-14 | 12468  23468   123468 | 45678  467  15678 |:-----------------------------+-----------------------+-------------------:| 1379       C1379     6      | 18     89      189    | 2      5    4     || 59          4        8      | 7      269     2569   | 69     1    3     || 1579       C1579     2      | 3      4689    145689 | 6789   67   6789  |'-----------------------------'-----------------------'-------------------'`

Hodoku wrote:Almost Locked Set XZ-Rule: A=r2c239 {2479}, B=r4c23 {124}, X=2,4 => r156c3<>4, r16c2<>2, r2c5<>7, r2c56<>9, r4c19,r5c13,r6c123<>1

...or AB: (4={1}2)r4c32 - (2{79}=4)r2c293 - loop => same eliminations

My question is, what do we need C for?
Last edited by SpAce on Wed Aug 22, 2018 2:12 pm, edited 3 times in total.
-SpAce-: Show
Code: Select all
`   *             |    |               |    |    *        *        |=()=|    /  _  \    |=()=|               *            *    |    |   |-=( )=-|   |    |      *     *                     \  ¯  /                   *    `

"If one is to understand the great mystery, one must study all its aspects, not just the dogmatic narrow view of the Jedi."

SpAce

Posts: 2559
Joined: 22 May 2017

### Re: Hodoku missing a loop elimination?

Arrays in code start at zero, which Is why it's zero based...
Since my solver keeps everything zero based I tend to forget to add 1 to everything... converting to cardinal is a pain at I have to do it manually as my newly added display function dosen t do rc lookup yet for quick display.(which is what I copied from manually )

The point for the example is that you will not find this example as an Al's xy wing.
As it has more then 1 rc between sets,

Since you pointed out the als xz, if you convert these cells into any of the als. Xy wings you will. Not find any in hodoku that matches all the eliminations of the als xz rule. Even though it is possible.

The most it will do is a and c peers. For eliminations

Instead of stuff I outlined previously...
Ie
Als xz rules between each set,

Just some stuff I noticed while digging around.
Some do, some teach, the rest look it up.

StrmCkr

Posts: 1170
Joined: 05 September 2006

### Re: Hodoku missing a loop elimination?

StrmCkr wrote:The point for the example is that you will not find this example as an Al's xy wing.
As it has more then 1 rc between sets,

Since you pointed out the als xz, if you convert these cells into any of the als. Xy wings you will. Not find any in hodoku that matches all the eliminations of the als xz rule. Even though it is possible.

But I don't really understand what such a weird ALS XY Wing looks like. I understand everything better in a chain format. What kind of a chain structure does it have? A chain, loop, kraken? It's combining a loop with a wing (in this case also overlapping), which makes things weird.

From what I understand, the basic ALS moves can be seen as these chains (x, y, x1, x2, z shown separately as linking/eliminating digits even though they are really parts of A, B, C):

ALS XZ (singly-linked): (zA=x) - (x=Bz) => -z(1..n)

ALS XZ (doubly-linked): (x1A=x2) - (x2=Bx1) - loop => -x1, x2, locked bystanders in A and B

ALS XY-Wing: (zA=x) - (x=Cy) - (y=Bz) => -z(1..n)

From that it actually becomes evident that the doubly-linked XZ shouldn't even be called XZ as there's no Z, just two different(!) Xs!! ALS X2 or more simply ALS-Loop would make more sense. ALS XZ (singly-linked) and ALS XY-Wing are actually more similar to each other than the two versions of ALS XZ. I still can't quite grasp what your combined ALS XY-Wing resembles.
-SpAce-: Show
Code: Select all
`   *             |    |               |    |    *        *        |=()=|    /  _  \    |=()=|               *            *    |    |   |-=( )=-|   |    |      *     *                     \  ¯  /                   *    `

"If one is to understand the great mystery, one must study all its aspects, not just the dogmatic narrow view of the Jedi."

SpAce

Posts: 2559
Joined: 22 May 2017

### Re: Hodoku missing a loop elimination?

Code: Select all
`From that it actually becomes evident that the doubly-linked XZ shouldn't even be called XZ as there's no Z, just two different(!) Xs!! `
it is still has z's since the code examines each x as individually, then cycles the common digits between the sets. x and z become interchangeable. the only difference is because the N+1 sets have 2 restricted commons each set becomes a locked set {n digits in n cells}
which is where the reset of the eliminations occur
but yah.

as a chain would have internal loops that make the weak linked sets all strong links.
Code: Select all
`       C  =    B      ||       ||A  =   B     = C ||    ||        B  =  A        `

for me to write out probably not going to happen at least by my chain writing skills..

{any-who i just wanted to show that hodoku is missing several things, some of them have notes in the programing code to what needed to be added}
Some do, some teach, the rest look it up.

StrmCkr

Posts: 1170
Joined: 05 September 2006

### Re: Hodoku missing a loop elimination?

StrmCkr wrote:{any-who i just wanted to show that hodoku is missing several things, some of them have notes in the programing code to what needed to be added}

I understand that. I just don't understand your example. The doubly-linked XZ between AB already provides all the eliminations you proposed for the larger combination, so the latter would be an unnecessary complication in this case. Could you provide an example which would actually produce extra eliminations? Otherwise I must think it's a good thing that Hodoku doesn't have such a monster confusing simple people like me

Also, I still don't understand how your larger structure should even work. There's no restricted common between BC, as both 1 and 2 (the only common digits) can be found in the overlapping area (r4c2) and can't be RCCs. AC has a restricted common (2) but their other common digits (79) can't provide eliminations or continue a chain. AB is the only combo that seems to work and it doesn't need any help from others. Thus I can't build any kind of ALS XY with those three ALSs. What am I missing?
-SpAce-: Show
Code: Select all
`   *             |    |               |    |    *        *        |=()=|    /  _  \    |=()=|               *            *    |    |   |-=( )=-|   |    |      *     *                     \  ¯  /                   *    `

"If one is to understand the great mystery, one must study all its aspects, not just the dogmatic narrow view of the Jedi."

SpAce

Posts: 2559
Joined: 22 May 2017

### Re: Hodoku missing a loop elimination?

Crap again... Didn't swap the sectors to match forums notation (I search for c first then add the linking b and a sectors)
...... Man I made this way more confusing then I needed... Applogies

A links to b x =24
A links to c y =2

Peers of bc for shared Common 1, has no direct eliminations.

That leaves the internal links doing all the work.

Overly complicated yup, but still works.
might take me a while to dig something up that includes all the eliminations for internal and xternal.
Some do, some teach, the rest look it up.

StrmCkr

Posts: 1170
Joined: 05 September 2006

### Re: Hodoku missing a loop elimination?

StrmCkr wrote:might take me a while to dig something up that includes all the eliminations for internal and xternal.

I'm looking forward to seeing that. I'm still having a hard time imagining how it could even theoretically produce something clearly useful, so I really need an example. Even if there are extra eliminations to be had, I think they'd probably be achieved more simply with two moves: first applying the doubly-linked ALS-loop by itself (because it really is an independent entity) and then whatever else is there. I'd see the value-add of the more complicated structure only if it could eliminate something that the smaller parts could not by themselves. In general I think simplicity is a valuable goal, even if it adds some moves.

Here's a somewhat related example from today's daily puzzle. After solving it I checked Hodoku's offerings and found this weird-looking X-Chain:

Screen Shot 2018-08-23 at 14.54.46.png (81.27 KiB) Viewed 342 times

Hodoku wrote:X-Chain: 9 r9c6 =9= r9c8 -9- r7c7 =9= r3c7 -9- r3c2 =9= r1c2 -9- r1c6 =9= r9c6 => r1c6,r7c4,r9c8<>9

At first glance it wasn't self-evident to interpret, because it doesn't look like what I would consider an X-Chain (a normal AIC with two end-points doing the eliminations). With the eliminations all over the place and no clearly defined end-points, it looks like a (continuous) loop, but obviously isn't because of the odd number of nodes and cannibalistic eliminations. It's not acting as a discontinuous nice loop (type 2) either (although it could), because that would eliminate 2r9c6 (i.e. place 9r9c6). Instead it's combining all the X-Chain possibilities of those cells and performing all of their eliminations at once (using different end-points each time), which makes it look weird to me. To me it would be simpler to show just one of those chains and its eliminations (thankfully Hodoku does that too). After all, any one of those is enough to produce the other eliminations through singles.

My point is that unless your example produces eliminations not found through simpler means (possibly in two steps), it probably isn't something I would blame Hodoku for not having.
-SpAce-: Show
Code: Select all
`   *             |    |               |    |    *        *        |=()=|    /  _  \    |=()=|               *            *    |    |   |-=( )=-|   |    |      *     *                     \  ¯  /                   *    `

"If one is to understand the great mystery, one must study all its aspects, not just the dogmatic narrow view of the Jedi."

SpAce

Posts: 2559
Joined: 22 May 2017

### Re: Hodoku missing a loop elimination?

Wasn't blaming it for not having them noting it was simply noted and identified als xy stuff that it skips over..
Under its current code..
AND pointing out that the code has it in notes to find them but the elimination routines aren't installed.

Which is intresting,
Some do, some teach, the rest look it up.

StrmCkr

Posts: 1170
Joined: 05 September 2006

### Re: Hodoku missing a loop elimination?

Code: Select all
`.---------------------------------.---------------------------------.---------------------------------.| 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 || 123456789  279        479       | 123456789  123456789  123456789 | 123456789  123456789  79        || 359        123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 |:---------------------------------+---------------------------------+---------------------------------:| 123456789  12         14        | 123456789  123456789  123456789 | 123456789  123456789  123456789 || 1235       123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 || 1235       123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 |:---------------------------------+---------------------------------+---------------------------------:| 359        123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 || 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 || 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 |'---------------------------------'---------------------------------'---------------------------------'`

find one eventually, make one quickly plausible: meet all your request probably not...

Set A) [2,4,7,9] RC239
Set B) [1,2,3,5,9] @ R3456C1
Set C ) [1,2,4] @ R4C23
X 1,2 y:2,4 Z's: 1,2,3,4,5,7,9

R4C1456789, R2C123, R3C123 <> 1
R13456789C2 <>2
R12489 <>3
R2356789, r4c12456789 <>4
R12489 <> 5
R2c145678<> 7
R145678, R89C1<> 9
Some do, some teach, the rest look it up.

StrmCkr

Posts: 1170
Joined: 05 September 2006

### Re: Hodoku missing a loop elimination?

StrmCkr wrote:find one eventually, make one quickly plausible: meet all your request probably not...

Thanks, StrmCkr! Now I can at least form some structures out of those. However, you're right that I'd see simpler ways to achieve all the eliminations. Let's see the different ways we can combine those ALSs.

First, I can see two doubly-linked ALS XZs: AC and BC.

Code: Select all
`.-----------------------------.---------------.------------------.|            -2         -4    |               |                  ||  -79     A (279)    A (479) | -79  -79  -79 | -79  -79  A (79) ||            -2         -4    |               |                  |:-----------------------------+---------------+------------------:|  -1      C (12)     C (14)  | -1   -1   -1  | -1   -1     -1   ||  -1        -12        -14   |               |                  ||  -1        -12        -14   |               |                  |:-----------------------------+---------------+------------------:|            -2         -4    |               |                  ||            -2         -4    |               |                  ||            -2         -4    |               |                  |'-----------------------------'---------------'------------------'`

(4={1}2)r4c23 - (2{79}=4)r2c293 - loop => -2 c2, -4 c3, -1 r4,b5; -79 r2 (except for AC cells)

Doubly-linked ALX-XZ (BC, x=1,2) (also a Sue de Coq):
Code: Select all
`.------------------------------.------------------.------------------.|   -359                       |                  |                  ||   -359                       |                  |                  || B (359)                      |                  |                  |:------------------------------+------------------+------------------:|   -124359    C (12)  C (14)  | -4    -4    -4   | -4    -4    -4   || B (1235)       -124    -124  |                  |                  || B (1235)       -124    -124  |                  |                  |:------------------------------+------------------+------------------:| B (359)                      |                  |                  ||   -359                       |                  |                  ||   -359                       |                  |                  |'------------------------------'------------------'------------------'`

(2={4}1)r4c23 - (1{359}=2)r3756 - loop -> -124 b4, -124 r4, -359 c1 (except for BC cells) => +4r4c3

I think those are much simpler to see as separate, independent units, and as we can see, solving BC actually breaks A so that's all we need to do (XZ AC is unnecessary). But, let's still look at the ALS XY-Wing possibilities.

ALS XY-Wing(s) (ACB: x=2,4, y=1,2, z=9):
Code: Select all
`.-----------------------------.------------------.------------------.|                             |                  |                  ||   -9      A (279)  A (79-4) |                  |           A (79) || B (359)                     |                  |                  |:-----------------------------+------------------+------------------:|           C (12)   C (14)   |                  |                  || B (1235)                    |                  |                  || B (1235)                    |                  |                  |:-----------------------------+------------------+------------------:| B (359)                     |                  |                  ||                             |                  |                  ||                             |                  |                  |'-----------------------------'------------------'------------------'`

It's impossible for me to write a single chain that combines all those x,y possibilities, so I do it in two parts:

ACB-1 (x=2, y=1, z=9): (947=2)r2c392 - (2=41)r4c23 - (1=2359)r3567c1 => -9 r2c2

ACB-2 (x=4, y=1,2, z=9): (927=4)r2c293 - (4=12)r4c32 - (1|2=359)r3567c1 -> contradiction => -4 r2c3

As we can see, the latter combination produces a contradiction, which results in the same eliminations as XZ (BC) (which is simpler). Thus, no real need for the XY complication.

However, to me the simplest way to achieve the same result is this smaller Sue de Coq (or doubly linked ALS XZ):

Code: Select all
`.---------------------------.------------------.------------------.|  -359                     |                  |                  ||  -359                     |                  |                  || F (359)                   |                  |                  |:---------------------------+------------------+------------------:|  -12359   E (12)    4-1   |                  |                  || D (1235)    -12     -12   |                  |                  || D (1235)    -12     -12   |                  |                  |:---------------------------+------------------+------------------:| F (359)                   |                  |                  ||  -359                     |                  |                  ||  -359                     |                  |                  |'---------------------------'------------------'------------------'`

Sue de Coq (D:1235 + E:12 + F:359):

(1=2) - (2={359}1)r3567c1 - loop => -12 b4, -359 c1 (except SDC cells themselves)

=> 4r4c3 => 79r2c39 => 2r2c2 => 1r2c2 => 2359r3567c1

For that we don't need ALS A at all and only a part of C.
-SpAce-: Show
Code: Select all
`   *             |    |               |    |    *        *        |=()=|    /  _  \    |=()=|               *            *    |    |   |-=( )=-|   |    |      *     *                     \  ¯  /                   *    `

"If one is to understand the great mystery, one must study all its aspects, not just the dogmatic narrow view of the Jedi."

SpAce

Posts: 2559
Joined: 22 May 2017

Code: Select all
`.---------------------------------.---------------------------------.---------------------------------.| 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 || 123456789  279        479       | 123456789  123456789  123456789 | 123456789  123456789  79        || 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 |:---------------------------------+---------------------------------+---------------------------------:| 123456789  12         14        | 123456789  123456789  123456789 | 123456789  123456789  123456789 || 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 || 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 |:---------------------------------+---------------------------------+---------------------------------:| 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 || 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 || 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 |'---------------------------------'---------------------------------'---------------------------------''`

the third rule missing: {yes i know this is an easy case model but it is the easiest to program and show how it works}

als-xy wings triply linked complex. where A,B,C set each have at least 1 different RC, where by each set is always restricted by 1 regardless of any RC placed

the peers of all cells for each digit found in all ABC, cannot contain that digit.
the peers of all cells for each digit found in set Ab or AC or BC cannot contain that digit.
the peers of all cells for each digit found exclusively in A or B or C cannot contain that digit.

A) [12] @ R4C2
B) [2479] @ R2C239
C) [14] @ R4C3

X: 2, Y: 4 Z:1 <-- is also a restricted common between A & C
eliminates:
r1356789c3<>4, r1356789c2<>2, r2c145678<>7, r2c145678<>9, r4c1456789,r5c123,r6c123<>1

normal move set:
Code: Select all
`Almost Locked Set XY-Wing: A=r4c2 {12}, B=r4c3 {14}, C=r2c239 {2479}, X,Y=2,4, Z=1 => r4c1456789,r5c123,r6c123<>1`
Some do, some teach, the rest look it up.

StrmCkr

Posts: 1170
Joined: 05 September 2006

### Re: Hodoku missing a loop elimination?

Thanks StrmCkr. I'm still wondering why we would want such complex rules? No matter what it's called or into how many pieces it's broken, all of those eliminations are available through a short AIC-loop with some ALS nodes. I wouldn't even want to see it as a complex special case of ALS XY-Wing.

What actually puzzles me, though, is that Hodoku doesn't report it as a continuous loop of any kind. It does see all the eliminations through the doubly-linked ALS XZ, but I think it should list these functionally equivalent loops as alternative ways of seeing them:

(4={1}2)r4c32 - (2={79}4)r2c293 - loop

(4=1)r4c3 - (1=2)r4c2 - (2={79}4)r2c293 - loop

(4=1)r4c3 - (1=2)r4c2 - (2=79)r2c29 - (7|9=4)r2c3 - loop

The first one corresponds with the ALS-XZ, of course. Is the second one what you see as the special ALS XY-Wing?
-SpAce-: Show
Code: Select all
`   *             |    |               |    |    *        *        |=()=|    /  _  \    |=()=|               *            *    |    |   |-=( )=-|   |    |      *     *                     \  ¯  /                   *    `

"If one is to understand the great mystery, one must study all its aspects, not just the dogmatic narrow view of the Jedi."

SpAce

Posts: 2559
Joined: 22 May 2017

### Re: Hodoku missing a loop elimination?

(4={1}2)r4c32 - (2={79}4)r2c293 - loop { yes its the double linked als-xz}

(4=1)r4c3 - (1=2)r4c2 - (2={79}4)r2c293 - loop {yes this would be the triple linked als-xy}

(4=1)r4c3 - (1=2)r4c2 - (2=79)r2c29 - (7|9=4)r2c3 - loop { this would the double linked node set in an als-xy}

I'm still wondering why we would want such complex rules? No matter what it's called or into how many pieces it's broken, all of those eliminations are available through a short AIC-loop with some ALS nodes. I wouldn't even want to see it as a complex special case of ALS XY-Wing.

well, the answer is because i am implementing and verifying the building blocks in my code to start working on an als-chain program since a chain starts with 2 sectors as the basic eliminations, i was exploring the maximum eliminations and variations within a 3 linked set as these are directly applied to all steps forward as the chain length grows. {once i have the bases developed applying it to expansion chains is easy}

Also My code as is finds all als-xz, als-xy and i wanted to make sure i had all cases covered for min and max elimination scenarios: i started with the documented stuff for basic rules, and while doing so I manually found more complicated stuff that also works within the constructs layout, all these extra concepts was never implemented anywhere else to my knowledge.

reading a bunch of stuff on als rules and crosschecking available code i discovered the stuff i outlined in this thread was known but not implemented which confirmed my thoughts.

the reasons its not done anywhere else is the K.I.S.S principle practiced by most coders coupled with the notion that a "solver program" should be in a hierarchy order of application of techniques.. Meaning the subset-stuff should already be excluding from later more advanced logic and those "extra" eliminations shouldn't be needed or accounted for as they are eventually picked off by the lower hierarchy. {even though the needed harder step later in a solving path also potential did the work of the smaller logic used early => more steps}

the why is because:
in the long haul i eventually wanted a more robust and explanatory rating system... as i outlined a long time ago...

Hodoku doesn't report it as a continuous loop of any kind.
because it cannot use any als-groups as weak links for nodes, in its loop/aic code.. {another unfinished part of hodoku}
the part i do know why the als-chain function cant find any of them as a chain, is because it only triggers "chain" tag when the size is above 3.
Some do, some teach, the rest look it up.

StrmCkr

Posts: 1170
Joined: 05 September 2006

Previous