Oddities of Sudoku Explainer

Programs which generate, solve, and analyze Sudoku puzzles

Re: Oddities of Sudoku Explainer

Postby daj95376 » Sat Mar 19, 2011 4:35 am

IK's version of SErate in batch mode returns the following for the first puzzle:

Code: Select all
Batch 1: rate 9.2
Step 1.1, Contradiction Forcing Chain: R9C3.1 on ==> R5C7.1 both on & off
Step 1.2, Contradiction Forcing Chain: R8C6.6 on ==> R3C2.4 both on & off
Batch 2: rate 9.3
Step 2.1, Contradiction Forcing Chain: R1C6.7 on ==> R4C2.6 both on & off
Step 2.2, Contradiction Forcing Chain: R8C4.1 on ==> R3C5.7 both on & off
Step 2.3, Contradiction Forcing Chain: R6C7.8 on ==> R5C1.6 both on & off
Step 2.4, Contradiction Forcing Chain: R6C5.3 on ==> R1C8.9 both on & off
Step 2.5, Contradiction Forcing Chain: R8C4.6 on ==> R3C7.5 both on & off
Step 2.6, Contradiction Forcing Chain: R6C2.5 on ==> R7C6.4 both on & off

IK's version of SErate in batch mode returns the following for the second puzzle:

Code: Select all
Batch 1: rate 9.2
Step 1.1, Contradiction Forcing Chain: R9C3.9 on ==> R5C7.9 both on & off
Step 1.2, Contradiction Forcing Chain: R8C4.9 on ==> R3C5.7 both on & off
Step 1.3, Contradiction Forcing Chain: R8C6.6 on ==> R3C2.4 both on & off
Batch 2: rate 9.0
Step 2.1, Cell Forcing Chains: R6C4 ==> R6C7.8 off

I don't think anyone is working on SErate anymore. So, it'll probably remain a mystery why Step 2.2 in the first puzzle has a different rating than Step 1.2 in the second puzzle.
daj95376
2014 Supporter
 
Posts: 2624
Joined: 15 May 2006

Re: Oddities of Sudoku Explainer

Postby ronk » Mon Mar 28, 2011 10:53 am

daj95376 wrote:I don't think anyone is working on SErate anymore. So, it'll probably remain a mystery why Step 2.2 in the first puzzle has a different rating than Step 1.2 in the second puzzle.

Yes, it seems lksudoku has disappeared. Did he post/publish his source code changes to Explainer and serate before doing so? If not, it's doubtful that any of his fixes will be incorporated into the Patterns Game. :(
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Oddities of Sudoku Explainer

Postby daj95376 » Mon Mar 28, 2011 3:51 pm

ronk wrote:Yes, it seems lksudoku has disappeared. Did he post/publish his source code changes to Explainer and serate before doing so? If not, it's doubtful that any of his fixes will be incorporated into the Patterns Game. :(

IK has a new job and is probably working hard at it. He mentioned (to me) that he'd stop by the forum as time was available. You might wish to send him a "pm" to read when he returns.
daj95376
2014 Supporter
 
Posts: 2624
Joined: 15 May 2006

Re: Oddities of Sudoku Explainer

Postby lksudoku » Mon Mar 28, 2011 9:36 pm

ronk wrote:
daj95376 wrote:I don't think anyone is working on SErate anymore. So, it'll probably remain a mystery why Step 2.2 in the first puzzle has a different rating than Step 1.2 in the second puzzle.

Yes, it seems lksudoku has disappeared. Did he post/publish his source code changes to Explainer and serate before doing so? If not, it's doubtful that any of his fixes will be incorporated into the Patterns Game. :(

I did not disappear, I am just busy doing other things

The sources for the latest version can be found in this page
They can be built using jdk, by running the mymake.bat batch file

The relabeling rating change is probably due to a bug in SE causing it to search for hints in a way that does not find the shorter chain hint first every time, and depending on the search order, may find longer chains
lksudoku
 
