Oddities of Sudoku Explainer

Programs which generate, solve, and analyze Sudoku puzzles

Re:

Postby champagne » Fri Jul 08, 2011 11:56 am

ronk wrote:
champagne wrote:rating base 6.5 apply to x loop, y loop
rating base 6.6 apply to x chain y chain

Really! Please post one xy-chain ("y-chain") that Explainer finds with rating 6.6, 6.7, 6.8, 6.9 or 7.0.


Patrice has the appropriate tool to answer that question, I'll ask him to do the search as soon as he is back from holidays.


champagne
champagne
2017 Supporter
 
Posts: 7455
Joined: 02 August 2007
Location: France Brittany

Re: Oddities of Sudoku Explainer

Postby champagne » Mon Jul 11, 2011 1:39 pm

Patrice could answer before departure.

The code to find "Y chains" is there, but it seems that Nicolas Juillerat thought they could not exist.

As a matter of fact, the search is excluded in that sequence

Code: Select all
    private void doUnaryChaining(Grid grid, final Potential pOn, List<ChainingHint> result,
            boolean isYChainEnabled, boolean isXChainEnabled) {

        if (pOn.cell.getPotentialValues().cardinality() > 2
                && !isXChainEnabled)
            return; // Y-Cycles can only start if cell has 2 potential values

        final List<Potential> cycles = new ArrayList<Potential>();
        final List<Potential> chains = new ArrayList<Potential>();
        LinkedSet<Potential> onToOn = new LinkedSet<Potential>();
        LinkedSet<Potential> onToOff = new LinkedSet<Potential>();
        onToOn.add(pOn);
        doCycles(grid, onToOn, onToOff, isYChainEnabled, isXChainEnabled, cycles, pOn);
        if (isXChainEnabled) {
            // Forcing Y-Chains do not exist (length must be both odd and even)

            // Forcing chain with "off" implication
            onToOn = new LinkedSet<Potential>();
            onToOff = new LinkedSet<Potential>();
            onToOn.add(pOn);
            doForcingChains(grid, onToOn, onToOff, isYChainEnabled, chains, pOn);


champagne
champagne
2017 Supporter
 
Posts: 7455
Joined: 02 August 2007
Location: France Brittany

Re: Oddities of Sudoku Explainer

Postby ronk » Wed Jul 13, 2011 3:48 pm

champagne wrote:The code to find "Y chains" is there, but it seems that Nicolas Juillerat thought they could not exist.

As a matter of fact, the search is excluded in that sequence

So you made a categorical statement which was incorrect. I hate it when that happens. :)
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Oddities of Sudoku Explainer

Postby champagne » Wed Jul 13, 2011 4:16 pm

ronk wrote:
champagne wrote:The code to find "Y chains" is there, but it seems that Nicolas Juillerat thought they could not exist.

As a matter of fact, the search is excluded in that sequence

So you made a categorical statement which was incorrect. I hate it when that happens. :)


just remenber

ronk wrote:
champagne wrote:My point is that SE normally rates the hidden locked set defined, using uniqueness ...

Normally? I don't believe SE even looks for a hidden set with a UR.



As you see, nobody is perfect :D

BTW, the code exist, it's just never called because Nicolas Juillerat thought it was not possible.

It's not by far the only inconsistent rule in SE. For example SE looks for all eliminations due to an "Y cycle", but limits the search to a region for a "X cycle"

champagne
champagne
2017 Supporter
 
Posts: 7455
Joined: 02 August 2007
Location: France Brittany

Re: Oddities of Sudoku Explainer

Postby ronk » Wed Jul 13, 2011 4:25 pm

champagne wrote:
ronk wrote:So you made a categorical statement which was incorrect. I hate it when that happens. :)

just remenber
ronk wrote:
champagne wrote:My point is that SE normally rates the hidden locked set defined, using uniqueness ...

Normally? I don't believe SE even looks for a hidden set with a UR.

As you see, nobody is perfect :D

Ah yes, but the word "believe" makes my statement non-categorical. ;)
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Oddities of Sudoku Explainer

Postby champagne » Fri Aug 05, 2011 2:25 pm

One more serate move difficult to explain
In the game 147, I found using skfr plenty of diamonds 7.7.
No one came when I re rated them using SE.

Here is an example

9.....8..
.7..8....
..6..7..5
.....49..
.3..7..5.
..21....6
5..2.....
....3..8.
..1..6..9

