Pandiagonal #1

For fans of Killer Sudoku, Samurai Sudoku and other variants

Re: Pandiagonal #1

Postby 1to9only » Fri Jun 04, 2021 5:54 pm

denis_berthier wrote:I think the best way is to consider there are two systems of coordinates: (r, c) and (d, a) (or other letters).

Simple is best: (r/c) and (r\c) would be good enough for me. :idea:
1to9only
 
Posts: 3281
Joined: 04 April 2018

Re: Pandiagonal #1

Postby denis_berthier » Fri Jun 04, 2021 6:32 pm

1to9only wrote:
denis_berthier wrote:I think the best way is to consider there are two systems of coordinates: (r, c) and (d, a) (or other letters).

Simple is best: (r/c) and (r\c) would be good enough for me. :idea:

You're missing my point. We need to be able to refer to precise diagonals and anti-diagonals, in the same way as we need to be able to refer to precise blocks in Sudoku (and to precise places in a block).
Diagonals and anti-diagonals must be numbered. The simplest way to do this is to consider them as a second system of coordinates.
As it seems there's no standard for this, we're trying to define one.

If by (r/c), you mean the anti-diagonal passing through (r, c), this is neither simple nor unique for the diagonal.
denis_berthier
2010 Supporter
 
Posts: 2678
Joined: 19 June 2007
Location: Paris

Re: Pandiagonal #1

Postby creint » Fri Jun 04, 2021 8:55 pm

Previous discussion:
http://forum.enjoysudoku.com/sudoku-coordinate-systems-t38136.html

Just giving cell locations is fine for most cases because you can manually find the constraint that can be used.
But for your solving system everything must be named.
I am against introducing new names, because it makes reading harder when you don't know the meaning.
You are probably not planning to define those names in your solve result.
Name and cell index could be used but then there must be a definition on how to interpret the cell index. Left cell first or top cell first.
creint
 
Posts: 322
Joined: 20 January 2018

Re: Pandiagonal #1

Postby denis_berthier » Sat Jun 05, 2021 3:13 am

creint wrote:Previous discussion:
http://forum.enjoysudoku.com/sudoku-coordinate-systems-t38136.html
Just giving cell locations is fine for most cases because you can manually find the constraint that can be used.
But for your solving system everything must be named.
I am against introducing new names, because it makes reading harder when you don't know the meaning.
You are probably not planning to define those names in your solve result.
Name and cell index could be used but then there must be a definition on how to interpret the cell index. Left cell first or top cell first

Even for the simplest bivalue-chains (basic AICs), you need names for the CSP-variables (in your jargon, the strong links) they rely on. Not having them for diagonals would make them totally eligible.
In my system, print-names can be anything and can easily be changed; they are different from internal representations. I use easy-to-read print-names for clarity.

[Edit] Indeed, even for Hidden Singles, if you want to be precise, you have to name the diagonal for which they are Hidden.
denis_berthier
2010 Supporter
 
Posts: 2678
Joined: 19 June 2007
Location: Paris

Re: Pandiagonal #1

Postby denis_berthier » Sat Jun 05, 2021 4:48 pm

Mathimagics wrote: here is a 29-clue version which you might try:
Code: Select all
.....9...CD.....2.........A.8..5...9..........2......A......1.............3......4........1..........CD.3...9..........D...........6.............A.6..............B..57..


That'll be my first Pandiag puzzle.

Solved in W3.
Diagonals are named d1, d2, d3, ... starting respectively from (r1, c1), (r2, c1), (r3,c1)... and extending to the north-east
Anti-diagonals are named a1, a2, a3, ... starting respectively from (r1, c1), (r1, c2), (r1,c3)... and extending to the south-west

(solve ".....9...CD.....2.........A.8..5...9..........2......A......1.............3......4........1..........CD.3...9..........D...........6.............A.6..............B..57..")
Hidden Text: Show
***********************************************************************************************
*** LatinRules 2.1.s based on CSP-Rules 2.1.s, config = W+S
*** Using CLIPS 6.32-r801
*** Running on MacBookPro Retina Mid-2012 i7 2.7GHz, 16GB 1600MHz DDR3, MacOS 10.15.7
*** Download from: https://github.com/denis-berthier/CSP-Rules-V2.1
***********************************************************************************************

Code: Select all
Resolution state after Singles:
124567B     124578B     13457B      13678AB     457B        9           234578A     134678A     24678AB     C           D           123458B     2345678AB   
1456789BCD  134579BCD   1345679BC   2           3478        478BC       14678ACD    4789ABC     3568AD      14678AB     13458AB     3678BC      345689BCD   
A           12347BCD    8           367C        1347BCD     5           47C         16BD        347BC       9           2346B       123467B     267BC       
16789BC     13459BD     34567C      135679ABCD  13478ABCD   14678ABCD   13689AD     2           4578ABC     478AB       134568      1456789ABC  34578BD     
4567BD      A           234569BC    36789BCD    247BCD      2368BD      3456789C    3478B       1           24678BD     24589B      234578C     23456789BCD
245678C     124578BD    12679BC     1689BCD     1258ABD     1467ABC     124578AC    45678ABCD   246789BD    3           12458B      245789ABC   4567AD     
25678CD     23789BCD    267B        4           358BC       2378ABC     23567ACD    356789BCD   56789ABCD   278BD       589B        567AB       1           
24789B      12478       123569B     135678AB    12378B      23468B      123456789   145679AB    2345789B    14678AB     C           D           245678AB   
3           258B        14567C      1578ABC     9           12678BC     124568CD    14578BCD    24567ABCD   1467ABD     4568        124678AB    478BC       
589B        14578BC     D           35678AC     1234578BC   124678AB    123789C     1345689BC   345679AB    2467        12345689AB  1346789ABC  246789AB   
14789B      6           2457BC      35789BC     124578ACD   123478BCD   1234578AD   1379B       23458C      12478ABD    12349AB     124789ABC   3589ABD     
14578BC     23478BD     A           1578BCD     6           123478CD    134579D     34578       23789BC     1248BD      12489B      12359B      345789BC   
2468CD      13489CD     12469       89C         1248ACD     34A         B           134689ACD   23468AD     5           7           134689AC    234AC       
995 candidates, 15689 csp-links and 15689 links. Density = 3.17%

whip[1]: d9n13{r4c6 .} ==> r4c4 ≠ 13
whip[1]: c4n13{r12 .} ==> r12c10 ≠ 13
whip[1]: r3n13{c8 .} ==> r6c5 ≠ 13, r13c5 ≠ 13

Code: Select all
Resolution state after Singles and whips[1]:
124567B     124578B     13457B      13678AB     457B        9           234578A     134678A     24678AB     C           D           123458B     2345678AB   
1456789BCD  134579BCD   1345679BC   2           3478        478BC       14678ACD    4789ABC     3568AD      14678AB     13458AB     3678BC      345689BCD   
A           12347BCD    8           367C        1347BCD     5           47C         16BD        347BC       9           2346B       123467B     267BC       
16789BC     13459BD     34567C      135679ABC   13478ABCD   14678ABCD   13689AD     2           4578ABC     478AB       134568      1456789ABC  34578BD     
4567BD      A           234569BC    36789BCD    247BCD      2368BD      3456789C    3478B       1           24678BD     24589B      234578C     23456789BCD
245678C     124578BD    12679BC     1689BCD     1258AB      1467ABC     124578AC    45678ABCD   246789BD    3           12458B      245789ABC   4567AD     
25678CD     23789BCD    267B        4           358BC       2378ABC     23567ACD    356789BCD   56789ABCD   278BD       589B        567AB       1           
24789B      12478       123569B     135678AB    12378B      23468B      123456789   145679AB    2345789B    14678AB     C           D           245678AB   
3           258B        14567C      1578ABC     9           12678BC     124568CD    14578BCD    24567ABCD   1467ABD     4568        124678AB    478BC       
589B        14578BC     D           35678AC     1234578BC   124678AB    123789C     1345689BC   345679AB    2467        12345689AB  1346789ABC  246789AB   
14789B      6           2457BC      35789BC     124578ACD   123478BCD   1234578AD   1379B       23458C      12478ABD    12349AB     124789ABC   3589ABD     
14578BC     23478BD     A           1578BCD     6           123478CD    134579D     34578       23789BC     1248B       12489B      12359B      345789BC   
2468CD      13489CD     12469       89C         1248AC      34A         B           134689ACD   23468AD     5           7           134689AC    234AC       