Posts: 90
Joined: 06 October 2010

Re:

Postby lksudoku » Tue Apr 19, 2011 3:19 pm

ronk wrote:From Pattern Games 0134, a case where swapping clue labels <1> and <9> affects the Sudoku Explainer ratings.

Code: Select all
 5 . . | . . . | 2 . .
 . 9 . | 3 . . | . . .
 8 . 6 | . . . | . . 1
-------+-------+-------
 7 . . | 2 . . | . . .
 . 8 . | . 9 . | . . .
 . . 4 | . . 1 | . 6 .
-------+-------+-------
 . 7 . | 5 . . | 3 . .
 . . 2 | . 8 . | . 4 .
 4 . . | . . 2 | 7 . 9  # ED=9.3/9.3/9.2

Code: Select all
 5 . . | . . . | 2 . .
 . 1 . | 3 . . | . . .
 8 . 6 | . . . | . . 9
-------+-------+-------
 7 . . | 2 . . | . . .
 . 8 . | . 1 . | . . .
 . . 4 | . . 9 | . 6 .
-------+-------+-------
 . 7 . | 5 . . | 3 . .
 . . 2 | . 8 . | . 4 .
 4 . . | . . 2 | 7 . 1  # ED=9.2/9.2/9.2


Here is the reason for the relabeling rating effect in this case, and a few others:

When using a dynamic method in SE, after finding that a candidate of a cell cannot exist while searching for a chain (assuming some value is on or off to start with), that candidate value is removed from the cell when processed and the search for a contradiction continues

The term dynamic is for dynamic removal of candidates while searching contradiction

However, the order in which the search is done effects the results since, once a cell candidate is processed and removed, later chain moves assume it no longer exist, so if a candidate of some cell was removed first, it may later be used to show another candidate must be used in a different cell, but if the search order changes, it may be that a later candidate deduction is not found because in the search order, the cell with a candidate removed is not processed yet
lksudoku
 
Posts: 90
Joined: 06 October 2010

Re: Re:

Postby ronk » Tue Apr 19, 2011 8:29 pm

lksudoku wrote:Here is the reason for the relabeling rating effect in this case, and a few others:

When using a dynamic method in SE, after finding that a candidate of a cell cannot exist while searching for a chain (assuming some value is on or off to start with), that candidate value is removed from the cell when processed and the search for a contradiction continues

The term dynamic is for dynamic removal of candidates while searching contradiction

However, the order in which the search is done effects the results since, once a cell candidate is processed and removed, later chain moves assume it no longer exist, so if a candidate of some cell was removed first, it may later be used to show another candidate must be used in a different cell, but if the search order changes, it may be that a later candidate deduction is not found because in the search order, the cell with a candidate removed is not processed yet

Sounds plausible but I'm not convinced that's what's occurring in this case.

The first two steps for the lower ED=9.2/9.2/9.2 rated puzzle are:
    Dynamic Contradiction Forcing Chain: r9c3<>9
    Dynamic Contradiction Forcing Chain: r8c4<>9; rating = 9.2
The first two steps for the higher ED=9.3/9.3/9.2 rated puzzle are:
    Dynamic Contradiction Forcing Chain: r9c3<>1
    Dynamic Contradiction Forcing Chain: r8c6<>6; rating = 9.2
So let's "Get all hints" and see what's happened for the corresponding r8c4<>1. The first thing to be noticed is that it has a 9.3 rating rather than 9.2, so there was no chance it would be selected. Slogging through the explanation reveals one different strong inference set ("sis") (3b7 instead of 3r8), undoubtedly causing the higher rating. Examining this excerpt from the explanation for both "chain 1" and "chain 2":