Code: Select all
9     1245 345   |3456  12456 1235  |8      123467 12347
1234  7    345   |34569 8     12359 |12346  123469 1234 
12348 1248 6     |349   1249  7     |1234   12349  5     
--------------------------------------------------------
1678  1568 578   |3568  256   4     |9      1237   12378
1468  3    489   |689   7     289   |124    5      1248 
478   4589 2     |1     59    3589  |347    347    6     
--------------------------------------------------------
5     4689 34789 |2     149   189   |13467  13467  1347 
2467  2469 479   |4579  3     159   |124567 8      1247 
23478 248  1     |4578  45    6     |23457  2347   9     


SUDOKU EXPLAiNER first move

Nishio 7.8

If r4c4 = 8, then r5c3 must contain the value 8
If r4c4 = 8, then r5c3 <> 8


Chain 1:
(1) If r4c4 = 8, then r6c6 <> 8
(2) If r4c4 = 8 (initial assumption), then r5c6 <> 8
(3) If r5c6 <> 8 and r6c6 <> 8 (1), then r7c6 = 8
(4) If r7c6 = 8, then r7c3 <> 8
(5) If r4c4 = 8 (initial assumption), then r4c3 <> 8
(6) If r4c3 <> 8 and r7c3 <> 8 (4), then r5c3 = 8

Chain 2:
(1) If r4c4 = 8, then r4c9 <> 8
(2) If r4c9 <> 8, then r5c9 = 8
(3) If r5c9 = 8, then r5c3 <> 8

skfr equivalent move


1) r4c4 = 8 -> r4c9 <> 8
2) r4c9 <> 8 -> r5c9 = 8
3) r5c9 = 8 -> r5c3 <> 8
4) r4c4 = 8 -> r4c9 <> 8
5) r4c9 <> 8 -> r7c6 = 8
6) r7c6 = 8 -> r7c3 <> 8
7) r7c3 <> 8 and r5c3 <> 8 -> r4c3=8

1) r4c4 = 8 -> r4c3 <> 8




The first one has a length 6+3=9 rated 7.8
The second one has a length 7+1=8 rated 7.7


champagne
champagne
2017 Supporter
 
Posts: 7455
Joined: 02 August 2007
Location: France Brittany

Re: Oddities of Sudoku Explainer

Postby daj95376 » Fri Aug 05, 2011 4:28 pm

champagne wrote:skfr equivalent move

1) r4c4 = 8 -> r4c9 <> 8
2) r4c9 <> 8 -> r5c9 = 8
3) r5c9 = 8 -> r5c3 <> 8

4) r4c4 = 8 -> r9c4<> 8
5)r9c4<> 8 -> r7c6 = 8
6) r7c6 = 8 -> r7c3 <> 8

7) r7c3 <> 8 and r5c3 <> 8 -> r4c3=8

1) r4c4 = 8 -> r4c3 <> 8


And what's the rating on: (8)r6c6 = r6c12 - r45c3 = (8)r7c3 => r7c6<>8

followed by basics and: (5=4)r2c3 - (4=1)r3c2 - (1=2)r3c5 - (2=5)r4c5 => r4c3<>5
daj95376
2014 Supporter
 
Posts: 2624
Joined: 15 May 2006

Re: Oddities of Sudoku Explainer

Postby ronk » Fri Aug 05, 2011 4:50 pm

champagne wrote:One more serate move difficult to explain
In the game 147, I found using skfr plenty of diamonds 7.7.
No one came when I re rated them using SE.

Here is an example
...
The first one has a length 6+3=9 rated 7.8
The second one has a length 7+1=8 rated 7.7

Explainer's Nishio algorithm finds a finned column\row swordfish: (8)c369\r457 + fin r6c6.
Your skfr is finding a finned franken swordfish c39b8\r457 + fin r9c4

I've forgotten what little I've ever known about Nishio. Are you certain the Nishio definition allows detection of franken fish?
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Oddities of Sudoku Explainer

Postby champagne » Fri Aug 05, 2011 4:53 pm

daj95376 wrote:
champagne wrote:skfr equivalent move

1) r4c4 = 8 -> r4c9 <> 8
2) r4c9 <> 8 -> r5c9 = 8
3) r5c9 = 8 -> r5c3 <> 8

4) r4c4 = 8 -> r9c4<> 8
5)r9c4<> 8 -> r7c6 = 8
6) r7c6 = 8 -> r7c3 <> 8

7) r7c3 <> 8 and r5c3 <> 8 -> r4c3=8

1) r4c4 = 8 -> r4c3 <> 8


And what's the rating on: (8)r6c6 = r6c12 - r45c3 = (8)r7c3 => r7c6<>8

followed by basics and: (5=4)r2c3 - (4=1)r3c2 - (1=2)r3c5 - (2=5)r4c5 => r4c3<>5