Hidden Text: Show
z-chain[2]: r3n13{c8 c2} - c6n13{r12 .} ==> r11c13 ≠ 13
z-chain[2]: c13n13{r6 r5} - d9n13{r5c5 .} ==> r4c2 ≠ 13
z-chain[2]: r8n10{c13 c10} - r9n10{c10 .} ==> r4c4 ≠ 10
t-whip[2]: a4n13{r7c10 r6c9} - a12n13{r6c4 .} ==> r7c7 ≠ 13
whip[1]: d13n13{r13c1 .} ==> r13c2 ≠ 13
z-chain[2]: a1n13{r9c9 r5c5} - r3n13{c5 .} ==> r9c8 ≠ 13
z-chain[2]: d13n13{r13c1 r12c2} - r3n13{c2 .} ==> r13c8 ≠ 13
whip[1]: r13n13{c9 .} ==> r4c5 ≠ 13, r5c1 ≠ 13
z-chain[2]: c8n13{r7 r6} - a2n13{r13c1 .} ==> r5c10 ≠ 13
z-chain[2]: d1n13{r6c9 r7c8} - c1n13{r13 .} ==> r2c9 ≠ 13
z-chain[2]: d10n13{r5c6 r4c7} - d13n13{r12c2 .} ==> r7c8 ≠ 13
whip[1]: c8n13{r6 .} ==> r3c5 ≠ 13
whip[1]: d1n13{r6c9 .} ==> r6c4 ≠ 13, r6c13 ≠ 13
whip[1]: d5n13{r12c7 .} ==> r9c7 ≠ 13
hidden-single-in-an-anti-diagonal ==> r2c13 = 13
whip[1]: d3n13{r11c6 .} ==> r11c10 ≠ 13, r7c2 ≠ 13
whip[1]: a9n13{r12c7 .} ==> r11c7 ≠ 13, r12c6 ≠ 13
whip[1]: a8n13{r11c5 .} ==> r7c9 ≠ 13
whip[1]: c7n13{r12 .} ==> r12c2 ≠ 13
whip[1]: r4n13{c7 .} ==> r5c6 ≠ 13
z-chain[2]: c13n9{r12 r5} - d11n9{r5c7 .} ==> r11c12 ≠ 9
z-chain[2]: d9n9{r10c13 r12c11} - d5n9{r12c7 .} ==> r10c8 ≠ 9
whip[1]: a12n9{r6c4 .} ==> r4c4 ≠ 9
whip[2]: c11n10{r11 r10} - r9n10{c10 .} ==> r13c13 ≠ 10
whip[2]: d10n10{r6c5 r4c7} - d13n10{r7c7 .} ==> r6c13 ≠ 10
whip[2]: c11n10{r11 r10} - a4n10{r9c12 .} ==> r11c7 ≠ 10
z-chain[3]: c13n10{r11 r10} - d10n10{r4c7 r2c9} - c11n10{r2 .} ==> r11c10 ≠ 10
z-chain[3]: c11n10{r11 r2} - c10n10{r2 r8} - r11n10{c13 .} ==> r4c5 ≠ 10
z-chain[3]: c5n13{r11 r5} - r4n13{c6 c7} - d10n10{r4c7 .} ==> r11c5 ≠ 10
whip[1]: r11n10{c13 .} ==> r10c12 ≠ 10
whip[1]: c5n10{r13 .} ==> r6c12 ≠ 10, r13c12 ≠ 10
z-chain[2]: a8n10{r2c9 r10c4} - c11n10{r10 .} ==> r2c7 ≠ 10
z-chain[2]: d8n10{r13c9 r11c11} - r2n10{c11 .} ==> r1c9 ≠ 10
z-chain[2]: a8n10{r2c9 r10c4} - c11n10{r10 .} ==> r13c9 ≠ 10
whip[1]: d8n10{r11c11 .} ==> r8c8 ≠ 10
whip[1]: d2n10{r10c6 .} ==> r4c6 ≠ 10
z-chain[2]: a10n10{r8c4 r10c6} - d11n10{r6c6 .} ==> r9c4 ≠ 10
z-chain[2]: r9n10{c10 c12} - d2n10{r4c12 .} ==> r10c9 ≠ 10
z-chain[2]: a13n10{r7c6 r1c13} - d8n10{r1c8 .} ==> r6c6 ≠ 10
whip[1]: d11n10{r8c4 .} ==> r2c11 ≠ 10, r8c10 ≠ 10
whip[1]: c11n10{r11 .} ==> r11c12 ≠ 10
whip[1]: a10n10{r10c6 .} ==> r10c4 ≠ 10
whip[1]: a8n10{r2c9 .} ==> r2c8 ≠ 10
hidden-single-in-a-diagonal ==> r10c13 = 10
hidden-single-in-a-column ==> r8c4 = 10
hidden-single-in-a-row ==> r2c9 = 10
hidden-single-in-a-diagonal ==> r11c11 = 10
hidden-single-in-a-row ==> r1c7 = 10
hidden-single-in-a-diagonal ==> r6c8 = 10
hidden-single-in-an-anti-diagonal ==> r4c6 = 13
hidden-single-in-an-anti-diagonal ==> r7c10 = 13
hidden-single-in-an-anti-diagonal ==> r11c5 = 13
hidden-single-in-an-anti-diagonal ==> r3c8 = 13
hidden-single-in-an-anti-diagonal ==> r5c4 = 13
hidden-single-in-an-anti-diagonal ==> r6c2 = 13
hidden-single-in-a-column ==> r9c9 = 13
hidden-single-in-a-row ==> r13c1 = 13
hidden-single-in-a-row ==> r12c7 = 13
hidden-single-in-a-column ==> r9c10 = 10
hidden-single-in-an-anti-diagonal ==> r13c5 = 10
hidden-single-in-a-column ==> r4c12 = 10
hidden-single-in-a-row ==> r7c6 = 10
whip[1]: d5n1{r11c8 .} ==> r10c8 ≠ 1, r4c1 ≠ 1
whip[1]: r3n1{c12 .} ==> r13c2 ≠ 1
whip[1]: r13n1{c12 .} ==> r9c12 ≠ 1
whip[1]: c13n9{r12 .} ==> r5c7 ≠ 9
z-chain[2]: a1n9{r8c8 r12c12} - c7n9{r4 .} ==> r8c9 ≠ 9
z-chain[2]: r8n9{c8 c3} - a1n9{r12c12 .} ==> r2c1 ≠ 9
z-chain[2]: r2n9{c8 c2} - d8n9{r7c2 .} ==> r6c12 ≠ 9
z-chain[2]: r6n9{c9 c4} - d5n9{r4c2 .} ==> r12c9 ≠ 9
whip[1]: r12n9{c13 .} ==> r13c12 ≠ 9
whip[1]: c12n9{r12 .} ==> r10c1 ≠ 9, r11c13 ≠ 9
whip[1]: c13n9{r12 .} ==> r2c3 ≠ 9
whip[1]: r2n9{c8 .} ==> r8c8 ≠ 9
whip[1]: a3n9{r13c2 .} ==> r7c2 ≠ 9
whip[1]: a9n9{r13c8 .} ==> r5c3 ≠ 9
whip[1]: r5n9{c13 .} ==> r7c11 ≠ 9
hidden-single-in-an-anti-diagonal ==> r13c4 = 9
hidden-single-in-an-anti-diagonal ==> r12c12 = 9
hidden-single-in-a-column ==> r8c7 = 9
hidden-single-in-an-anti-diagonal ==> r11c1 = 9
hidden-single-in-an-anti-diagonal ==> r6c3 = 9
hidden-single-in-a-diagonal ==> r5c13 = 9
hidden-single-in-an-anti-diagonal ==> r2c8 = 9
hidden-single-in-a-diagonal ==> r7c9 = 9
hidden-single-in-a-column ==> r10c11 = 9
hidden-single-in-a-row ==> r4c2 = 9
hidden-single-in-a-diagonal ==> r11c8 = 1
whip[1]: d5n3{r13c6 .} ==> r3c9 ≠ 3, r13c9 ≠ 3, r13c12 ≠ 3
whip[1]: a7n3{r13c6 .} ==> r11c6 ≠ 3, r13c2 ≠ 3
whip[1]: d7n1{r4c4 .} ==> r4c5 ≠ 1
whip[1]: r13n1{c12 .} ==> r2c1 ≠ 1, r9c3 ≠ 1
whip[1]: r9n1{c7 .} ==> r6c7 ≠ 1, r1c12 ≠ 1, r6c4 ≠ 1, r12c4 ≠ 1
whip[1]: a6n1{r10c2 .} ==> r2c2 ≠ 1
whip[1]: d9n1{r12c11 .} ==> r4c11 ≠ 1, r3c2 ≠ 1, r12c6 ≠ 1
hidden-single-in-an-anti-diagonal ==> r8c2 = 1
hidden-single-in-an-anti-diagonal ==> r2c3 = 1
hidden-single-in-a-diagonal ==> r6c11 = 1
hidden-single-in-an-anti-diagonal ==> r13c12 = 1
hidden-single-in-an-anti-diagonal ==> r10c6 = 1
hidden-single-in-an-anti-diagonal ==> r12c10 = 1
hidden-single-in-an-anti-diagonal ==> r3c5 = 1
hidden-single-in-an-anti-diagonal ==> r1c1 = 1
hidden-single-in-a-column ==> r9c4 = 1
hidden-single-in-a-row ==> r4c7 = 1
whip[1]: d10n6{r8c3 .} ==> r5c3 ≠ 6, r8c6 ≠ 6
whip[1]: a9n5{r10c5 .} ==> r6c5 ≠ 5, r10c1 ≠ 5
whip[1]: a5n5{r7c11 .} ==> r7c5 ≠ 5, r7c12 ≠ 5
whip[1]: c5n5{r10 .} ==> r10c9 ≠ 5
whip[1]: c1n2{r8 .} ==> r7c2 ≠ 2
whip[1]: d8n2{r13c9 .} ==> r8c9 ≠ 2
whip[1]: r13n8{c9 .} ==> r7c2 ≠ 8
whip[1]: a6n2{r11c3 .} ==> r5c3 ≠ 2, r11c10 ≠ 2
whip[1]: c10n2{r10 .} ==> r5c5 ≠ 2, r10c5 ≠ 2
whip[1]: r10n2{c10 .} ==> r7c7 ≠ 2
whip[1]: c5n2{r8 .} ==> r6c7 ≠ 2, r8c3 ≠ 2
whip[1]: c11n3{r4 .} ==> r3c12 ≠ 3
whip[1]: a5n12{r9c13 .} ==> r2c7 ≠ 12
biv-chain[2]: d8n2{r13c9 r8c1} - r7n2{c1 c3} ==> r13c3 ≠ 2, r1c9 ≠ 2, r3c12 ≠ 2, r11c7 ≠ 2
whip[1]: c7n2{r10 .} ==> r3c13 ≠ 2, r9c6 ≠ 2
whip[1]: d2n2{r9c7 .} ==> r9c2 ≠ 2
whip[1]: r9n2{c12 .} ==> r1c12 ≠ 2
whip[1]: r1n2{c13 .} ==> r3c2 ≠ 2, r12c2 ≠ 2
hidden-single-in-a-column ==> r1c2 = 2
hidden-single-in-a-diagonal ==> r6c5 = 2
hidden-single-in-an-anti-diagonal ==> r9c12 = 2
hidden-single-in-an-anti-diagonal ==> r12c6 = 2
hidden-single-in-an-anti-diagonal ==> r11c9 = 2
hidden-single-in-an-anti-diagonal ==> r13c13 = 2
hidden-single-in-a-column ==> r5c10 = 2
hidden-single-in-a-row ==> r10c7 = 2
hidden-single-in-a-diagonal ==> r3c11 = 2
hidden-single-in-a-column ==> r7c3 = 2
hidden-single-in-a-diagonal ==> r8c1 = 2
whip[1]: d9n6{r6c4 .} ==> r1c4 ≠ 6, r6c1 ≠ 6, r6c9 ≠ 6
hidden-single-in-an-anti-diagonal ==> r13c3 = 6
hidden-single-in-a-diagonal ==> r5c6 = 6
hidden-single-in-a-row ==> r3c12 = 6
hidden-single-in-an-anti-diagonal ==> r4c1 = 6
hidden-single-in-a-diagonal ==> r8c13 = 6
hidden-single-in-an-anti-diagonal ==> r10c9 = 6
hidden-single-in-an-anti-diagonal ==> r2c10 = 6
hidden-single-in-a-diagonal ==> r6c4 = 6
hidden-single-in-a-row ==> r1c8 = 6
hidden-single-in-a-diagonal ==> r7c7 = 6
hidden-single-in-a-diagonal ==> r13c6 = 3
hidden-single-in-a-diagonal ==> r9c11 = 6
whip[1]: r11n3{c13 .} ==> r4c13 ≠ 3, r5c7 ≠ 3
hidden-single-in-a-column ==> r11c7 = 3
hidden-single-in-a-column ==> r4c11 = 3
hidden-single-in-an-anti-diagonal ==> r1c13 = 3
hidden-single-in-an-anti-diagonal ==> r10c12 = 3
hidden-single-in-an-anti-diagonal ==> r8c3 = 3
hidden-single-in-an-anti-diagonal ==> r7c5 = 3
hidden-single-in-an-anti-diagonal ==> r5c8 = 3
hidden-single-in-a-diagonal ==> r3c4 = 3
hidden-single-in-a-row ==> r2c2 = 3
hidden-single-in-a-diagonal ==> r12c9 = 3
whip[1]: a11n8{r9c6 .} ==> r8c6 ≠ 8
whip[1]: c9n12{r4 .} ==> r10c2 ≠ 12
whip[1]: r2n5{c11 .} ==> r5c11 ≠ 5, r5c1 ≠ 5, r12c1 ≠ 5
whip[1]: r5n5{c12 .} ==> r1c3 ≠ 5, r9c3 ≠ 5
whip[1]: a3n5{r11c13 .} ==> r12c13 ≠ 5
whip[1]: r12n5{c8 .} ==> r8c8 ≠ 5
hidden-single-in-an-anti-diagonal ==> r4c4 = 5
hidden-single-in-a-column ==> r11c3 = 5
hidden-single-in-a-diagonal ==> r5c7 = 5
hidden-single-in-an-anti-diagonal ==> r6c13 = 5
hidden-single-in-an-anti-diagonal ==> r7c11 = 5
hidden-single-in-an-anti-diagonal ==> r12c8 = 5
hidden-single-in-an-anti-diagonal ==> r2c1 = 5
hidden-single-in-a-diagonal ==> r8c9 = 5
hidden-single-in-a-row ==> r9c2 = 5
hidden-single-in-a-diagonal ==> r1c12 = 5
hidden-single-in-a-diagonal ==> r10c5 = 5
whip[1]: d1n4{r13c2 .} ==> r12c2 ≠ 4, r13c9 ≠ 4
naked-single ==> r13c9 = 8
hidden-single-in-a-row ==> r1c4 = 8
hidden-single-in-a-diagonal ==> r6c1 = 8
naked-single ==> r10c1 = 11
naked-single ==> r11c13 = 8
hidden-single-in-a-diagonal ==> r2c6 = 8
hidden-single-in-a-row ==> r2c12 = 12
naked-single ==> r10c4 = 7
naked-single ==> r7c1 = 12
naked-single ==> r9c3 = 4
naked-single ==> r5c3 = 11
naked-single ==> r1c3 = 7
naked-single ==> r1c5 = 4
naked-single ==> r1c9 = 11
naked-single ==> r7c2 = 7
naked-single ==> r2c7 = 4
naked-single ==> r2c11 = 11
naked-single ==> r4c13 = 4
naked-single ==> r11c6 = 12
naked-single ==> r11c4 = 11
naked-single ==> r4c10 = 8
naked-single ==> r5c11 = 4
naked-single ==> r6c12 = 7
naked-single ==> r3c9 = 12
naked-single ==> r3c7 = 7
naked-single ==> r3c13 = 11
naked-single ==> r3c2 = 4
naked-single ==> r8c10 = 11
naked-single ==> r10c8 = 12
naked-single ==> r9c7 = 8
naked-single ==> r9c8 = 11
naked-single ==> r11c10 = 7
naked-single ==> r13c2 = 12
naked-single ==> r8c8 = 7
naked-single ==> r8c5 = 8
naked-single ==> r12c13 = 7
naked-single ==> r5c5 = 12
naked-single ==> r4c5 = 11
naked-single ==> r4c9 = 7
naked-single ==> r6c6 = 11
naked-single ==> r6c7 = 12
naked-single ==> r6c9 = 4
naked-single ==> r11c12 = 4
naked-single ==> r12c11 = 8
naked-single ==> r7c8 = 8
naked-single ==> r9c6 = 7
naked-single ==> r12c4 = 12
naked-single ==> r7c12 = 11
naked-single ==> r9c13 = 12
naked-single ==> r2c5 = 7
naked-single ==> r5c1 = 7
naked-single ==> r4c3 = 12
naked-single ==> r12c1 = 4
naked-single ==> r8c6 = 4
naked-single ==> r5c12 = 8
naked-single ==> r10c2 = 8
naked-single ==> r13c8 = 4
naked-single ==> r10c10 = 4
naked-single ==> r12c2 = 11
PUZZLE 0 IS SOLVED. rating-type = W+S, MOST COMPLEX RULE TRIED = z-chain[3]
127849A6BCD53
53127849A6BCD
A483157DC926B
69C5BD12783A4
7ABDC65312489
8D962BCA43175
C7243A689D5B1
213A84975BCD6
3541978BDA62C
B8D7512C6493A
965BDC3127A48
4BAC62D531897
DC69A3B485712