Explainer wrote:(6) If R8C1 contains the value 9, then R8C1 cannot contain the value 3 (the cell can contain only one value)
(7) If R8C6 contains the value 7 (2), then R8C6 cannot contain the value 3 (the cell can contain only one value)
(8) If R8C6 does not contain the value 3, then R9C5 must contain the value 3 (only remaining possible position in the block)
(9) If R9C5 contains the value 3, then R9C2 cannot contain the value 3 (the value can occur only once in the row)
(10) If R9C5 contains the value 3 (8), then R9C3 cannot contain the value 3 (the value can occur only once in the row)

(11) If R9C3 does not contain the value 3, R9C2 does not contain the value 3 (9) and R8C1 does not contain the value 3 (6), then R8C2 must contain the value 3 (only remaining possible position in the block)

If strong inference set 3r8 were used, as for the lower rated puzzle, steps (6) and (7) would already yield r8c2=3 ... and the steps (9) and (10) wouldn't be required. Since this segment of explanation appears in both "chains 1 & 2", it makes the node count jump from 45 to 49.

Please see if this detail fits your writeup for the difference in ratings.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Oddities of Sudoku Explainer

Postby lksudoku » Tue Apr 19, 2011 9:38 pm

The only difference in the chains starts at step 8

In step 8, in the lower rating case, the rule used is

(8) If F8 does not contain the value 3 and A8 does not contain the value 3 (6), then B8 must contain the value 3 (only remaining possible position in the row)

While for the higher rating case, the rule used is

(8) If F8 does not contain the value 3, then E9 must contain the value 3 (only remaining possible position in the block)
(9) If E9 contains the value 3, then B9 cannot contain the value 3 (the value can occur only once in the row)
(10) If E9 contains the value 3 (8), then C9 cannot contain the value 3 (the value can occur only once in the row)
(11) If C9 does not contain the value 3, B9 does not contain the value 3 (9) and A8 does not contain the value 3 (6), then B8 must contain the value 3 (only remaining possible position in the block)


When the search for contradiction chains begins, in the lower rate case, it first removes the value 3 from A8, and later reaches F8 where combined with A8-3 results in B8-3 in one step

In the higher rate case, F8-3 cell is searched before the A8-3 step was performed dynamically, so the algorithm cannot remove 3 from B8 at that time, as a result, some more steps derived from F8-3->E9-3 occur, one of them involves B8-3 (step 11), now that B8-3 move was found, B8-3 cannot be found later by the algorithm and the ancestor for that move is already set

Later on, in the higher rate case, the algorithm reaches the A8-3 move (for the first time), but when this step is reached, it can no longer set B8-3 with a shorter chain (combined with dynamic older F8-3) because the ancestor of B8-3 was already found
Last edited by lksudoku on Wed Apr 20, 2011 4:39 pm, edited 1 time in total.
lksudoku
 
Posts: 90
Joined: 06 October 2010

Re: Oddities of Sudoku Explainer

Postby ronk » Tue Apr 19, 2011 9:57 pm

lksudoku wrote:The only difference in the chains starts at step 8 ...

Are you saying the first seven steps make the same eliminations, just in a different order?
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Oddities of Sudoku Explainer

Postby lksudoku » Tue Apr 19, 2011 10:21 pm

ronk wrote:
lksudoku wrote:The only difference in the chains starts at step 8 ...

Are you saying the first seven steps make the same eliminations, just in a different order?

Same eliminations with the same moves with different labeling

9.2
(1) If D8 contains the value 9, then D8 cannot contain the value 7 (the cell can contain only one value)
(2) If D8 does not contain the value 7, then F8 must contain the value 7 (only remaining possible position in the block)
(3) If F8 contains the value 7, then F8 cannot contain the value 1 (the cell can contain only one value)
(4) If D8 contains the value 9 (initial assumption), then D8 cannot contain the value 1 (the cell can contain only one value)
(5) If D8 does not contain the value 1 and F8 does not contain the value 1 (3), then A8 must contain the value 1 (only remaining possible position in the row)
(6) If A8 contains the value 1, then A8 cannot contain the value 3 (the cell can contain only one value)
(7) If F8 contains the value 7 (2), then F8 cannot contain the value 3 (the cell can contain only one value)

