Hodoku missing a loop elimination?

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

Hodoku missing a loop elimination?

Postby SpAce » Thu Aug 16, 2018 4:16 pm

After solving http://forum.enjoysudoku.com/17august18-t34985.html#p269242 manually I checked how Hodoku would have solved it with standard settings. As expected, it uses some variations of the same loops as I did. For the first loop it actually uses a bit smarter version which gets 8 eliminations while I got only 7 (doesn't really matter because claiming gets the missed one(s) next). However, it seems to me that it should have got 9 eliminations with that loop and avoided the claiming move altogether. Am I blind to something or is it Hodoku?

The Hodoku loop:
Code: Select all
.----------------------.---------------------.-----------------------.
| 23789  25789   35789 |x78-2   4       28   |  6        2589  1     |
| 4     x128-5   6     | 9     d23(5)   1238 | c2(5)7   x28-5 x278-5 |
| 12789  125789  15789 | 6    xe(57)-2  128  |  3        2589  4     |
:----------------------+---------------------+-----------------------:
| 1279   3       179   |g(27)   6       4    |xb(59)-12  1258  258   |
| 6      4       89    |h(2)8   1       5    |ia(29)     7     3     |
| 5      1278    178   | 3     f2(7)9  x89-2 |  12       4     6     |
:----------------------+---------------------+-----------------------:
| 138    18      2     | 5      38      7    |  4        6     9     |
| 379    6       4     | 1      239     239  |  8        235   257   |
| 3789   5789    35789 | 4      2389    6    |  127      123   27    |
'----------------------'---------------------'-----------------------'

(9)r5c7 = (9-5)r4c7 = r2c7 - r2c5 = (5-7)r3c5 = r6c5 - (7=2)r4c4 - r5c4 = (2)r5c7 - loop
=> -12 r4c7, -5 r2c289, -2 r3c5, -2 r1c4, r6c6

The last elimination, -2 r6c6, is the one my loop missed. Hodoku's loop has it because of the weak link between the (2)r4c4 and (2)r5c4, and the same applies to -2 r1c4 (which I got differently). Why isn't (2)r6c5 eliminated by the same logic? I don't think it should matter that its cell is part of the loop as the candidate itself is not an active participant. Is there a good reason why it's not eliminated by the loop here?
-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."
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Re: Hodoku missing a loop elimination?

Postby creint » Thu Aug 16, 2018 5:27 pm

It's Hodoku, you could always double check with Xsudo. That one gives that extra elimination you wanted to see.
creint
 
Posts: 393
Joined: 20 January 2018

Re: Hodoku missing a loop elimination?

Postby SpAce » Thu Aug 16, 2018 7:51 pm

creint wrote:It's Hodoku, you could always double check with Xsudo. That one gives that extra elimination you wanted to see.

Thanks for the confirmation. Unfortunately I still don't have Xsudo as I (fortunately) don't have any box running Windows. Someone should port Xsudo to Java so it could be run on less annoying environments. Anyway, I'm quite surprised that Hodoku has a problem with this, as it seems that even SudokuWiki finds that elimination:

Screen Shot 2018-08-16 at 22.41.15.png
Screen Shot 2018-08-16 at 22.41.15.png (144.65 KiB) Viewed 1258 times


PS. How do I make attached images fit the screen? Seems that they don't scale automatically.
-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."
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Re: Hodoku missing a loop elimination?

Postby StrmCkr » Thu Aug 16, 2018 8:11 pm

Discontinuous Nice Loop: 2 r6c5 -2- r5c4 =2= r5c7 =9= r4c7 =5= r2c7 -5- r2c5 =5= r3c5 =7= r6c5 => r6c5<>2


hodoku finds this... using almost all the same nodes.... this might be the reason why its missed in this:

Code: Select all
Continuous Nice Loop: 1/2/5 5= r3c5 =7= r6c5 -7- r4c4 -2- r5c4 =2= r5c7 =9= r4c7 =5= r2c7 -5- r2c5 =5= r3c5 =7 => r4c7<>1, r1c4,r3c5,r4c7,r6c6<>2, r2c289<>5


peers of the weak-link {that are now strong links by the loop} for that digit are eliminated as long as they aren't part of the cells used { non-canabolisitc}

cells that are overlapping on different digit as strong links are restricted to the digits of the overlap. thus eliminate the rest of the digits in those cells.

if the rules of eliminations also included discontinuous rules then it would be seen.