init-time = 2.51s, solve-time = 22.9s, total-time = 25.41s
***********************************************************************************************
*** LatinRules 2.1.s based on CSP-Rules 2.1.s, config = W+S
*** Using CLIPS 6.32-r801
*** Running on MacBookPro Retina Mid-2012 i7 2.7GHz, 16GB 1600MHz DDR3, MacOS 10.15.7
*** Download from: https://github.com/denis-berthier/CSP-Rules-V2.1
***********************************************************************************************
Last edited by denis_berthier on Mon Jun 07, 2021 4:22 am, edited 3 times in total.
denis_berthier
2010 Supporter
 
Posts: 2678
Joined: 19 June 2007
Location: Paris

Re: Pandiagonal #1

Postby Mathimagics » Sat Jun 05, 2021 5:05 pm

Well done, Denis! 8-)

It will be interesting to see how many clues you can remove ...
Last edited by Mathimagics on Sun Jun 06, 2021 4:12 pm, edited 1 time in total.
User avatar
Mathimagics
2017 Supporter
 
Posts: 1812
Joined: 27 May 2015
Location: Canberra

Re: Pandiagonal #1

Postby Mathimagics » Sat Jun 05, 2021 6:55 pm

creint wrote:Given up reducing this 13 given grid after 10500 seconds, only 6 cells left to be checked for minimal. Probably minimal.

