Named chains: "Wings & Rings" structure for I'ding in code.

Programs which generate, solve, and analyze Sudoku puzzles

Named chains: "Wings & Rings" structure for I'ding in code.

Postby StrmCkr » Tue Feb 06, 2024 8:19 am

Code: Select all
 Abbreviation keys:

(V)alue
(L)ocation
(C)ell
(S)ector


my code takes the nodes of each strong link by type: Cell, or Sector and sorts the string into smallest order first which isolates duplicates and minimizes the classification for equal chains that are in reverse order.

for example there is No "S - Ring " as a theorized ring version is a M(2)- Ring written backwards by link types.
CSSCSS = SSCSSC

Code: Select all

Size 3 : three strong links 2 weak-inference
 
VVV (3 digits)  XY-Wing: (a=b) - (b=c) - (c=a) => -a (common peers)
                            c    s   c   s   c     
----------------------------------------------------------------------------------------   
VLV (2 digits)  W-Wing: (a=b) - b = b - (b=a) => -a (common peers)
                             C   S   S   S  C 
----------------------------------------------------------------------------------------                         
LVL (2 digits)  S-Wing: a = a - (a=b) - b = b => -a (last), -b (first)
                            S  S   C   S   S   
----------------------------------------------------------------------------------------                  
VLL (2 digits) M2-Wing: (a=b) - b = (b-a) = a => -a (common peers)
                             C   S   S   C   S
                     
VLL (3 digits)  M3-Wing: (a=b) - b = (b-c) = c => -a (last cell)
                             C   S   S   C   S   
----------------------------------------------------------------------------------------            
LLL (1 digit)   L(1)-Wing: a = a - a = a - a = a => -a (common peers)
                             s   s   s   s   s       

LLL (2 digits)  L(2)-Wing: a = (a-b) = b - b = b => -a (last), -b (first)
                             s   c   s   s   s 
                     
LLL (2 digits) L(2)- wing:  a = (a-b) = (b-a) = a => -a (common peers) 
                             S   C   S   C   S                                           
                     
LLL (3 digits)  L(3)-Wing: a = (a-b) = (b-c) = c => -a (last), -c (first)
                             s   C   S   C  S   
----------------------------------------------------------------------------------------               
VLL(2 digits) H(1)- Wing: (a=b) - b = b - b = b => -a (last), -b (first)
                    C   S   S   S   S
               
VVL (2 digits) H(2) Wing: (a=b)-(b=a) - a = a    => -a (common peers)
                          c  s  c   s    s                 
               
VVL (3 digits) : H(3)-Wing: (a=b) - (b=c) - c = c => -a (last cell)
                              C   S   C   S   S     
 
----------------------------------------------------------------------------------------   
Size 4 : 4 strong links 3 weak-inference                  
LLLL Strong - Wing: a=a - b=b - C=C - d=d {first and last cells = first and last digits)
                      S   C   S   C   S   C  S

LLLL i(verted) W-wing:  a=a -  b=b  - b=b - a=a => -a (common peers)
                      s  c  s   s  s  c  s 

VLLVL (Dual W Wing):   a=b - b = b - b=a - a=a  => -a (common peers)
                                c    s   s     s   c   s   s   
----------------------------------------------------------------------------------------   
added these to complete the Inversion we started years ago after stopping at the iW wing.
   { the concept is to take all the links in the descriptions above and exchange = for -, then add the missing strong links found at the start and end of the chain} 

LLLL (3 digits)  (i)XY-Wing: (a=a)-(b = b)-(c = c)-(a=a) => -a (common peers)
                            s   c   s  c   s   c  s
----------------------------------------------------------------------------------------   
LLLL  (i)S-wing:(A=A) -(A = A)-(B = b) - (b=B)
          s   s   s   c   s    s   s      
----------------------------------------------------------------------------------------   
 LLVL  (i)M(2) wing(a=a)-(b=b) - (b=a) -(a=a) => -a (common peers)
             s  c  s   s   c   s  s   

LLVL   (i)M(3)-Wing: (a=a)-(b = b) - (b=c) - (c=c) => -a (last), -b (first)
                       S C   S     S   C  S    S
-------------------------------------------------------------------------------------------
LLLL (1 digit)   (i)L(1)-Wing: a = a - a = a - a = a - a=a => -a (common peers)
                                s   s   s   s   s   s   s