"that's my guess based on elimination scenarios within generic coding rules"
xsudoku finds them all.
Code: Select all
+----------------------+--------------------+----------------------+
| 23789  25789   35789 | 78-2  4       28   | 6        2589  1     |
| 4      128-5   6     | 9     23(5)   1238 | 27(5)    28-5  278-5 |
| 12789  125789  15789 | 6     -2(57)  128  | 3        2589  4     |
+----------------------+--------------------+----------------------+
| 1279   3       179   | (27)  6       4    | -12(59)  1258  258   |
| 6      4       89    | 8(2)  1       5    | (29)     7     3     |
| 5      1278    178   | 3     9-2(7)  89-2 | 12       4     6     |
+----------------------+--------------------+----------------------+
| 138    18      2     | 5     38      7    | 4        6     9     |
| 379    6       4     | 1     239     239  | 8        235   257   |
| 3789   5789    35789 | 4     2389    6    | 127      123   27    |
+----------------------+--------------------+----------------------+
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1430
Joined: 05 September 2006

Re: Hodoku missing a loop elimination?

Postby SpAce » Thu Aug 16, 2018 9:28 pm

StrmCkr wrote:peers of the weak-link {that are now strong links by the loop} for that digit are eliminated as long as they aren't part of the cells used { non-canabolisitc}

Avoiding cannibalism might be the reason, but if so, it's a very bad reason because it wouldn't be real cannibalism (the candidate is not part of the loop, even though it's in a cell involved with the loop). Besides, Hodoku has no problem with cannibalism otherwise, which can be seen in latter steps of its solution to this puzzle. Both of these AICs are cannibalistic:

Hodoku wrote:AIC: 7 7- r8c1 =7= r8c9 =5= r4c9 -5- r4c7 =5= r2c7 =7= r9c7 -7 => r8c9,r9c123<>7

AIC: 8 8- r7c2 =8= r7c5 =3= r2c5 =5= r2c7 =7= r2c9 -7- r9c9 -2- r9c5 -8 => r7c5,r9c123<>8

Such real cannibalism in a continuous loop is of course not possible because a loop can't eat parts of itself (unlike a chain). The (2)r6c5 is not part of the loop, however, so eating it should be perfectly ok.

if the rules of eliminations also included discontinuous rules then it would be seen.

I don't really follow this. That elimination is a direct result of continuous loop elimination rules (weak links eliminate everything in their scope -- in this case both column and box) and doesn't require any special "discontinuous rules". I think the simplest explanation to the omission is a bug that disallows the appearance of "cannibalism" in a continuous loop even if it's not real cannibalism and should be allowed. (Then again, even that's a poor explanation because Hodoku allows eliminations in r3c5 and r4c7 which are loop cells.)
Last edited by SpAce on Thu Aug 16, 2018 9:38 pm, edited 1 time 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."
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Re: Hodoku missing a loop elimination?

Postby StrmCkr » Thu Aug 16, 2018 9:38 pm

the rules for continuous loops eliminate out side the chain, ie peers of weak conversions and sets overlaps as true... best i can tell its the omission part your wondering on

however digesting the continuous loop rules they don't check for internal eliminations as seen by
discontinuous rules that eliminate within the chains end points cells.

which is applied to the aic loops/chains which you also noticed.

an oversight probably.

hodoku does have bugs and faults, and hasnt been updated in a while as the creator is busy with other projects for work, as of the last time i spoke to him directly while developing it.
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1430
Joined: 05 September 2006

Re: Hodoku missing a loop elimination?

Postby SpAce » Thu Aug 16, 2018 9:44 pm

StrmCkr wrote:the rules for continuous loops eliminate out side the chain, ie peers of weak conversions and sets overlaps as true... best i can tell its the omission part your wondering on

however digesting the continuous loop rules they don't check for internal eliminations as seen by
discontinuous rules that eliminate within the chains end points cells.