I've been busy working on my alternative method, so I hadn't noticed something that should be obvious!

You only needed to test one clue! You have 12 different cell values, and the only one appearing twice is the "9". So you really were the first to find a 13-clue puzzle, congratulations! 8-)

My idea for a quicker minimality test works a treat. Here is the result for your 13-clue puzzle:

Dodgy test results: Show
Code: Select all
 . . . . . 9 . . . C . . .
 . . . 2 . . . . . . . . .
 A . 8 . . 5 . . . 9 . . .
 . . . . . . . . . . . . .
 . . . . . . . . . . . . .
 . . . . . . . . . 3 . . .
 . . . 4 . . . . . . . . 1
 . . . . . . . . . . . D .
 . . . . . . . . . . . . .
 . . . . . . . . . . . . .
 . 6 . . . . . . . . . . .
 . . . . . . . . . . . . .
 . . . . . . . . . . 7 . .

Testing 1-clue removals
04:39:40   .  clue( 1, 6) = 9:  ns = 1 (R)
04:39:40   .  clue( 1,10) = C:  ns = 2
04:39:40   .  clue( 2, 4) = 2:  ns = 2
04:39:41   .  clue( 3, 1) = A:  ns = 2
04:39:41   .  clue( 3, 3) = 8:  ns = 2
04:39:42   .  clue( 3, 6) = 5:  ns = 2
04:39:43   .  clue( 3,10) = 9:  ns = 1 (R)
04:39:43   .  clue( 6,10) = 3:  ns = 2
04:39:43   .  clue( 7, 4) = 4:  ns = 2
04:39:43   .  clue( 7,13) = 1:  ns = 2
04:39:43   .  clue( 8,12) = D:  ns = 2
04:39:43   .  clue(11, 2) = 6:  ns = 2
04:39:43   .  clue(13,11) = 7:  ns = 2
04:39:43 <done>


[ EDIT ]
My results indicate, quite wrongly, that 2 clues were removable! Not so, of course ... the puzzle is in fact minimal, as the corrected version below shows.

This was a fault in my minimality-tester, and has now been fixed.

The Correct test results are:
Code: Select all
Testing clue removals from 13-c puzzle

17:26:42   .  clue( 1, 6) = 9:  ns = 2
17:26:42   .  clue( 1,10) = C:  ns = 2
17:26:42   .  clue( 2, 4) = 2:  ns = 2
17:26:42   .  clue( 3, 1) = A:  ns = 2
17:26:42   .  clue( 3, 3) = 8:  ns = 2
17:26:42   .  clue( 3, 6) = 5:  ns = 2
17:26:42   .  clue( 3,10) = 9:  ns = 2
17:26:42   .  clue( 6,10) = 3:  ns = 2
17:26:42   .  clue( 7, 4) = 4:  ns = 2
17:26:42   .  clue( 7,13) = 1:  ns = 2
17:26:42   .  clue( 8,12) = D:  ns = 2
17:26:42   .  clue(11, 2) = 6:  ns = 2
17:26:42   .  clue(13,11) = 7:  ns = 2


Ergo, either "9" can be removed for a 12-clue puzzle ... assuming the method is valid, of course :oops:
Last edited by Mathimagics on Mon Jun 07, 2021 7:37 am, edited 1 time in total.
User avatar
Mathimagics
2017 Supporter
 
Posts: 1812
Joined: 27 May 2015
Location: Canberra

Re: Pandiagonal #1

Postby denis_berthier » Sun Jun 06, 2021 4:26 am

Mathimagics wrote:Well done, Denis! 8-)


Thanks. It took me a few hours to introduce into LatinRules the additions necessary for the Pandiagonal variant. This gives me full access to the generic rules in CSP-Rules.
However, the Subset Rules remain restricted to the LatinSquares Subset rules, because, as I mentioned before, there are too many possible patterns.


Mathimagics wrote:It will be interesting to see how many clues you can remove ...

I'll try this, in order to find longer whips.


After working on this, I think this variant will never become a popular game, for two reasons:
- the grids it requires are too large: the smallest interesting ones are 13x13, which makes more than 2 times the number of cells in Sudoku;
- the diagonals are visually very unfriendly - unless one wants to play on a tyre or a rubber ring in his swimming pool; seems to be the right time to sell this idea before summer holidays ;)

On the other hand, two reasons I might be wrong are:
- the interplay between rows, columns and diagonals may be interesting;
- there's a potentially infinite variety of exotic fish patterns.
denis_berthier
2010 Supporter
 
Posts: 2678
Joined: 19 June 2007
Location: Paris

Re: Pandiagonal #1

Postby denis_berthier » Sun Jun 06, 2021 5:39 am

Here is a slightly more difficult variant, obtained by deleting first and last candidates. t-whips[3] and whips[3] appear, when only z-chains[3] were needed in the original puzzle.
Still relatively easy - W3 would be easy for Sudoku, but on a larger board, there are many more possible chains and complexity increases faster with the length of chains.

(solve "..........D.....2.........A.8..5...9..........2......A......1.............3......4........1..........CD.3...9..........D...........6.............A.6..............B......")
whip[1]: d9n13{r4c6 .} ==> r4c4 ≠ 13
whip[1]: c4n13{r12 .} ==> r12c10 ≠ 13
whip[1]: r3n13{c8 .} ==> r6c5 ≠ 13, r13c5 ≠ 13
Code: Select all
Resolution state after Singles and whips[1]:
1245679BC   1245789BC   134579BC    136789AB    457B        246789C     2345789AC   134678AC    2456789ABC  125678ABC   D           1234578BC   2345678ABC 
1456789BCD  134579BCD   1345679BC   2           3478        4789BC      146789ACD   45789ABC    35678ACD    145678ABC   134578AB    35678BC     3456789BCD 
A           12347BCD    8           367C        1347BCD     5           47C         167BCD      347BC       9           23467B      123467BC    267BC       
156789BC    134579BD    345679C     135679ABC   13478ABCD   146789ABCD  136789AD    2           4578ABC     4578ABC     1345678     1456789ABC  34578BCD   
4567BD      A           2345679BC   36789BCD    2457BCD     236789BCD   3456789C    3478B       1           245678BCD   245789B     234578C     23456789BCD
2456789C    124578BCD   12679BC     156789BCD   12578ABC    14679ABC    124578AC    45678ABCD   246789BD    3           1245789B    245789ABC   4567AD     
25678CD     23789BCD    2567BC      4           3578BC      2378ABC     23567ACD    356789BCD   56789ABCD   278BD       5789B       5679AB      1           
24789B      124578      1235679B    135678AB    123578B     234678B     123456789   145679AB    2345789B    145678AB    C           D           2456789AB   
3           2578BC      14567C      1578ABC     9           12678BC     1245678CD   14578BCD    24567ABCD   14567ABD    45678       124678AB    478BC       
5789BC      145789BC    D           35678AC     1234578BC   124678ABC   1235789C    13456789BC  345679AB    24567C      123456789AB 1346789ABC  246789AB   
14789B      6           2457BC      35789BC     124578ACD   1234789BCD  1234578ACD  13579B      2345789C    124578ABCD  123479AB    1245789ABC  35789ABCD   
14578BC     23478BD     A           15789BCD    6           123478CD    134579D     34578C      235789BC    12478BC     1245789B    123579BC    345789BC   
245678CD    1345789CD   124679      5789C       124578AC    3479A       B           13456789ACD 234678ACD   125678C     12356789    13456789AC  23457AC     