LVLLL (2 digits)  (i)L(2)-Wing: (a=a) -(a=b) - (b = b) - (b=b) => -a (last), -b (first)
                             s   s  c   s    s    s   s

LVVL (2 digits) (i)L(2)- wing:  (a=a) - (a=b) - (b=a) - (a=a) => -a (common peers)
                                 s   s   c   s   c   s   s

LVVL (3 digits)  (i)L(3)-Wing: a=a - (a=b) - (b=c) - c=C => -a (last), -c (first)
                             s  S   C   S  C     S  S 
----------------------------------------------------------------------------------------   
LLLL(2 digits) (i)H(1)- Wing: (a=a)-(b = b) - (b = b) - (b=b) => -a (last), -b (first)
                              s  c  s    s    s     s  s    

LLLL (2 digits) (i)H(2) Wing: (a=a)-(b=b)-(a = a) - (a=a)    => -a (common peers)
                             s  c  s   c  s    s   s     
 LLLL (3 digits) : (i)H(3)-Wing: (a=a)-(b=b)-(c=c)-(c=c) => -a (last), -b (first)
                               s  c  s  c  s  s  s            
                  
----------------------------------------------------------------------------------------   
note: my code for Aic "rings" cannot swap the order due to the "weak link" added at the end case counts must include variations.

LLLL (1 digit) L1-Ring:    a = a - a = a - a = a - a  => (ring elims)
                             s   s   s   s   s   S
                     
LVVL (2 digits) H(2) Ring:  a = a -(a=b)-(b=A) - a   => (ring elims)
                            s   s  c  s  c   s     
         
VLLV(2 digits) H(2)-Ring: (a=b)-(b)=(b)-(b=a)-(a)r7c4 => (ring elims)
                            c S    S   S  C  S
                     