for sure, using groups, we have a very simple chain.

SE does not recognize groups, so it will never generate such a chain and has no rating for it.

skfr tries to clone SE in a much faster mode. Here the logic should be to find the shortest "Nishio" chain showing a contradiction.

rating= 7.5 plus total length adjustment.

The bug here is that SE miss the shortest length;

As the next step in SE has a base rating of 8.0 (multi chain), the rating here will be based on a Nishio elimination.

champagne
champagne
2017 Supporter
 
Posts: 7455
Joined: 02 August 2007
Location: France Brittany

Re: Oddities of Sudoku Explainer

Postby champagne » Fri Aug 05, 2011 5:01 pm

ronk wrote:Explainer's Nishio algorithm finds a finned column\row swordfish: (8)c369\r457 + fin r6c6.
Your skfr is finding a finned franken swordfish c39b8\r457 + fin r9c4

I've forgotten what little I've ever known about Nishio. Are you certain the Nishio definition allows detection of franken fish?



SE "Nishio" processing is a dynamic mode using "digit strong links" and "region sets"

The main difference here is that SE uses 2 region sets and skfr only one.

We can also see that the first chain is shorter in SE. This could be the source of the bug.

champagne
champagne
2017 Supporter
 
Posts: 7455
Joined: 02 August 2007
Location: France Brittany

Re: Oddities of Sudoku Explainer

Postby ronk » Fri Aug 05, 2011 6:07 pm

champagne wrote:SE "Nishio" processing is a dynamic mode using "digit strong links" and "region sets"

Yes, it wouldn't make sense for box regions ("boxes") to be excluded from the definition.

Would you please post two other puzzles for which skfr gets a 7.7 rating. I don't need details for Explainer, just for the 'pattern' that skfr finds. If they are from the same Patterns Game, hopefully the regions won't also be the same. TIA
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Oddities of Sudoku Explainer

Postby champagne » Fri Aug 05, 2011 7:38 pm

ronk wrote:
champagne wrote:SE "Nishio" processing is a dynamic mode using "digit strong links" and "region sets"

Yes, it wouldn't make sense for box regions ("boxes") to be excluded from the definition.

Would you please post two other puzzles for which skfr gets a 7.7 rating. I don't need details for Explainer, just for the 'pattern' that skfr finds. If they are from the same Patterns Game, hopefully the regions won't also be the same. TIA


I'll look for other examples to morrow.

As I said, I have plenty of them in the game 147, but I think I have some as well in game 146.

It could be that most of them have similar paths (at least in the game 147). I'll try to extract different patterns

champagne
champagne
2017 Supporter
 
Posts: 7455
Joined: 02 August 2007
Location: France Brittany

Re: Oddities of Sudoku Explainer

Postby ronk » Sat Aug 06, 2011 4:12 am

champagne, does your skfr get a 7.7 rating for any of these?

Hidden Text: Show
File game0020.dat:
100200300000040010005006002700000400010030070008000009800900200050070000004005008 # 95 7.8/7.8/7.8 - TTHsieh
File game0025.dat:
001002300020000010700400005008500009000000000400008100200003004080000060005600900 # 29 7.8/7.8/7.8 - gsf
File game0031.dat:
010020300450000000003000005000600400700080020000001006600100090000090700005003000 # 35 7.8/7.8/7.8 - TTHsieh
File game0034.dat:
000005900010040080300900000200030800030406070006080009000004005060070010004200000 # 4 7.8/7.8/7.8 - m_b_metcalf
File game0037.dat:
010000002304000000050060800000900007006050090000007300009003200000040050200700004 # 92 7.8/7.8/7.8 - gsf
File game0038.dat:
001203400020000050600010002400701006009000700200309004900030007050000040003804200 # 6 7.8/7.8/7.8 - gsf
File game0039.dat:
090400050600050008000002000300070800050603010001080006000700000900010002030009040 # 39 7.8/7.8/7.8 - gsf
File game0040.dat:
100002003020010040003400000005000006010070080800000900000007800070080020500600004 # 69 7.8/7.8/7.8 - gsf
File game0046.dat:
001200000020003400500000030600500010000020000070000008040000003008600050000008704 # 30 7.8/7.8/7.8 - TTHsieh
File game0047.dat:
003001006050000030800040500000602007006000200100904000005090003090000070200800400 # 5 7.8/7.8/7.8 - m_b_metcalf
File game0048.dat:
000001200030040050607800100500000400070000060004000005003006801090080040002300000 # 22 7.8/7.8/7.8 - gsf