Hidden Text: Show
z-chain[2]: r3n13{c8 c2} - c6n13{r12 .} ==> r11c13 ≠ 13
z-chain[2]: c13n13{r6 r5} - d9n13{r5c5 .} ==> r4c2 ≠ 13
z-chain[2]: r8n10{c13 c10} - r9n10{c10 .} ==> r4c4 ≠ 10
t-whip[2]: a4n13{r7c10 r6c9} - a12n13{r6c4 .} ==> r7c7 ≠ 13
whip[1]: d13n13{r13c1 .} ==> r13c2 ≠ 13
z-chain[2]: a1n13{r9c9 r5c5} - r3n13{c5 .} ==> r9c8 ≠ 13
z-chain[2]: d13n13{r13c1 r12c2} - r3n13{c2 .} ==> r13c8 ≠ 13
whip[1]: r13n13{c9 .} ==> r4c5 ≠ 13, r5c1 ≠ 13
z-chain[2]: c8n13{r7 r6} - a2n13{r13c1 .} ==> r5c10 ≠ 13
z-chain[2]: d1n13{r6c9 r7c8} - c1n13{r13 .} ==> r2c9 ≠ 13
z-chain[2]: d10n13{r5c6 r4c7} - d13n13{r12c2 .} ==> r7c8 ≠ 13
whip[1]: c8n13{r6 .} ==> r3c5 ≠ 13
whip[1]: d1n13{r6c9 .} ==> r6c4 ≠ 13, r6c13 ≠ 13
whip[1]: d5n13{r12c7 .} ==> r9c7 ≠ 13
hidden-single-in-an-anti-diagonal ==> r2c13 = 13
whip[1]: d3n13{r11c6 .} ==> r11c10 ≠ 13, r7c2 ≠ 13
whip[1]: a9n13{r12c7 .} ==> r11c7 ≠ 13, r12c6 ≠ 13
whip[1]: a8n13{r11c5 .} ==> r7c9 ≠ 13
whip[1]: c7n13{r12 .} ==> r12c2 ≠ 13
whip[1]: r4n13{c7 .} ==> r5c6 ≠ 13
whip[2]: c11n10{r11 r10} - r9n10{c10 .} ==> r13c13 ≠ 10
whip[2]: c11n10{r11 r10} - a4n10{r9c12 .} ==> r11c7 ≠ 10
whip[3]: c11n10{r11 r2} - d10n10{r2c9 r11c13} - c10n10{r1 .} ==> r4c5 ≠ 10
z-chain[2]: a2n10{r11c12 r6c7} - c11n10{r2 .} ==> r11c10 ≠ 10
whip[3]: r7n10{c12 c7} - a2n10{r6c7 r11c12} - d2n10{r4c12 .} ==> r10c9 ≠ 10
whip[3]: a2n10{r11c12 r6c7} - d5n10{r9c10 r13c6} - r4n10{c6 .} ==> r9c12 ≠ 10
z-chain[2]: r9n10{c10 c9} - c11n10{r11 .} ==> r6c7 ≠ 10
z-chain[2]: a4n10{r10c13 r1c4} - c5n10{r13 .} ==> r11c13 ≠ 10
t-whip[2]: a4n10{r4c7 r10c13} - a2n10{r11c12 .} ==> r1c10 ≠ 10
whip[2]: d10n10{r6c5 r4c7} - d13n10{r7c7 .} ==> r6c13 ≠ 10
z-chain[2]: d5n10{r13c6 r7c12} - c7n10{r2 .} ==> r4c10 ≠ 10
whip[2]: a4n10{r10c13 r1c4} - a7n10{r6c12 .} ==> r4c6 ≠ 10
z-chain[2]: a3n10{r8c10 r10c12} - r11n10{c12 .} ==> r8c8 ≠ 10
z-chain[2]: a3n10{r10c12 r7c9} - c5n10{r11 .} ==> r6c12 ≠ 10
whip[1]: a7n10{r13c6 .} ==> r13c8 ≠ 10
z-chain[2]: a7n10{r2c8 r13c6} - r9n10{c10 .} ==> r1c9 ≠ 10
z-chain[2]: a9n10{r4c12 r9c4} - d5n10{r9c10 .} ==> r13c12 ≠ 10
z-chain[2]: r13n10{c9 c6} - r9n10{c10 .} ==> r4c9 ≠ 10
z-chain[2]: d12n10{r7c6 r9c4} - d11n10{r2c10 .} ==> r10c6 ≠ 10
z-chain[2]: a10n10{r8c4 r13c9} - r9n10{c9 .} ==> r2c10 ≠ 10
whip[1]: c10n10{r9 .} ==> r9c9 ≠ 10
biv-chain[2]: c10n10{r8 r9} - a9n10{r9c4 r4c12} ==> r10c12 ≠ 10, r7c9 ≠ 10
whip[1]: c9n10{r13 .} ==> r1c8 ≠ 10, r2c7 ≠ 10, r2c11 ≠ 10
whip[1]: c11n10{r11 .} ==> r11c12 ≠ 10
biv-chain[2]: a3n10{r8c10 r6c8} - d9n10{r2c8 r10c13} ==> r8c13 ≠ 10, r1c4 ≠ 10
whip[1]: r1n10{c13 .} ==> r7c7 ≠ 10
whip[1]: r7n10{c12 .} ==> r13c6 ≠ 10
whip[1]: c6n10{r7 .} ==> r6c5 ≠ 10
whip[1]: c13n10{r10 .} ==> r10c4 ≠ 10
biv-chain[3]: r4n10{c7 c12} - r9n10{c4 c10} - d5n13{r9c10 r12c7} ==> r4c7 ≠ 13
hidden-single-in-an-anti-diagonal ==> r7c10 = 13
hidden-single-in-an-anti-diagonal ==> r11c5 = 13
hidden-single-in-an-anti-diagonal ==> r9c9 = 13
hidden-single-in-an-anti-diagonal ==> r5c4 = 13
hidden-single-in-a-column ==> r6c2 = 13
hidden-single-in-an-anti-diagonal ==> r4c6 = 13
hidden-single-in-a-diagonal ==> r13c1 = 13
hidden-single-in-a-column ==> r3c8 = 13
hidden-single-in-an-anti-diagonal ==> r2c9 = 10
hidden-single-in-an-anti-diagonal ==> r1c7 = 10
hidden-single-in-an-anti-diagonal ==> r7c6 = 10
hidden-single-in-an-anti-diagonal ==> r11c11 = 10
hidden-single-in-a-diagonal ==> r8c4 = 10
hidden-single-in-an-anti-diagonal ==> r6c8 = 10
hidden-single-in-a-diagonal ==> r13c5 = 10
hidden-single-in-a-column ==> r9c10 = 10
hidden-single-in-a-column ==> r4c12 = 10
hidden-single-in-a-column ==> r10c13 = 10
hidden-single-in-a-row ==> r12c7 = 13
whip[1]: d5n1{r11c8 .} ==> r10c8 ≠ 1, r4c1 ≠ 1
whip[1]: r3n1{c12 .} ==> r13c2 ≠ 1
whip[2]: d5n1{r11c8 r4c2} - d9n1{r8c2 .} ==> r11c10 ≠ 1
z-chain[3]: d5n1{r4c2 r11c8} - c1n1{r11 r12} - a6n1{r12c4 .} ==> r2c2 ≠ 1
t-whip[3]: r3n1{c12 c2} - d5n1{r4c2 r11c8} - r8n1{c8 .} ==> r10c5 ≠ 1
t-whip[3]: r3n1{c12 c2} - d5n1{r4c2 r11c8} - c5n1{r8 .} ==> r10c12 ≠ 1
z-chain[2]: r10n1{c11 c7} - d5n1{r11c8 .} ==> r1c2 ≠ 1
whip[2]: r3n1{c12 c5} - a2n1{r10c11 .} ==> r11c7 ≠ 1
z-chain[3]: a10n1{r3c12 r10c6} - c1n1{r2 r11} - d5n1{r11c8 .} ==> r1c12 ≠ 1
whip[3]: d6n2{r11c9 r10c10} - a6n2{r5c10 r8c13} - a8n2{r7c1 .} ==> r11c6 ≠ 2
whip[3]: r7n2{c3 c7} - d3n2{r10c7 r6c11} - a7n2{r5c11 .} ==> r8c2 ≠ 2
whip[3]: a8n2{r12c6 r5c12} - d9n2{r11c12 r7c3} - r11n2{c3 .} ==> r12c9 ≠ 2
whip[3]: a8n2{r7c1 r12c6} - a4n2{r12c2 r6c9} - a6n2{r5c10 .} ==> r5c3 ≠ 2
whip[3]: d3n2{r10c7 r5c12} - c5n2{r5 r10} - a1n2{r1c1 .} ==> r6c7 ≠ 2
t-whip[3]: c5n2{r10 r5} - d12n2{r13c13 r1c12} - d6n2{r11c9 .} ==> r8c3 ≠ 2
t-whip[3]: c5n2{r10 r5} - d12n2{r13c13 r1c12} - c10n2{r12 .} ==> r8c7 ≠ 2
t-whip[3]: c1n2{r8 r1} - d12n2{r13c13 r8c5} - c13n2{r3 .} ==> r7c2 ≠ 2
whip[2]: d12n2{r13c13 r8c5} - d8n2{r8c1 .} ==> r13c11 ≠ 2
t-whip[2]: r7n2{c7 c3} - r13n2{c10 .} ==> r1c1 ≠ 2
z-chain[3]: c3n2{r13 r11} - a1n2{r7c7 r12c12} - d12n2{r1c12 .} ==> r13c10 ≠ 2
z-chain[2]: r13n2{c9 c13} - c7n2{r7 .} ==> r10c6 ≠ 2
whip[2]: r13n2{c9 c13} - c5n2{r5 .} ==> r6c9 ≠ 2
z-chain[2]: a4n2{r13c3 r9c12} - r7n2{c1 .} ==> r11c3 ≠ 2
whip[1]: c3n2{r13 .} ==> r13c9 ≠ 2
whip[1]: r13n2{c13 .} ==> r3c13 ≠ 2
whip[1]: c9n2{r11 .} ==> r11c12 ≠ 2
t-whip[2]: d12n2{r13c13 r8c5} - d8n2{r8c1 .} ==> r12c12 ≠ 2
z-chain[2]: r12n2{c10 c11} - c9n2{r1 .} ==> r8c6 ≠ 2
z-chain[2]: r12n2{c11 c10} - r11n2{c9 .} ==> r3c2 ≠ 2
whip[1]: r3n2{c12 .} ==> r10c5 ≠ 2
z-chain[2]: a13n2{r11c10 r12c11} - r3n2{c11 .} ==> r1c10 ≠ 2
z-chain[2]: a10n2{r11c7 r7c3} - a8n2{r7c1 .} ==> r6c12 ≠ 2
z-chain[2]: a7n2{r9c2 r8c1} - a8n2{r7c1 .} ==> r5c6 ≠ 2
z-chain[2]: a2n2{r8c9 r10c11} - d6n2{r10c10 .} ==> r1c9 ≠ 2
z-chain[2]: a9n2{r5c13 r6c1} - d10n2{r6c5 .} ==> r5c11 ≠ 2
biv-chain[2]: a7n2{r9c2 r8c1} - c9n2{r8 r11} ==> r9c7 ≠ 2
whip[1]: d2n2{r13c3 .} ==> r12c2 ≠ 2
biv-chain[2]: d2n2{r13c3 r1c2} - a7n2{r9c2 r8c1} ==> r6c3 ≠ 2
biv-chain[2]: d8n2{r12c10 r8c1} - c2n2{r9 r1} ==> r1c12 ≠ 2
whip[1]: d12n2{r13c13 .} ==> r8c13 ≠ 2, r5c5 ≠ 2
whip[1]: a12n2{r12c10 .} ==> r10c10 ≠ 2, r11c10 ≠ 2
whip[1]: r10n2{c11 .} ==> r6c11 ≠ 2, r8c9 ≠ 2
hidden-single-in-a-column ==> r11c9 = 2
hidden-single-in-an-anti-diagonal ==> r5c10 = 2
hidden-single-in-an-anti-diagonal ==> r7c3 = 2
hidden-single-in-an-anti-diagonal ==> r12c6 = 2
hidden-single-in-a-column ==> r8c1 = 2
hidden-single-in-an-anti-diagonal ==> r10c7 = 2
hidden-single-in-an-anti-diagonal ==> r1c2 = 2
hidden-single-in-an-anti-diagonal ==> r6c5 = 2
hidden-single-in-a-diagonal ==> r3c11 = 2
hidden-single-in-a-column ==> r13c13 = 2
hidden-single-in-a-diagonal ==> r9c12 = 2
z-chain[2]: c5n1{r4 r8} - d5n1{r11c8 .} ==> r4c4 ≠ 1
z-chain[2]: d7n1{r13c8 r3c5} - r4n1{c5 .} ==> r13c11 ≠ 1
z-chain[2]: d7n1{r10c11 r13c8} - d5n1{r11c8 .} ==> r4c5 ≠ 1
whip[1]: c5n1{r8 .} ==> r12c1 ≠ 1, r8c10 ≠ 1
biv-chain[2]: d5n1{r4c2 r11c8} - c5n1{r8 r3} ==> r3c2 ≠ 1
whip[1]: d4n1{r2c3 .} ==> r1c3 ≠ 1, r13c3 ≠ 1
hidden-single-in-an-anti-diagonal ==> r3c5 = 1
whip[1]: c12n1{r13 .} ==> r12c11 ≠ 1
whip[1]: r10n1{c6 .} ==> r6c6 ≠ 1, r12c4 ≠ 1
whip[1]: r12n1{c12 .} ==> r1c10 ≠ 1
whip[1]: a10n1{r10c6 .} ==> r2c1 ≠ 1
whip[1]: c1n1{r11 .} ==> r1c4 ≠ 1
hidden-single-in-a-diagonal ==> r2c3 = 1
hidden-single-in-an-anti-diagonal ==> r10c6 = 1
hidden-single-in-an-anti-diagonal ==> r6c11 = 1
hidden-single-in-a-column ==> r9c4 = 1
z-chain[2]: r3n3{c12 c4} - a7n3{r11c4 .} ==> r13c12 ≠ 3
t-whip[2]: a7n3{r13c6 r11c4} - r3n3{c12 .} ==> r10c9 ≠ 3
z-chain[2]: d5n3{r13c6 r11c8} - c6n3{r11 .} ==> r13c11 ≠ 3
z-chain[2]: c11n3{r10 r2} - d6n3{r12c8 .} ==> r4c5 ≠ 3
z-chain[2]: d8n3{r13c9 r1c8} - d5n3{r11c8 .} ==> r13c2 ≠ 3
z-chain[2]: r13n3{c8 c9} - a7n3{r3c9 .} ==> r11c6 ≠ 3
z-chain[2]: r13n3{c8 c9} - a7n3{r3c9 .} ==> r11c8 ≠ 3
whip[1]: d5n3{r13c6 .} ==> r8c6 ≠ 3
z-chain[2]: d5n3{r4c2 r13c6} - r11n3{c4 .} ==> r4c13 ≠ 3
z-chain[2]: a11n3{r12c9 r8c5} - r2n3{c11 .} ==> r12c2 ≠ 3
z-chain[2]: r11n3{c13 c4} - c6n3{r13 .} ==> r5c7 ≠ 3
z-chain[2]: d11n3{r12c13 r3c9} - c6n3{r13 .} ==> r7c8 ≠ 3
z-chain[2]: r11n3{c13 c4} - d5n3{r13c6 .} ==> r4c7 ≠ 3
z-chain[2]: r11n3{c13 c4} - c6n3{r13 .} ==> r5c13 ≠ 3
z-chain[2]: r5n3{c12 c6} - d5n3{r13c6 .} ==> r1c12 ≠ 3
whip[1]: d12n3{r8c5 .} ==> r2c5 ≠ 3
whip[1]: a4n3{r5c8 .} ==> r1c8 ≠ 3, r10c8 ≠ 3
biv-chain[2]: c6n3{r13 r5} - a4n3{r5c8 r1c4} ==> r11c4 ≠ 3
whip[1]: a7n3{r13c6 .} ==> r13c9 ≠ 3
whip[1]: c9n3{r12 .} ==> r12c13 ≠ 3
whip[1]: c13n3{r11 .} ==> r1c3 ≠ 3
whip[1]: r1n3{c13 .} ==> r3c2 ≠ 3, r10c4 ≠ 3
whip[1]: a8n3{r5c12 .} ==> r3c12 ≠ 3
whip[1]: r3n3{c9 .} ==> r8c9 ≠ 3
whip[1]: r8n3{c7 .} ==> r10c5 ≠ 3
whip[1]: d1n3{r8c7 .} ==> r4c3 ≠ 3
whip[1]: c3n3{r8 .} ==> r5c6 ≠ 3, r13c8 ≠ 3
hidden-single-in-a-row ==> r13c6 = 3
hidden-single-in-a-diagonal ==> r7c5 = 3
hidden-single-in-a-column ==> r8c3 = 3
hidden-single-in-an-anti-diagonal ==> r1c13 = 3
hidden-single-in-an-anti-diagonal ==> r5c8 = 3
hidden-single-in-an-anti-diagonal ==> r11c7 = 3
hidden-single-in-a-row ==> r2c2 = 3
hidden-single-in-a-column ==> r3c4 = 3
hidden-single-in-a-diagonal ==> r12c9 = 3
hidden-single-in-a-column ==> r4c11 = 3
hidden-single-in-a-row ==> r10c12 = 3
whip[1]: r3n6{c13 .} ==> r2c12 ≠ 6, r9c6 ≠ 6
whip[1]: r9n6{c11 .} ==> r5c7 ≠ 6
z-chain[2]: a7n9{r11c4 r5c11} - r12n9{c4 .} ==> r11c12 ≠ 9
z-chain[2]: d5n9{r10c9 r11c8} - d8n9{r6c3 .} ==> r10c2 ≠ 9
z-chain[2]: a2n6{r10c11 r5c6} - d13n6{r8c6 .} ==> r7c1 ≠ 6
z-chain[2]: r7n6{c9 c12} - r3n6{c12 .} ==> r8c8 ≠ 6
z-chain[2]: c4n6{r10 r4} - d13n6{r7c7 .} ==> r10c8 ≠ 6
z-chain[2]: c8n6{r7 r13} - a10n6{r13c9 .} ==> r1c1 ≠ 6
z-chain[2]: c8n6{r13 r7} - c12n6{r7 .} ==> r13c9 ≠ 6
z-chain[2]: r3n6{c12 c13} - d9n6{r13c10 .} ==> r6c9 ≠ 6
z-chain[2]: a4n6{r4c7 r13c3} - r3n6{c13 .} ==> r1c10 ≠ 6
whip[1]: a10n6{r5c1 .} ==> r7c12 ≠ 6
whip[1]: c12n6{r13 .} ==> r8c7 ≠ 6
z-chain[2]: a10n6{r5c1 r3c12} - a2n6{r7c8 .} ==> r5c3 ≠ 6
z-chain[2]: c3n6{r13 r6} - r2n6{c7 .} ==> r13c12 ≠ 6
hidden-single-in-a-column ==> r3c12 = 6
whip[1]: c1n6{r6 .} ==> r4c3 ≠ 6
whip[1]: r4n6{c7 .} ==> r1c4 ≠ 6
whip[1]: a4n6{r13c3 .} ==> r9c7 ≠ 6, r13c11 ≠ 6
whip[1]: c11n6{r10 .} ==> r10c10 ≠ 6
whip[1]: a12n6{r8c6 .} ==> r6c6 ≠ 6, r10c4 ≠ 6
whip[1]: a8n6{r9c3 .} ==> r6c3 ≠ 6
whip[1]: a11n6{r13c10 .} ==> r8c10 ≠ 6
whip[1]: r8n6{c13 .} ==> r1c6 ≠ 6
whip[1]: r1n6{c9 .} ==> r13c8 ≠ 6
hidden-single-in-a-column ==> r1c8 = 6
hidden-single-in-an-anti-diagonal ==> r8c2 = 1
hidden-single-in-an-anti-diagonal ==> r12c10 = 1
hidden-single-in-an-anti-diagonal ==> r1c1 = 1
hidden-single-in-an-anti-diagonal ==> r4c7 = 1
hidden-single-in-an-anti-diagonal ==> r13c3 = 6
hidden-single-in-an-anti-diagonal ==> r10c9 = 6
hidden-single-in-an-anti-diagonal ==> r5c6 = 6
hidden-single-in-a-diagonal ==> r4c1 = 6
hidden-single-in-an-anti-diagonal ==> r7c7 = 6
hidden-single-in-a-diagonal ==> r8c13 = 6
hidden-single-in-a-column ==> r6c4 = 6
hidden-single-in-an-anti-diagonal ==> r2c10 = 6
hidden-single-in-a-diagonal ==> r9c11 = 6
hidden-single-in-a-diagonal ==> r13c12 = 1
hidden-single-in-a-row ==> r11c8 = 1
hidden-single-in-an-anti-diagonal ==> r6c3 = 9
hidden-single-in-a-diagonal ==> r1c6 = 9
hidden-single-in-an-anti-diagonal ==> r11c1 = 9
hidden-single-in-a-row ==> r2c8 = 9
hidden-single-in-a-diagonal ==> r7c9 = 9
hidden-single-in-an-anti-diagonal ==> r13c4 = 9
hidden-single-in-an-anti-diagonal ==> r12c12 = 9
hidden-single-in-a-diagonal ==> r10c11 = 9
hidden-single-in-a-row ==> r4c2 = 9
hidden-single-in-a-diagonal ==> r5c13 = 9
hidden-single-in-a-row ==> r8c7 = 9
whip[1]: c11n4{r12 .} ==> r2c1 ≠ 4
whip[1]: c1n4{r12 .} ==> r12c8 ≠ 4
whip[1]: r7n12{c8 .} ==> r13c8 ≠ 12
whip[1]: r6n11{c12 .} ==> r3c9 ≠ 11
whip[1]: r3n11{c13 .} ==> r2c1 ≠ 11
z-chain[2]: r3n4{c9 c2} - d1n4{r13c2 .} ==> r1c9 ≠ 4
z-chain[2]: r1n4{c12 c5} - a8n4{r6c13 .} ==> r5c3 ≠ 4
whip[1]: d7n4{r13c8 .} ==> r11c6 ≠ 4
z-chain[2]: a9n4{r10c5 r13c8} - d1n4{r13c2 .} ==> r2c5 ≠ 4
whip[1]: a4n4{r12c2 .} ==> r13c2 ≠ 4
whip[1]: d1n4{r10c5 .} ==> r6c1 ≠ 4
whip[1]: c1n4{r12 .} ==> r2c11 ≠ 4, r5c7 ≠ 4
whip[1]: c11n4{r12 .} ==> r5c5 ≠ 4
whip[1]: r2n4{c7 .} ==> r3c7 ≠ 4, r9c13 ≠ 4
whip[1]: d8n4{r13c9 .} ==> r4c9 ≠ 4
whip[1]: r3n4{c9 .} ==> r6c12 ≠ 4, r10c2 ≠ 4
whip[1]: c2n4{r12 .} ==> r12c11 ≠ 4
hidden-single-in-a-diagonal ==> r11c12 = 4
hidden-single-in-a-diagonal ==> r12c1 = 4
hidden-single-in-a-row ==> r1c5 = 4
hidden-single-in-a-diagonal ==> r13c8 = 4
hidden-single-in-a-row ==> r8c6 = 4
hidden-single-in-a-column ==> r10c10 = 4
hidden-single-in-an-anti-diagonal ==> r3c2 = 4
hidden-single-in-a-row ==> r3c13 = 11
hidden-single-in-an-anti-diagonal ==> r5c11 = 4
hidden-single-in-a-diagonal ==> r9c3 = 4
hidden-single-in-a-column ==> r6c9 = 4
hidden-single-in-a-row ==> r4c13 = 4
hidden-single-in-a-column ==> r2c7 = 4
whip[1]: r2n11{c11 .} ==> r7c11 ≠ 11
whip[1]: r3n7{c9 .} ==> r1c9 ≠ 7, r5c7 ≠ 7
whip[1]: r3n12{c9 .} ==> r1c9 ≠ 12, r5c7 ≠ 12
whip[1]: r8n11{c10 .} ==> r1c3 ≠ 11
hidden-single-in-an-anti-diagonal ==> r8c10 = 11
hidden-single-in-an-anti-diagonal ==> r12c2 = 11
hidden-single-in-a-diagonal ==> r4c5 = 11
hidden-single-in-an-anti-diagonal ==> r6c6 = 11
hidden-single-in-an-anti-diagonal ==> r10c1 = 11
hidden-single-in-an-anti-diagonal ==> r2c11 = 11
hidden-single-in-an-anti-diagonal ==> r5c3 = 11
hidden-single-in-a-column ==> r7c12 = 11
hidden-single-in-a-row ==> r1c9 = 11
hidden-single-in-an-anti-diagonal ==> r7c11 = 5
hidden-single-in-a-diagonal ==> r9c8 = 11
hidden-single-in-a-row ==> r11c4 = 11
whip[1]: d1n5{r13c2 .} ==> r10c2 ≠ 5
whip[1]: c2n5{r13 .} ==> r11c13 ≠ 5
whip[1]: c13n5{r12 .} ==> r6c7 ≠ 5
whip[1]: r6n5{c13 .} ==> r5c1 ≠ 5
naked-single ==> r5c1 = 7
naked-single ==> r6c13 = 5
hidden-single-in-an-anti-diagonal ==> r10c5 = 5
naked-single ==> r5c5 = 12
naked-single ==> r3c7 = 7
naked-single ==> r3c9 = 12
naked-single ==> r13c9 = 8
naked-single ==> r9c13 = 12
naked-single ==> r2c6 = 8
naked-single ==> r2c5 = 7
naked-single ==> r1c4 = 8
naked-single ==> r6c12 = 7
naked-single ==> r10c8 = 12
naked-single ==> r1c12 = 5
naked-single ==> r1c10 = 12
naked-single ==> r1c3 = 7
naked-single ==> r8c9 = 5
naked-single ==> r8c8 = 7
naked-single ==> r4c4 = 5
naked-single ==> r4c3 = 12
naked-single ==> r2c1 = 5
naked-single ==> r6c1 = 8
naked-single ==> r6c7 = 12
naked-single ==> r11c3 = 5
naked-single ==> r4c10 = 8
naked-single ==> r9c2 = 5
naked-single ==> r11c10 = 7
naked-single ==> r12c4 = 12
naked-single ==> r7c8 = 8
naked-single ==> r12c13 = 7
naked-single ==> r10c2 = 8
naked-single ==> r5c7 = 5
naked-single ==> r11c6 = 12
naked-single ==> r11c13 = 8
naked-single ==> r13c2 = 12
naked-single ==> r2c12 = 12
naked-single ==> r4c9 = 7
naked-single ==> r9c7 = 8
naked-single ==> r10c4 = 7
naked-single ==> r12c8 = 5
naked-single ==> r8c5 = 8
naked-single ==> r7c1 = 12
naked-single ==> r9c6 = 7
naked-single ==> r7c2 = 7
naked-single ==> r13c10 = 5
naked-single ==> r13c11 = 7
naked-single ==> r12c11 = 8
naked-single ==> r5c12 = 8
PUZZLE 0 IS SOLVED. rating-type = W+S, MOST COMPLEX RULE TRIED = W[3]
127849A6BCD53
53127849A6BCD
A483157DC926B
69C5BD12783A4
7ABDC65312489
8D962BCA43175
C7243A689D5B1
213A84975BCD6
3541978BDA62C
B8D7512C6493A
965BDC3127A48
4BAC62D531897
DC69A3B485712