VVLL(2digit H(2)-wing: (A=b)-(a=b)-(b)=(b)-(a)r1c1 => r12c2 <> 2, 6; b3p24 <> 2
                         C  S  C  S   S   S         
                           
LLLL (2 digits): L2- Ring:  a = (a-b) = (b-a) = a  - A {RING ELIMS}   
                             S   C   S   C    S    S
                  
LLLL(2 digit) L(2)Ring: (a)=(a-b)=(b)-(b)r12c4=(b-a) => (ring elims)
                         S   C   S    S       S  C

VLLL (2 digits) M2-Ring: (a=b) - b = (b-a) = a - a=> (ring elims)
                             C   S   S   C   S  S

LLLV (2 digit) M2 -Ring: A=(a-B)=(B)-(B=A)-(A) => {RING eLIMS}
                      S  C  S   S  C  S
            
LVLL(2 digit)M(2) Ring: (a)=(a)-(a=b)-(b)=(b-a) => r6c8 <> 2, 6; r6c4 <> 6
                           s   s  c  s   s  c     
                                
LLLLV Strong - Ring: (a=a) - (b=b) - (C=C) -(d=d) - a { Ring elims)
                          S   C   S   C   S   C   S  C      
                                       
VVVVL (4 digits) xY-Ring: (a=b) - (c=d) - (d=e) -(e=a) - a =>  {ring elims}
                              c    s   c   s   c   s   c  s
            
VLVLL (3 digits) W-Ring: (a=b) - b = b - (b=a) - a = a - a= =>  (ring elims)
                             C   S   S   S  C  s  s  s

LVLVL (3 digits) W -Ring:A=A - (a=b) - b = b - (b=a) - a= =>  (ring elims)
                                     S    S    C   S   S     S  C     S

LLLLL (3 digits)  (i)XY-Ring: (a=a)-(b = b)-(c = c)-(a=a) -a =>
                                s   c   s  c   s   c  s    a 

LLLLL (i)W- ring (A=A)-(B=B)-(B=B)-(A=A)-a  =>
           s  c  s  s  s  c  s  s   

LLLLV (i)S-Ring:(A=A) -(A = A)-(B = b) - (b=B) -a
          s   s   s   c   s    s   s   c       

 LLVLL    (i)M(2)ring(a=a)-(b=b) - (b=a) -(a=a) - a =>
            s  c  s   s   c   s  s     s        

LLVLL (i)M(3)-Ring: (a=a) -(b=b) - (b=c)  - c = c - a =>
                    s  c  s   s   c    s   s   c    
 
LLLLL (1 digit)   (i)L(1)-Ring: a = a - a = a - a = a - a=a -a
                                s   s   s   s   s   s   s  s     

LVLL (2 digits)  (i)L(2)-Ring: (a=a) -(a=b) - (b = b) - (b=b)-A =>
                               s   s  c   s    s    s   s  C 

LVVL (2 digits) (i)L(2)- Ring:  (a=a) - (a=b) - (b=a) - (a=a) -a => 
                                 s   s   c   s   c   s   s    s   

LVVL (3 digits)  (i)L(3)-Ring: a=a - (a=b) - (b=c) - c=C - A
                             s  S   C   S  C     S  S    C   
   
LLLL(2 digits) (i)H(1)- Ring: (a=a)-(b = b) - (b = b) - (b=b)-a => -a (last), -b (first)
                              s  c  s    s    s     s  s  C

LLLLL (2 digits) (i)H(2) Ring: (a=a)-(b=b)-(a = a) - (a=a) -a   =>
                             s  c  s   c  s    s   s     S

LLLLV (3 digits) : (i)H(3)-Ring: (a=a)-(b=b)-(c=c)-(c=c)-a =>
                               s  c  s  c  s  s  s  C     

------------------------------------------------------------------------   
          
notes: X - chain
LL:    a = a - a = a
  has sub classed based on combinations of Row/col/ box
   link type 2(bi local}, type 3 {single to grouped},type 4(grouped to single),(5 all eri)
   
  (row + row) or (col + col) links are type 2 only:  x- wing
   row + col  - links are type 2:  2- String kite
   
   row + col  - links are type 3 to type 4: grouped 2-string kite  { one of the type 3 or type 4 may be replaced with type 2}
   
  (row or col) + box => type 2 to type 5 :  Empty rectangle
 
  note : if the start and end cells are not have direct peers { the finned is changed to Sashimi}
  (Row + row) or (col + col)  links are type 4 to type 2 :  Finned X - wing
  (Row + row) or (col + col)  links are type 2 to type 3 :  Finned X - wing
 
   note : if the start and end cells are not have direct peers
    (row + row) or (col + col) links are type 2 only:  Skyscraper { is a combination of 2 Sashimi x-wings}
  ------------------------------------------------------------------------
 notes: X - chain
LLLL:    a = a - a = a -a
     this is the X-wing by name technically its a "ring"

------------------------------------------------------------------------
notes: X-chain subclass L1 wing 
 LLL: a=a - a = a - a= a 
   has further sub-classifications if you wish: 
 
  box - box  - box : all type 5 links => 3x ERI
 
  Row - box - col: type 2 to type 5 to type 2: =>  Dual empty rectangle {Mr.Crabs}
  Row - box - col: type 4 to type 5 to type 3: =>  Rec't kite { one of the type 3 or type 4 may be replaced with type 2}
 
  box - (row or col) - box : tpe 5 to type 2 to type 5 : linked Dual ERI
  ------------------------------------------------------------------------
  notes: X-chain subclass L1 Ring 
 LLLL: a=a - a = a - a= a - a 
   has further sub-classifications if you wish: 
   
  Row - box - col - back to start: type 2 to type 5 to type 2: =>  Dual empty rectangle: ring {Mr.crab pinched him self}
  Row - box - col - back to start: type 4 to type 5 to type 3: =>  Rec't kite: ring { one of the type 3 or type 4 may be replaced with type 2}
 
  box - (row or col) - box - back to start: tpe 5 to type 2 to type 5 : Linked Dual ERI: ring
 
------------------------------------------------------------------------

xy - chains {all bivalves}
 2 digit xy chains {remote pairs}
   
hidden xy - chains { all bi local}
 hidden remote pair { all bi local 2 digits exclusively}
------------------------------------------------------------------------

als to be added later : {if requested} example names

als - xz {1-2 rcc}
ahs -xz

als - xy { 2-3 RCC}
ahs - xy

als - chain {n RCC , n+1RCC}
aals - 2rcc

DDS {sue de coq, death blossom }

ALS - w wing/rings
als - S wing
als - M wing /rings

AHS - w wing/rings
aHs - S wing
aHs - M wing /rings


note: link types with drawings

if anyone has some continuity suggestions I'm open to ideas for streamlining this.

EDIT: added notes for Ring class my code doesn't have a flip option for rings: as the last node is a "Weak link" to finish the ring, so i have to include cases for RING types.
Edit: added missing W-ring trigger, added missing w-dual wing class { break down of the w-rings, half eliminations}
edit: rebuilt inversion named Wings found some errors with in the building of the chains that didnt match others, ground up rebuild 8/10/24
Last edited by StrmCkr on Sat Aug 10, 2024 6:32 am, edited 14 times in total.
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1430
Joined: 05 September 2006

Re: Named chains: "Wings & Rings" structure for I'ding in c

Postby Hajime » Tue Feb 06, 2024 3:38 pm

Hi StrmCkr ,

Impressive, lots of work to do for me.

2 remarks about Empty Rectangles:
1. The site https://www.sudokuwiki.org/Empty_Rectangles just retired the term Empty Rectangles.
2. In http://forum.enjoysudoku.com/x-chain-optimalisation-t38330.html?hilit=Turbot#p296424 I adopted the term TurbotCrane for Non-Grouped X-wings, not being 2StringKite or SkyScraper. After the suggestion of spAce.

About our discussions in topic http://forum.enjoysudoku.com/a-challenge-t42170.html concerning 6-cells = 5 links [3 strong, 2 weak] X-wings
I wrote this below and you answered that some of these cannot exists; fine with me.
Code: Select all
(=)-(=)-(=) Y-Wing 2,3,4 digits
(=)-(=)-=   H-Wing 2,3 digits
(=)-=(-)=   M-Wing 2,3 digits
(=)-=-(=)   W-Wing 2,3 digits
(=)-=-=     ?-Wing 2 digits    (M-Wing?)        <=== changed that to S-wing
=(-)=(-)=   L-Wing 2,3 digits
=(-)=-(=)   ?-Wing 2,3 digits  (M-wing?)
=(-)=-=     L-Wing 2 digits   
=-(=)-(=)   ?-Wing 2,3 digits  (M-Wing?)
=-(=)-=     S-Wing 2 digits
=-=(-)=     ?-Wing 2 digits    (L-Wing?)
=-=-(=)     ?-Wing 2 digits    (S-Wing?)
=-=-=       L1-Wing 1 digit 
all possibilities are above. There are no more. Indeed some cannot be true in vanilla Sudoku's, but maybe possible in variants like SudokuX, Windoku or Jigsaws-with-or-without-boxes.

So I implemented all 13 (6 cells-chain with 5 links [3 strong,2 weak]) in SiSeSuSo with the single-char AND with the number of different involved candidates. So also S2-wing although there is no other than 2 for S-wing.
Maybe some cannot occur, but a don't know for sure in variants and also not for Grouped-stuff. Not yet implemented grouped-methods.
User avatar
Hajime
 
Posts: 1375
Joined: 20 April 2018
Location: Fryslân

Re: Named chains: "Wings & Rings" structure for I'ding in c

Postby StrmCkr » Tue Feb 06, 2024 4:51 pm

Andrew stewards codes all nice loops where Turbots are from, so that's fine by them
Turbot if it's (Odd length niceloop)
Tower crane and loader crane min max eri formations if you want distinction.

Andrews also moved away from human friendly single named chains for generic find all algorithms,
(side effect, niceloops cannot replicate the named aic chains correctly as they start on eliminations!)

This is for aic:

I rather keep away from Turbot as Its associated with niceloops which is the head butt I had with space

They went with Turbot Fishes for all of these:

Sky Scraper, 2 String kite,
Empty rectangles are aic (etc) : (for me these name stay)
(Dosent need distinction for max or min As it Eri link based)
Dual for 2 arms (bilocal) (my original lost thread called this Mr crabs)
Rec't kites for group strong links for arms. (and this one rec't kites)

I recently posted some of my lost eri thread over
here as a human friendly spot-able structures

—————
Both of these have fish underpinned

What I am interested is the H1 wing matches closest to m2 wing: should it be there?

The h2 formation matches (h3) it makes sense to add the h2 class as it uses 2 digits
Aside : the same effects noticed as the s wing
h2 ring formations are exactly w rings (2 digit): since the w-ring's topic doesn't include 2 digit rings: i left it as its own class.
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1430
Joined: 05 September 2006

Re: Named chains: "Wings & Rings" structure for I'ding in c

Postby StrmCkr » Sat Aug 10, 2024 8:20 am

Found some errors in manualy inverting the named chains, updated to correct those errors

Also noticed that w rings (duals strong links) wasn't covered so it's added now, as my code triggered for I'd the rings but never for What if it doesn't make a ring
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1430
Joined: 05 September 2006


Return to Software