YZF_Sudoku

Programs which generate, solve, and analyze Sudoku puzzles

Re: YZF_Sudoku

Postby yzfwsf » Mon Oct 12, 2020 2:18 pm

ghfick wrote:I give a screenshot of a Dual ER in the puzzles section of the forum.
I will get back to you on the other queries.

Support for Dual ER has been added, and 3 strong interforence UR have been enhanced.

release version 614:
https://drive.google.com/file/d/1tMOxxsAUsVxsGY4_h9PmX-Xym8ICVUyO/view?usp=sharing
yzfwsf
 
Posts: 276
Joined: 16 April 2019

Re: YZF_Sudoku

Postby yzfwsf » Wed Oct 14, 2020 3:23 pm

Sorry,In order to implement Dual ER, a bug that caused the program to crash was accidentally introduced (when there are too many eleminations), please download again.
https://drive.google.com/file/d/1yQuwlFijJ5FGiYybwHPXyFWOL6st3xq-/view?usp=sharing
yzfwsf
 
Posts: 276
Joined: 16 April 2019

Re: YZF_Sudoku

Postby creint » Thu Oct 15, 2020 4:46 pm

http://forum.enjoysudoku.com/crazy-t38334.html#p296161

Code: Select all
.--------------.-----------------.--------------------.
| 8   23   23  | 4569  456   69  | 56     7     1     |
| 4   6    5   | 1     3     7   | 2      9     8     |
| 9   7    1   | 256   256   8   | 356    4     35    |
:--------------+-----------------+--------------------:
| 6   123  234 | 7     8     39  | 13459  135   23459 |
| 13  8    9   | 456   1456  2   | 7      16    34    |
| 7   5    234 | 469   146   369 | 8      136   2349  |
:--------------+-----------------+--------------------:
| 5   13   8   | 26    267   4   | 19     23    79    |
| 12  9    6   | 3     27    15  | 145    8     457   |
| 23  4    7   | 8     9     15  | 135    1235  6     |
'--------------'-----------------'--------------------'

Missing exclusion -6r5c5 Hidden Rectangle 16r56c58
creint
 
Posts: 223
Joined: 20 January 2018

Re: YZF_Sudoku

Postby yzfwsf » Fri Oct 16, 2020 9:54 pm

creint wrote:http://forum.enjoysudoku.com/crazy-t38334.html#p296161

Code: Select all
.--------------.-----------------.--------------------.
| 8   23   23  | 4569  456   69  | 56     7     1     |
| 4   6    5   | 1     3     7   | 2      9     8     |
| 9   7    1   | 256   256   8   | 356    4     35    |
:--------------+-----------------+--------------------:
| 6   123  234 | 7     8     39  | 13459  135   23459 |
| 13  8    9   | 456   1456  2   | 7      16    34    |
| 7   5    234 | 469   146   369 | 8      136   2349  |
:--------------+-----------------+--------------------:
| 5   13   8   | 26    267   4   | 19     23    79    |
| 12  9    6   | 3     27    15  | 145    8     457   |
| 23  4    7   | 8     9     15  | 135    1235  6     |
'--------------'-----------------'--------------------'

Missing exclusion -6r5c5 Hidden Rectangle 16r56c58

As far as I know, Hidden Unique Rectangle cannot eliminate 6r5c5.
I wrote the code referring to the explanation of the following website
https://www.sudopedia.org/wiki/Uniqueness_Test#Hidden_Unique_Rectangle

Modified the implementation method of cell compact expression. Change 614V2 needs to enable DNL to search for Cell/Region/UR FC (if DNL is not enabled, then only search for chains with strong relationships as the starting point). So release 614V3:
https://drive.google.com/file/d/1XjqAVxoXK8w-O111tnLTIYXEVZeFXcsk/view?usp=sharing
yzfwsf
 
Posts: 276
Joined: 16 April 2019

Re: YZF_Sudoku

Postby RSW » Fri Oct 16, 2020 10:39 pm

I checked this to see if my solver would find it.
Code: Select all
 +------------+---------------+------------------+
 | 8  23  23  | 4569 456  69  | 56    7    1     |
 | 4  6   5   | 1    3    7   | 2     9    8     |
 | 9  7   1   | 256  256  8   | 356   4    35    |
 +------------+---------------+------------------+
 | 6  123 234 | 7    8    39  | 13459 135  23459 |
 | 13 8   9   | 456  1456 2   | 7     16   34    |
 | 7  5   234 | 469  146  369 | 8     136  2349  |
 +------------+---------------+------------------+
 | 5  13  8   | 26   267  4   | 19    23   79    |
 | 12 9   6   | 3    27   15  | 145   8    457   |
 | 23 4   7   | 8    9    15  | 135   1235 6     |
 +------------+---------------+------------------+