init-time = 2.49s, solve-time = 1m 10.75s, total-time = 1m 13.24s
***********************************************************************************************
*** LatinRules 2.1.s based on CSP-Rules 2.1.s, config = W+S
*** Using CLIPS 6.32-r801
*** Running on MacBookPro Retina Mid-2012 i7 2.7GHz, 16GB 1600MHz DDR3, MacOS 10.15.7
*** Download from: https://github.com/denis-berthier/CSP-Rules-V2.1
***********************************************************************************************
Last edited by denis_berthier on Mon Jun 07, 2021 4:23 am, edited 4 times in total.
denis_berthier
2010 Supporter
 
Posts: 2678
Joined: 19 June 2007
Location: Paris

Re: Pandiagonal #1

Postby Mathimagics » Sun Jun 06, 2021 7:27 am

denis_berthier wrote:After working on this, I think this variant will never become a popular game, for two reasons:
- the grids it requires are too large: the smallest interesting ones are 13x13, which makes more than 2 times the number of cells in Sudoku;
- the diagonals are visually very unfriendly

I don't think the grid size is an issue so much as the diagonals. Sudoku 16x16 and 25x25, while not wildly popular, do have their fans. I used to enjoy doing the Sudoku 25x25's produced by Gareth Moore, in the "SudokuXtra" magazine (now defunct). These are always singles-only puzzles, so would have very low software rating, but the human degree of difficulty is much higher because of the grid size.