Admittedly 12 puzzles (including your example above) is not a large sample, but I have yet to see a puzzle where Explainer uses a strong link in a box for the 7.8 rating. This may not be coincidence.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Oddities of Sudoku Explainer

Postby champagne » Sat Aug 06, 2011 6:35 am

ronk wrote:champagne, does your skfr get a 7.7 rating for any of these?

Admittedly 12 puzzles (including your example above) is not a large sample, but I have yet to see a puzzle where Explainer uses a strong link in a box for the 7.8 rating. This may not be coincidence.


here is the rating of skfr for that lot

100200300000040010005006002700000400010030070008000009800900200050070000004005008 ED=7.7/7.7/7.7
001002300020000010700400005008500009000000000400008100200003004080000060005600900 ED=7.8/7.8/7.8
010020300450000000003000005000600400700080020000001006600100090000090700005003000 ED=7.7/7.7/7.7
000005900010040080300900000200030800030406070006080009000004005060070010004200000 ED=7.7/7.7/7.7
010000002304000000050060800000900007006050090000007300009003200000040050200700004 ED=7.8/7.8/7.8
001203400020000050600010002400701006009000700200309004900030007050000040003804200 ED=7.7/7.7/7.7
090400050600050008000002000300070800050603010001080006000700000900010002030009040 ED=7.7/7.7/7.7
100002003020010040003400000005000006010070080800000900000007800070080020500600004 ED=7.8/7.8/7.8
001200000020003400500000030600500010000020000070000008040000003008600050000008704 ED=7.7/7.7/7.7
003001006050000030800040500000602007006000200100904000005090003090000070200800400 ED=7.8/7.8/7.8
000001200030040050607800100500000400070000060004000005003006801090080040002300000 ED=7.7/7.7/7.7

champagne
champagne
2017 Supporter
 
Posts: 7455
Joined: 02 August 2007
Location: France Brittany

Re: Oddities of Sudoku Explainer

Postby champagne » Sat Aug 06, 2011 9:49 am

In fact, in the first example, skfr finds four ways to eliminate a candidate at the start with a rating 7.7

here is the print reduced to essential data

Code: Select all
9     1245 345   |3456  12456 1235  |8      123467 12347
1234  7    345   |34569 8     12359 |12346  123469 1234 
12348 1248 6     |349   1249  7     |1234   12349  5     
--------------------------------------------------------
1678  1568 578   |3568  256   4     |9      1237   12378
1468  3    489   |689   7     289   |124    5      1248 
478   4589 2     |1     59    3589  |347    347    6     
--------------------------------------------------------
5     4689 34789 |2     149   189   |13467  13467  1347 
2467  2469 479   |4579  3     159   |124567 8      1247 
23478 248  1     |4578  45    6     |23457  2347   9     

chain 1 seq  8r4c4  ~8r4c9  ~8r9c4  8r5c9  8r7c6  ~8r5c3  ~8r7c3  8r4c3
chain 2 seq  8r4c4  ~8r4c3


chain 1 seq  8r5c4  ~8r5c3  ~8r9c4  8r7c6  ~8r7c3  8r4c3
chain 2 seq  8r5c4  ~8r5c9  8r4c9  ~8r4c3


chain 1 seq  8r9c1  ~8r3c1  ~8r9c4  8r3c2  8r7c6  ~8r6c2  ~8r6c6  8r6c1
chain 2 seq  8r9c1  ~8r6c1


chain 1 seq  8r9c2  ~8r6c2  ~8r9c4  8r7c6  ~8r6c6  8r6c1
chain 2 seq  8r9c2  ~8r3c2  8r3c1  ~8r6c1


each chain must be red left to right and each step is "left justified"

I take the first chain

chain 1 seq 8r4c4 ~8r4c9 ~8r9c4 8r5c9 8r7c6 ~8r5c3 ~8r7c3 8r4c3

8r4c4 start
~8r4c9 => 8r4c9 false direct
~8r9c4 => 8r9c4 false direct
8r5c9 => 8r5c9 true after 8r4c9 false
8r7c6 => 8r7c6 true after 8r9c4 false
~8r5c3 => 8r5c3 false after 8r5c9 true
~8r7c3 => 8r7c3 false after 8r7c6 true
8r4c3 => 8r4c3 true after 8r5c3 false and 8r7c3 false.

this is a debugging sequence. skfr is not designed to help users.

elimination of 8r5c4 uses the same logic

eliminations of 8r9c1 and 8r9c2 follow a similar path based on the set 8r6c1 8r6c2 8r6c6

no time to do more this morning

champagne
champagne
2017 Supporter
 
Posts: 7455
Joined: 02 August 2007
Location: France Brittany

PreviousNext

Return to Software