You managed to reply before I added this part:
I wrote:(Then again, even that's a poor explanation because Hodoku allows eliminations in r3c5 and r4c7 which are loop cells.)

So there is already a form of "cannibalism" allowed. The only difference is that in those cases the weak links are within the cells instead of being external.
-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."
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Re: Hodoku missing a loop elimination?

Postby StrmCkr » Fri Aug 17, 2018 3:49 am

Not exactly, AIC chains eliminate from the start ans end points only.
When the code backtrack on an AIC loop it uses every backtrack stop as new point as end points....

Slightly diffrent. Hopefully that makes it a bit more clear how the search engines work and its elimination removals occur...
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1430
Joined: 05 September 2006

Re: Hodoku missing a loop elimination?

Postby SpAce » Fri Aug 17, 2018 12:56 pm

StrmCkr wrote:Not exactly, AIC chains eliminate from the start ans end points only.

That's only true for AIC Type 2. AIC Type 1 eliminates externally, but can also eliminate from the chain itself (not the end points, though) as in my two examples.

When the code backtrack on an AIC loop it uses every backtrack stop as new point as end points....

Yes, a loop can be broken at every weak link into an AIC, thus its eliminations could be replicated with as many AICs as there are weak links. In our case the relevant AIC would be:

Code: Select all
.----------------------.---------------------.--------------------.
| 23789  25789   35789 |  78-2  4       28   | 6       2589  1    |
| 4      1258    6     |  9    e23(5)   1238 |d2(5)7   258   2578 |
| 12789  125789  15789 |  6    f2(57)   128  | 3       2589  4    |
:----------------------+---------------------+--------------------:
| 1279   3       179   |@h(27)  6       4    |c(59)12  1258  258  |
| 6      4       89    |@a(2)8  1       5    |b(29)    7     3    |
| 5      1278    178   |  3    g(7)9-2  89-2 | 12      4     6    |
:----------------------+---------------------+--------------------:
| 138    18      2     |  5     38      7    | 4       6     9    |
| 379    6       4     |  1     239     239  | 8       235   257  |
| 3789   5789    35789 |  4     2389    6    | 127     123   27   |
'----------------------'---------------------'--------------------'

(2)r5c4 = (2-9)r5c7 = (9-5)r4c7 = r2c7 - r2c5 = (5-7)r3c5 = r6c5 - (7=2)r4c4 => -2 r1c4, r6c56

That AIC just happens to form a loop also because the end points have a weak link between them, which allows other eliminations as well (through their corresponding AICs). Note that it's not cannibalistic. Even though the elimination cell r6c5 is part of the chain, the eliminated candidate (2) is not.

On the other hand, this is a real cannibalistic elimination (Hodoku Step 5):

Code: Select all
.-----------------------.--------------.-----------------------.
|  23789  25789  35789  | 78  4    28  |  6      2589   1      |
|  4      128    6      | 9   235  13  | e(57)   28     278    |
|  12789  25789  15789  | 6   57   128 |  3      2589   4      |
:-----------------------+--------------+-----------------------:
|  1279   3      179    | 27  6    4   | d(5)9   1258  c(5)8   |
|  6      4      89     | 28  1    5   |  29     7      3      |
|  5      278    178    | 3   79   89  |  12     4      6      |
:-----------------------+--------------+-----------------------:
|  13     18     2      | 5   38   7   |  4      6      9      |
|@a3(7)9  6      4      | 1   29   239 |  8      235   b2(5-7) |
|  389-7  589-7  3589-7 | 4   289  6   |@f12(7)  123    27     |
'-----------------------'--------------'-----------------------'

(7)r8c1 = (7-5)r8c9 = r4c9 - r4c7 = (5-7)r2c7 = (7)r9c7 => -7 r8c9(!), r9c123

(7)r8c9 is actually part of the AIC, and eliminating it destroys the chain. (A loop can never destroy itself but a chain can.)

Hodoku Step 7 is similarly cannibalistic:

Code: Select all
.---------------------.-----------------.-------------------.
| 2389  25789  35789  | 78   4      28  | 6     2589  1     |
| 4     128    6      | 9   c2(35)  13  |d(57)  28   e2(7)8 |
| 1289  25789  1589   | 6    57     128 | 3     2589  4     |
:---------------------+-----------------+-------------------:
| 129   3      179    | 27   6      4   | 59    1258  58    |
| 6     4      89     | 28   1      5   | 29    7     3     |
| 5     278    178    | 3    79     89  | 12    4     6     |
:---------------------+-----------------+-------------------:
| 13  @a1(8)     2    | 5   b(3-8)  7   | 4     6     9     |
| 7     6      4      | 1    29     239 | 8     235   25    |
| 39-8  59-8   359-8  | 4  @g(28)   6   | 127   123  f(27)  |
'---------------------'-----------------'-------------------'

(8)r7c2 = (8-3)r7c5 = (3-5)r2c5 = (5-7)r2c7 = r2c9 - (7=2)r9c9 - (2=8)r9c5 => -8 r7c5(!), r9c123
-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."
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Re: Hodoku missing a loop elimination?

Postby StrmCkr » Sat Aug 18, 2018 2:30 am

Point a is the start, step f is the end of the AIC elimination point I made befor still holds.

eliminations are peers of the start and end smashing all of its combined peer from those cells. Which also includes r8c9

Code: Select all
 
    .-----------------------.--------------.-----------------------.
    |  23789  25789  35789  | 78  4    28  |  6      2589   1      |
    |  4      128    6      | 9   235  13  | e(57)   28     278    |
    |  12789  25789  15789  | 6   57   128 |  3      2589   4      |
    :-----------------------+--------------+-----------------------:
    |  1279   3      179    | 27  6    4   | d(5)9   1258  c(5)8   |
    |  6      4      89     | 28  1    5   |  29     7      3      |
    |  5      278    178    | 3   79   89  |  12     4      6      |
    :-----------------------+--------------+-----------------------:
    |  13     18     2      | 5   38   7   |  4      6      9      |
    |@a3(7)9  6      4      | 1   29   239 |  8      235   b2(5-7) |
    |  389-7  589-7  3589-7 | 4   289  6   |@f12(7)  123    27     |
    '-----------------------'--------------'-----------------------'


(7)r8c1 = (7-5)r8c9 = r4c9 - r4c7 = (5-7)r2c7 = (7)r9c7 => -7 r8c9(!), r9c123
Last edited by StrmCkr on Sat Aug 18, 2018 5:04 am, edited 1 time in total.
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1430
Joined: 05 September 2006

Re: Hodoku missing a loop elimination?

Postby SpAce » Sat Aug 18, 2018 3:50 am

StrmCkr wrote:Point a is the start, step f is the end of the AIC elimination point I made befor still holds.

eliminations are peers of the start and end smashing all of its combined peer from those cells. Which also includes r7c8

Which AIC are you talking about? I can't match "a", "f", "r7c8" to anything above.
-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."
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Re: Hodoku missing a loop elimination?

Postby StrmCkr » Sat Aug 18, 2018 5:07 am

Corrected the typos that didn't correct from my above post, sorry commenting from a phone is terrible... Can't copy and paste very well...
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1430
Joined: 05 September 2006

Re: Hodoku missing a loop elimination?

Postby SpAce » Sat Aug 18, 2018 11:47 am

StrmCkr wrote:Point a is the start, step f is the end of the AIC elimination point I made befor still holds.

eliminations are peers of the start and end smashing all of its combined peer from those cells. Which also includes r8c9

We don't have any disagreements with that, of course. I guess I misunderstood your earlier point a bit.
-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."
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Re: Hodoku missing a loop elimination?

Postby StrmCkr » Sun Aug 19, 2018 1:04 am

We don't have any disagreements with that, of course. I guess I misunderstood your earlier point a bit.


:) i t haven't any disagreement with you either, just trying to get my pov to match up with yours or vice versa...