As for the diagonals, a simple cell-corner labelling system (like the cage sums in Killer Sudoku) can probably mitigate this problem ... I intend to try this out sometime, but for the moment I am preoccupied with the mathematical properties of these intriguing combinatorial objects.

But I will concede, however, that iOS/Android developers will not be rushing into production any time in the foreseeable future :lol:
User avatar
Mathimagics
2017 Supporter
 
Posts: 1812
Joined: 27 May 2015
Location: Canberra

Re: Pandiagonal #1

Postby denis_berthier » Sun Jun 06, 2021 10:02 am

Mathimagics wrote:
denis_berthier wrote:After working on this, I think this variant will never become a popular game, for two reasons:
- the grids it requires are too large: the smallest interesting ones are 13x13, which makes more than 2 times the number of cells in Sudoku;
- the diagonals are visually very unfriendly

I don't think the grid size is an issue so much as the diagonals. Sudoku 16x16 and 25x25, while not wildly popular, do have their fans. I used to enjoy doing the Sudoku 25x25's produced by Gareth Moore, in the "SudokuXtra" magazine (now defunct). These are always singles-only puzzles, so would have very low software rating, but the human degree of difficulty is much higher because of the grid size.

What I meant about grid size is strongly related to the branching factor - the number of links from each candidate. When you consider only Singles, what counts is roughly the number of cells. But when you consider chains what counts is the number of candidates and the branching factor.
It's easy to see that in Sudoku(N) this factor is 3N-1+2sqr(N), but in PDLS(N) it is 4(N-1), which gives:
Sudoku(9): 22
Sudoku(16): 41
Sudoku(25): 66
PDLS(13): 51 (which puts it between Sudoku(16) and Sudoku(25))
PDLS(15):59
Moreover, this branching factor has to be applied twice between chain length p and p+1, which means a potential increase of complexity for each new chain length (for fixed target):
in Sudoku(9): 484
in Sudoku(16): 1681
in Sudoku(25): 4356
in PDLS(13): 2601
in PDLS(15): 3481
Of course, others factors modify these figures in practice, but this gives a rough idea. Moreover, this has to be multiplied by the number of candidates.
denis_berthier
2010 Supporter
 