9.3
1) If D8 contains the value 1, then D8 cannot contain the value 7 (the cell can contain only one value)
(2) If D8 does not contain the value 7, then F8 must contain the value 7 (only remaining possible position in the block)
(3) If F8 contains the value 7, then F8 cannot contain the value 9 (the cell can contain only one value)
(4) If D8 contains the value 1 (initial assumption), then D8 cannot contain the value 9 (the cell can contain only one value)
(5) If D8 does not contain the value 9 and F8 does not contain the value 9 (3), then A8 must contain the value 9 (only remaining possible position in the row)
(6) If A8 contains the value 9, then A8 cannot contain the value 3 (the cell can contain only one value)
(7) If F8 contains the value 7 (2), then F8 cannot contain the value 3 (the cell can contain only one value)

numbering:
1->,9 2->2, 3->3, 4->4, 5->5, 6->6, 7->7, 8->8, 9->1
lksudoku
 
Posts: 90
Joined: 06 October 2010

Re: Oddities of Sudoku Explainer

Postby ronk » Tue Apr 19, 2011 10:25 pm

I'm single stepping with the GUI and see a different sequence of eliminations. What method are you using?
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Oddities of Sudoku Explainer

Postby lksudoku » Tue Apr 19, 2011 10:59 pm

I took the puzzle

5.....2...1.3.....8.6.....97..2......8..1......4..9.6..7.5..3....2.8..4.4....27.1

Chain 1: If D8 contains the value 9, then E3 cannot contain the value 7 (View 1):

compared to

5.....2...9.3.....8.6.....17..2......8..9......4..1.6..7.5..3....2.8..4.4....27.9

Chain 1: If D8 contains the value 1, then E3 cannot contain the value 7 (View 1):

In the list of moves for the first step

The order change I refer to in the search is not the result display order, it is more like a depth of moves order (but not exactly)
lksudoku
 
Posts: 90
Joined: 06 October 2010

Postby ronk » Wed Apr 20, 2011 2:17 am

Reset, reboot. Despite many clues to the contrary, I got elimination steps (moves) confused with "if ... then" steps (inferences) within the move.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Oddities of Sudoku Explainer

Postby daj95376 » Wed Apr 20, 2011 10:22 pm

[Withdrawn !!!]
Last edited by daj95376 on Thu Apr 21, 2011 12:01 am, edited 9 times in total.
daj95376
2014 Supporter
 
Posts: 2624
Joined: 15 May 2006

Postby ronk » Wed Apr 20, 2011 10:54 pm

lksudoku, Explainer has an option to use either "R1C1 - R9 - C9 cell notation" or "A1 - I9 cell notation." The cell notation standard for this forum has been r1c1 - r9c9 since at least 2006. See Basic terms.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Oddities of Sudoku Explainer

Postby daj95376 » Thu Apr 21, 2011 12:44 am

When I run SE 1.2.1 against the two puzzles, the first elimination is r9c3<>1 and r9c3<>9, respectively. However, if you examine the explanation behind each, then you discover that different logic is used to derive each elimination.

Code: Select all
5.....2...1.3.....8.6.....97..2......8..1......4..9.6..7.5..3....2.8..4.4....27.1

Chain 2 step (9):

(9) If R9C3 contains the value 1 (initial assumption), then R9C3 cannot contain the value 8 (the cell can contain only one value)

Code: Select all
5.....2...9.3.....8.6.....17..2......8..9......4..1.6..7.5..3....2.8..4.4....27.9

Chain 2 step (9):

(9) If R2C3 contains the value 7 (2), then R2C8 cannot contain the value 7 (the value can occur only once in the row)
daj95376
2014 Supporter
 
Posts: 2624
Joined: 15 May 2006

PreviousNext

Return to Software