Possible eliminations:
Unique Rectangle UR+2/1SL (type 4 variant 1): (23)r14c23, bilocal digit 2 (row 1) => -3r4c3
Unique Rectangle UR+3/3SL Subtype K: (69)r16c46 => -6r1c4
Unique Rectangle UR+3/3SL Subtype K: (26)r37c45 => -6r3c4
Unique Rectangle UR+3/2SL Subtype B: (16)r56c58 => -6r6c5
Unique Rectangle UR+3/3SL Subtype F: (16)r56c58 => -6r56c5

My solver finds it as a both a subtype B or F (UR +3 extra candidate cells with 3 strong links)
Code: Select all
 ab     abX
         |
        a|   UR+3/2SL Subtype B: eliminate b from lower right cell
     a   |
abY-----abZ

 ab-----abX
     a   |
        b|    UR+3/3SL Subtype F: eliminate a from lower left and lower right cells
     b   |
abY-----abZ

The subtype designation letters used here are non standard, but I added them to the solver in order to keep track of the different variations. They run from A to T.


There's discussion of various other types of UR's here:

post26448.html#p26448
post28313.html#p28313

---------------------------------------------

Edit:

Looking at Andrews Hidden Rectangle page, it appears that he hasn't covered all possible types. In addition to the references I posted above, I overlooked an important one by David P. Bird:
unique-rectangles-gallery-t33752.html

In going through all of these resources, I ended up compiling my own list of conjugate link patterns for UR+3 and UR+4 types and worked my way through the logic in order to understand the eliminations. Excluding rotations and reflections, the following patterns are what I came up with (nCL notation refers to number of conjugate links):

UR+3 patterns:
UR+3/1CL - 2 distinct patterns, none of which yield direct eliminations in UR cells;
UR+3/2CL - 8 distinct patterns, 5 of which yield direct eliminations in UR cells;
UR+3/3CL - 8 distinct patterns, all of which yield direct eliminations in UR cells;
UR+3/4CL - 5 distinct patterns*, 5 of which of which yield direct eliminations in UR cells .

* There is a 6th UR+3/4CL pattern which can never occur because all options are contradictory.

UR+4 patterns:
UR+4/1CL - 1 distinct pattern which yields no direct eliminations in UR cells;
UR+4/2CL - 2 distinct patterns, neither of which yield direct eliminations in UR cells;
UR+4/3CL - 3 distinct patterns, 2 of which yield direct eliminations in UR cells;
UR+4/4CL - 4 distinct patterns, 2 of which yield direct eliminations in UR cells.

Note that some of the patterns may yield eliminations in external cells or may yield eliminations in the UR cells when applied in combination with external strong links. I haven't checked for those cases.

BTW, here's a rather interesting superimposed (double?) UR+4 that my solver caught in a recent puzzle by Mith:
the-descent-t38214.html
000800000009076000001000540020000003030450020400032010056000100000780000000009008
Code: Select all

 +-------------------+-----------------+-------------------+
 | 23567  467  23457 | 8     1249 1345 | 23679 3679  12679 |
 | 2358   48   9     | 1235  7    6    | 238   38    12    |
 | 23678  678  1     | 239   29   3    | 5     4     2679  |
 +-------------------+-----------------+-------------------+
 | 156789 2    578   | 169   169  178  | 46789 56789 3     |
 | 16789  3    78    | 4     5    178  | 6789  2     679   |
 | 4      6789 578   | 69    3    2    | 6789  1     5679  |
 +-------------------+-----------------+-------------------+
 | 23789  5    6     | 23    24   34   | 1     379   2479  |
 | 1239   149  234   | 7     8    1345 | 23469 3569  24569 |
 | 1237   147  2347  | 12356 1246 9    | 23467 3567  8     |
 +-------------------+-----------------+-------------------+
Superimposed Unique Rectangles (17|18)r45c16:
 (17)r45c16 UR+4/3CL Subtype B (aab-) => -7r5c1
 (18)r45c16 UR+4/3CL Subtype B (aab-) => -8r5c1
RSW
 
Posts: 77
Joined: 01 December 2018
Location: Western Canada

Re: YZF_Sudoku

Postby StrmCkr » Wed Oct 21, 2020 5:13 am

i derped, fixed below
Last edited by StrmCkr on Thu Oct 22, 2020 5:51 am, edited 1 time in total.
Some do, some teach, the rest look it up.
User avatar
StrmCkr
 
Posts: 1200
Joined: 05 September 2006

Re: YZF_Sudoku

Postby yzfwsf » Wed Oct 21, 2020 9:37 am

Hi StrmCkr:
Thanks for reporting the bug, but I want to ask if you are using the latest version?
yzfwsf
 
Posts: 276
Joined: 16 April 2019

Re: YZF_Sudoku

Postby StrmCkr » Wed Oct 21, 2020 5:08 pm

Id have to double check i know its in several versions probably still in the latest..
ill dl it and check tonight seeing how there another new one from a few days back.

Keep up the good work :) id love to see the chain sorting method that was original in hodoku
Made it so much easier to sort through instead of giant lists on solve all. {target cell listing}