Posts: 2678
Joined: 19 June 2007
Location: Paris

Re: Pandiagonal #1

Postby Mathimagics » Sun Jun 06, 2021 11:59 am

denis_berthier wrote:What I meant about grid size is strongly related to the branching factor - the number of links from each candidate.

Indeed.

We also call this the "visible cells" count ... aka "affected cells" ...

BTW, for Sudoku(N), if N = n^2, then the count is 2(N-1) + (n-1)^2, I think. That's 20 for N=9, and 39 for N=16.

For PDLS 4(N-1) is correct, but this gives 48 for N=13, 64 for N = 17 (there are no PDLS(15) squares) ...
User avatar
Mathimagics
2017 Supporter
 
Posts: 1812
Joined: 27 May 2015
Location: Canberra

Re: Pandiagonal #1

Postby denis_berthier » Sun Jun 06, 2021 1:43 pm

Mathimagics wrote:
denis_berthier wrote:What I meant about grid size is strongly related to the branching factor - the number of links from each candidate.

BTW, for Sudoku(N), if N = n^2, then the count is 2(N-1) + (n-1)^2, I think.


Same formula.
denis_berthier
2010 Supporter
 
Posts: 2678
Joined: 19 June 2007
Location: Paris

Re: Pandiagonal #1

Postby creint » Sun Jun 06, 2021 9:27 pm

denis_berthier your format from:
Here is a slightly more difficult variant, obtained by deleting first and last candidates. t-whips[3] and whips[3] appear, when only z-chains[3] were needed in the original puzzle.
Still relatively easy - W3 would be easy for Sudoku, but on a larger board, there are many more possible chains and complexity increases faster with the length of chains.

Problem 1 missing target digit:
Code: Select all
t-whip[2]: a4{r7c10 r6c9} - a12n13{r6c4 .} ==> r7c7 ≠ 13
a4{r7c10 r6c9}

You target cells but no pencil marks, should the pencil mark from exclusion be used because it is a single digit chain? In other parts you give the pencil mark why not here?

Problem 2 range notation:
I have seen formats where you use no separator like:
Code: Select all
g-whip[11]: b4n3{r6c2 r456c1} - r2n3{c1 c3} - r7n3{c3 c5} - c6n3{r9 r6} - r6n6{c6 c4} - b5n2{r6c4 r4c4} - b5n9{r4c4 r5c456} - c3n9{r5 r3} - c7n9{r3 r2} - c7n6{r2 r7} - c2n6{r7 .} ==> r9c2 ≠ 3
b4n3{r6c2 r456c1}
How to be sure it is r13 and not r1 and r3? (Parsing issue)

Problem 3 missing used constraints
Code: Select all
whip[1]: c4n13{r12 .} ==> r12c10 ≠ 13

Here it says D locked in column 4, but it uses row+diagonal+anti-diagonal. If you are not mentioning all the constraints then it is not much different from just saying 13c4 -> -13r12c10. You still need to look for constraints to verify it is correct. (Future link-line drawing issue)
creint
 
Posts: 322
Joined: 20 January 2018

Re: Pandiagonal #1

Postby denis_berthier » Mon Jun 07, 2021 2:50 am

creint wrote:Problem 1 missing target digit:
Code: Select all
t-whip[2]: a4{r7c10 r6c9} - a12n13{r6c4 .} ==> r7c7 ≠ 13
a4{r7c10 r6c9}

Right. Thanks for noticing. I had forgotten this in the output function of anti-diagonal CSP-Variables (but it was there for the diagonals). It's now corrected.

I hadn't put the resolution state after whips[1] because you need a large screen to see it properly. I've added it. Tell me how it looks like. I haven't yet a pretty-print function that would make it more compact.

creint wrote:Problem 2 range notation:
I have seen formats where you use no separator like:
Code: Select all
g-whip[11]: b4n3{r6c2 r456c1} - r2n3{c1 c3} - r7n3{c3 c5} - c6n3{r9 r6} - r6n6{c6 c4} - b5n2{r6c4 r4c4} - b5n9{r4c4 r5c456} - c3n9{r5 r3} - c7n9{r3 r2} - c7n6{r2 r7} - c2n6{r7 .} ==> r9c2 ≠ 3
b4n3{r6c2 r456c1}
How to be sure it is r13 and not r1 and r3? (Parsing issue)

As of now, I haven't yet coded g-labels for Pandiags and there is no ambiguity.
Of course, the right thing to do is to print the solution with the original symbols 12...9AB..., as I do in the resolution state. This should be easy to do.
I don't know yet if I'll spend more time on this game and if I'll code g-labels. A big problem with this game is the branching factor. Not as bad as in Slitherlink, but quite bad. Using g-whips may very fast lead to combinatorial explosion.

creint wrote:Problem 3 missing used constraints
Code: Select all
whip[1]: c4n13{r12 .} ==> r12c10 ≠ 13

Here it says D locked in column 4, but it uses row+diagonal+anti-diagonal. If you are not mentioning all the constraints then it is not much different from just saying 13c4 -> -13r12c10. You still need to look for constraints to verify it is correct. (Future link-line drawing issue)

This notation says all that is needed. z- and t- candidates are never written in my chains and this will not change. The CSP-Variable is c4n13, the target is n13r12c10, the llc is n13r12c4. The mention whip[1] at the start says that any other candidate is linked to the target by some link.
Maybe your problem is about the various types of links one needs to check (row+diagonal+anti-diagonal). But it is not a problem with my notation. It's a problem with this game. As I said before, diagonal constraints are very unfriendly to the player.
denis_berthier
2010 Supporter
 
Posts: 2678
Joined: 19 June 2007
Location: Paris

PreviousNext

Return to Sudoku variants