so, yeah i don't really see any good reason for hodoku's continuous loops to not eliminate from internal cells, when it does the weak ==> strong link conversion...

good catch

strmckr

something for me to keep in mind my self when i add my own, aic & nice loops engine to my solver.
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1430
Joined: 05 September 2006

Re: Hodoku missing a loop elimination?

Postby StrmCkr » Mon Aug 20, 2018 2:21 pm

here's some more complicated stuff that is also missing/lacking and never completed but seen as notes in hodoku

Code: Select all
+------------------------------+-----------------------+-------------------+
| 124579     (1579-2)   1579-4 | 2468   246789  24689  | 45679  3    5679  |
| 6          (279)      (479)  | 5      234-79  234-9  | 1      8    (79)  |
| 4579       8          3      | 46     1       469    | 45679  2    5679  |
+------------------------------+-----------------------+-------------------+
| 248-1      (12)       (14)   | 9      5       7      | 3      46   68-1  |
| 34578-1    6          57-14  | 148    348     1348   | 4578   9    2     |
| 2345789-1  (3579-12)  579-14 | 12468  23468   123468 | 45678  467  15678 |
+------------------------------+-----------------------+-------------------+
| 1379       (1379)     6      | 18     89      189    | 2      5    4     |
| 59         4          8      | 7      269     2569   | 69     1    3     |
| 1579       (1579)     2      | 3      4689    145689 | 6789   67   6789  |
+------------------------------+-----------------------+-------------------+


double linked Als-XY - rule
{performs Als-xz & als-xz double linked eliminations for each set combination: AB, BC, AC }


A) [2479] @ 10,11,17
B) [124] @ 28,29
C)[123579] @ 1,28,46,55,73
X: 2,4 Y:2 <--- {in hodoku x&y can never have more then 1 restricted common in each}
(A & B) - double linked { both sets are locked sets} perform double linked eliminations {this is not checked in hodoku}
(B & C ) -1 restricted common {peers of common digits that is not = y can be removed} {this is not checked in hodoku }
(A & C ) peers of common digit in A & C are exclude. {only this is is checked in hodoku}

{combined z's}
Z: 1,2,4,7,9
Eliminations:
27,35,36,38,45,46,47 <> 1
1 ,46 <> 2
2,38,47 <> 4
13 <> 7
13,14 <> 9
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1430
Joined: 05 September 2006

Next

Return to Help with puzzles and solving techniques