edit: yes its in the new one as well
Continuous Nice Loop:1r4c1 = r7c1 - r9c3 = (1-2)r9c5 = r9c2 - r8c1 = (2-1)r4c1 => r4c1<>4r4c1<>7,r8c2<>2,r7c3<>1,
misses: r4c5 <> 1,2
Last edited by StrmCkr on Thu Oct 22, 2020 5:52 am, edited 1 time in total.
Some do, some teach, the rest look it up.
User avatar
StrmCkr
 
Posts: 1200
Joined: 05 September 2006

Re: YZF_Sudoku

Postby yzfwsf » Thu Oct 22, 2020 4:58 am

StrmCkr wrote:Id have to double check i know its in several versions probably still in the latest..
ill dl it and check tonight seeing how there another new one from a few days back.

Keep up the good work :) id love to see the chain sorting method that was original in hodoku
Made it so much easier to sort through instead of giant lists on solve all. {target cell listing}


edit: yes its in the new one still
Continuous Nice Loop:1r4c1 = r7c1 - r9c3 = (1-2)r9c5 = r9c2 - r8c1 = (2-1)r4c1 => r4c1<>4r4c1<>7,r8c2<>2,r7c3<>1

My solver uses Eureka notation instead of Nice Loop notation.
ghfick said here:
http://forum.enjoysudoku.com/yzf-sudoku-t36846-30.html#p286193
yzfwsf
 
Posts: 276
Joined: 16 April 2019

Re: YZF_Sudoku

Postby StrmCkr » Thu Oct 22, 2020 5:46 am

I get that, the move missed r4c5 <>1,2
Which is my bad for not listing it twice.
Code: Select all
+-----------------------+----------------------+--------------------+
| 37       9      67    | 126    1267    4     | 1367   8     5     |
| 347      1      4567  | 56     8       567   | 9      2367  237   |
| 78       5678   2     | 3      9       1567  | 167    4     17    |
+-----------------------+----------------------+--------------------+
| -47(12)  2367   1467  | 12456  567-12  9     | 13457  237   8     |
| 5        278    1478  | 124    3       127   | 147    9     6     |
| 9        2367   1467  | 8      12567   12567 | 13457  237   12347 |
+-----------------------+----------------------+--------------------+
| 7(1)     4      579-1 | 1569   156     8     | 2      367   379   |
| 78(2)    578-2  3     | 2569   4       256   | 678    1     79    |
| 6        8(2)   89(1) | 7      (12)    3     | 48     5     49    |
+-----------------------+----------------------+--------------------+
Some do, some teach, the rest look it up.
User avatar
StrmCkr
 
Posts: 1200
Joined: 05 September 2006

Re: YZF_Sudoku

Postby yzfwsf » Fri Oct 23, 2020 5:29 am

Hi StrmCkr:Tks.
I have added the code for this deletion situation and uploaded an updated version to my Google Cloud Drive.
yzfwsf
 
Posts: 276
Joined: 16 April 2019

Re: YZF_Sudoku

Postby ghfick » Thu Nov 05, 2020 7:01 pm

I may have a correction for YZF_Sudoku.
Consider U225 :
.....6.....678...27..21.....9....3....59.....6....1..7.3....42.8....2..6.6..4..5.
Notice that the pair {3,5} is an Incompatible Base Pair by considering the dual UR threat : r16c45 and r18c45
Now notice that r3c9 must be either 4 or 5. This means that {3,9} is an Incompatible Base Pair as well.
So the Base Cell r1c4 cannot be 3.
Currently YZF_Sudoku does not identify r1c4 <> 3.
Am I correct here?
I am attaching a hand coloured grid.
U225.png
U225.png (165.99 KiB) Viewed 98 times
ghfick
 
Posts: 106
Joined: 06 April 2016

Re: YZF_Sudoku

Postby SpAce » Thu Nov 05, 2020 10:45 pm

ghfick wrote:Notice that the pair {3,5} is an Incompatible Base Pair by considering the dual UR threat : r16c45 and r18c45
Now notice that r3c9 must be either 4 or 5. This means that {3,9} is an Incompatible Base Pair as well.
So the Base Cell r1c4 cannot be 3.
Am I correct here?

Seems valid logic to me. Well spotted.
-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: 2622
Joined: 22 May 2017

Re: YZF_Sudoku

Postby yzfwsf » Fri Nov 06, 2020 12:46 am

Hi ghfick :
AFAIK ,Your logic is correct.But my solver checked dual UR threat before mirror checking.So even if the solver adds your logic, it needs the next search to find it.
yzfwsf
 
Posts: 276
Joined: 16 April 2019

Re: YZF_Sudoku

Postby yzfwsf » Sat Nov 07, 2020 3:50 pm

Modified comlexfish and death bloosom algorithms, speeding up significantly, release version 616, please download from Google Drive.
yzfwsf
 
Posts: 276
Joined: 16 April 2019

PreviousNext

Return to Software