## SiSeSuSo questions/bugs

For fans of Killer Sudoku, Samurai Sudoku and other variants

### SiSeSuSo questions/bugs

Situation can be reproduced with this simple sudoku:
Code: Select all
`#1//B4,N.51.247894728.9.6..9817.24.21948..3.86.29.4..74..619289847....2.269.8.74.37.4289.`

I expect when solving by hand that SiseSuSo will do it the same way with 2xy-wings, but it needs first 2 xy-chains which are harder and then the xy-wings.
Code: Select all
`Pointing, Claiming  | (3)b9c7 => (-3)r2c7XY_Chain r  |  (5=3)r3c9 (3=6)r3c1 (6=3)r1c1 (3=6)r1c4 (6=5)r9c4 [5] => (-5)r9c9XY_Chain b  |  (5=3)r2c5 (3=6)r1c4 (6=5)r9c4 (5=1)r9c1 (1=5)r8c1 [5] => (-5)r8c5XY-Wing r  |  (1=5)r2c7 (5=3)r2c5 (3=1)r8c5 [3] => (-1)r8c7XY-Wing b  |  (1=5)r7c8 (5=3)r8c7 (3=1)r8c5 [3] => (-1)r7c5`

Why checks it first for chains instead of wings which are lower rated?

There is a simple xy-wing to start with at R1C4,R2C5,R9C4: R1C4=3--> R2C5=5; R1C4=6--> R9C4=5; R78C5<>5
urhegyi

Posts: 611
Joined: 13 April 2020

### Re: SiSeSuSo questions/bugs

I will look this into it...

Hajime

Posts: 1003
Joined: 20 April 2018
Location: Netherlands

### Re: SiSeSuSo questions/bugs

urhegyi wrote:There is a simple xy-wing to start with at R1C4,R2C5,R9C4: R1C4=3--> R2C5=5; R1C4=6--> R9C4=5; R78C5<>5

You are right.
The program only eliminates candidates in seeing cells of the same row/col of the XY-chain/wing. It should also test seeing cells in the same box.
R1C4,R2C5,R9C4: two 5-s at the ends of the chain/wing --> r7c5<>5 and r6c5<>5
I will repair this in the next version.
Thanks

Hajime

Posts: 1003
Joined: 20 April 2018
Location: Netherlands

### Re: SiSeSuSo questions/bugs

Resize the browser ruins the picture produced by your "to html" option. To avoid this a simple fix in your html code:
first five lines
old:
Code: Select all
`<!DOCTYPE html><html><body><style>table, th, td { border-collapse: collapse; text-align: center; table-layout: fixed; width:100%; }td { }`

new:
Code: Select all
`<!DOCTYPE html><html><body><style>table { border-collapse: collapse; table-layout: fixed; text-align: center; }th { width:100%; padding-bottom:100%; }td { }`
urhegyi

Posts: 611
Joined: 13 April 2020

### Re: SiSeSuSo questions/bugs

urhegyi wrote:Resize the browser ruins the picture produced by your "to html" option. To avoid this a simple fix in your html code:
first five lines

Looks great, Thanks urhegyi. Will be implemented in the next version of SiSeSuSo.
And for everybody else: you can zoom in/out by holding down the Ctrl-key and scroll the mouse-wheel...
How it looks now: jigsaw asterisk ninja.
In code:
Hidden Text: Show
Code: Select all
`#9//H16,JSB/T16,JSB/H40,JSB/T40,JSB/B28,A/Z28,A/N4,A/N52,A/N28,A.............3........2...............8.1......1..........9.................7....111112222133332442135332244115332444665555544666788599667788589766788889777799999.............6........8.................4.3........4......5.................2....222211111244233331442233531444233511445555566995887666985887766988887667999997777....5.................8......6........4.6.................7........2.............777799999766788889667788589666788599665555544115332444135332244133332442111112222....9.................3..........7......2.6...............1........4.............999997777988887667985887766995887666445555566444233511442233531244233331222211111.1.4.......2.........5.....2........1.9.68...4...........3.......8.......7.8..........5.7.......6.......6...........1...56.8.2........7.....7.........9.......1.2.4..2.9..7..8...1.....138....6.9.7.8.....5......5.8.3..........................................................8.7.3......6.....2.3.9.1....126.....2...1..9..4.8..5....9.........................619......3.4......285.........................4....`
Basic methods and some Generalized Intersections needed

Hajime

Posts: 1003
Joined: 20 April 2018
Location: Netherlands

### Re: SiSeSuSo questions/bugs

Hajime wrote:
urhegyi wrote:There is a simple xy-wing to start with at R1C4,R2C5,R9C4: R1C4=3--> R2C5=5; R1C4=6--> R9C4=5; R78C5<>5

You are right.
The program only eliminates candidates in seeing cells of the same row/col of the XY-chain/wing. It should also test seeing cells in the same box.
R1C4,R2C5,R9C4: two 5-s at the ends of the chain/wing --> r7c5<>5 and r6c5<>5
I will repair this in the next version.
Thanks

I found another case where a simple xy-wing wasn't found.
SiSeSuSo_20210302_014253.png (16.6 KiB) Viewed 459 times

1)IF R9C4 = 2 --> R9C7=6
ELSE IF R9C4=7 --> R8C5=6
--> R8C9<>6=7!
2)IF R9C7 = 2 --> R9C4=7
ELSE IF R9C7 = 6 --> R8C9 = 7
--> R8C5<>7=6!
This all is tested with the February version.
I see now the March version is available.
Will test it later.
Update: Fixed
urhegyi

Posts: 611
Joined: 13 April 2020

### Re: SiSeSuSo questions/bugs

Generated sudoku with your November 5 version which seems to have three solutions:
Code: Select all
`1...5...94.......1.8.2.1.6.2..5.8..6..71.43..8..6.3..7.6.9.7.1.5.......39...1...2`

Code: Select all
`Eliminated candidates per Method and per SudokuMethod   \  Sudoku |   SER |     1                   |-------|------Not counted elims  |     0 |    82Naked Singles      |   0.1 |    26Hidden Singles     |   0.2 |    56UR Type 1,2        |   4.5 |     2Turbot-fish    [4] |   4.2 |     2                   |-------|------Eliminated Cand's  |   168 |   168Sum(SER * Cand's)  |  31.2 |  31.2Initial Candidates :   168Maximum SER rating :   4.5 <- Approach Labour rating      :  31.2 <- Experimental ratingTime needed        : 00:00:00.898SiSeSuSo Solver and Generator (version 2021-11) `

When disable UR:
Code: Select all
`+--'---'--+--'--'--+--'--'--+  | 1  2   3| 4  5  6| 7  8  9|  | 4  5   6| 7  8  9| 2  3  1|  | 7  8   9| 2  3  1| 5  6  4|  +--'---'--+--'--'--+--'--'--+  | 2  3  14| 5  7  8|14  9  6|  | 6  9   7| 1  2  4| 3  5  8|  | 8  14  5| 6  9  3|14  2  7|  +--'---'--+--'--'--+--'--'--+  | 3  6   2| 9  4  7| 8  1  5|  | 5 147 14| 8  6  2| 9 47  3|  | 9  47  8| 3  1  5| 6 47  2|  +--'---'--'--'--'--'--'--'--+  `

Same problem with:
Code: Select all
`.23...78.4...8...1..92.15....1.7.4..6.......8..5.9.1....29.78..5...6...3.78...64.`

When disable UR:
Code: Select all
`+--'--'--+--'--'---+--'--'--+  | 1  2  3|46  5  46| 7  8  9|  | 4  5  6| 7  8  9 | 2  3  1|  | 7  8  9| 2  3  1 | 5  6  4|  +--'--'--+--'--'---+--'--'--+  | 2 39  1|35  7  8 | 4 59  6|  | 6 49  7| 1  2  45| 3 59  8|  | 8 34  5|46  9 346| 1  2  7|  +--'--'--+--'--'---+--'--'--+  | 3  6  2| 9  4  7 | 8  1  5|  | 5  1  4| 8  6  2 | 9  7  3|  | 9  7  8|35  1  35| 6  4  2|  +--'--'--'--'--'---'--'--'--+  `
urhegyi

Posts: 611
Joined: 13 April 2020

### Re: SiSeSuSo questions/bugs

urhegyi wrote:Generated sudoku with your November 5 version which seems to have three solutions:
Code: Select all
`1...5...94.......1.8.2.1.6.2..5.8..6..71.43..8..6.3..7.6.9.7.1.5.......39...1...2`

I think this is UR by definition. http://hodoku.sourceforge.net/en/tech_ur.php#u1
Your puzzles can not be solved without UR, because of the multiple solutions.
Because it is generated with UR method it results in a valid puzzle with one unique solution.

May be I am wrong, but I think it works as intended

Hajime

Posts: 1003
Joined: 20 April 2018
Location: Netherlands

### Re: SiSeSuSo questions/bugs

Hajime wrote:
urhegyi wrote:Generated sudoku with your November 5 version which seems to have three solutions:
Code: Select all
`1...5...94.......1.8.2.1.6.2..5.8..6..71.43..8..6.3..7.6.9.7.1.5.......39...1...2`

I think this is UR by definition. http://hodoku.sourceforge.net/en/tech_ur.php#u1
Your puzzles can not be solved without UR, because of the multiple solutions.
Because it is generated with UR method it results in a valid puzzle with one unique solution.

May be I am wrong, but I think it works as intended

So generate a puzzle with UR option on.
Solve with UR off.
When it can't solve the grid completely, it results in multiple solutions.(check with backtracking).
The question now is why SISESUSO generates multiple solution puzzles that are by definition invallid, because a valid puzzle needs only to have one solution.

UR is a way of solving that can only be used when backtracking proved that the solution is unique, but can never be the only way that solves a sudoku.
A valid sudoku can always be solved with other methods than UR. This is the logical and preferred way to solve, unless the author of the puzzle provided you with the extra information it can only have one solution, then you can use UR. Mostly it is an easier way, but not necessary, but can always be avoided if you want. So a sudoku with three solutions can't be solved and has to be rejected by the program. There are examples where in case of UR used on a multiple solution puzzle, it selects one solution and an other technique like BUG selects one of the two others.
Last edited by urhegyi on Sat Nov 06, 2021 12:05 pm, edited 1 time in total.
urhegyi

Posts: 611
Joined: 13 April 2020

### Re: SiSeSuSo questions/bugs

Hajime wrote:Your puzzles can not be solved without UR, because of the multiple solutions.

On the contrary, uniqueness techniques cannot be used for puzzles with multiple solutions.
yzfwsf

Posts: 511
Joined: 16 April 2019

### Re: SiSeSuSo questions/bugs

OK, I was wrong, but not aware of it. And the implementation is accordingly.
I am open for ideas how to solve this in an elegant way (not using BFBT ).
For the time being: Generate puzzles with UR method unchecked.

Hajime

Posts: 1003
Joined: 20 April 2018
Location: Netherlands

### Re: SiSeSuSo questions/bugs

How do I add extra regions with less then 9 jigsaw pieces in the last November version?
When adding only 4 of them, program is stating there are no digits in jigsaw 5 up to 9.
In previous version it was possible.
Seems so S-Doku is broken to.
urhegyi

Posts: 611
Joined: 13 April 2020

### Re: SiSeSuSo questions/bugs

urhegyi wrote:How do I add extra regions with less then 9 jigsaw pieces in the last November version?
When adding only 4 of them, program is stating there are no digits in jigsaw 5 up to 9.
In previous version it was possible.
Seems so S-Doku is broken to.

I will look into this. Busy preparing a 11b version, also with UR "not applicable" when generating.

Edit 1: Found the difficulty. Before there was only a check if a cell contains no candidates anymore (and not a solution).
I added a second check if a house has no candidate "k" anymore. Each house needs a candidate k or a cell with solution k.
This must not be checked for all houses if only 4 Jigsaw-pieces are present.
Will fix it. Thanks urhegyi.

Edit 2: 2021-11B is released with these 2 bugfixes

Hajime

Posts: 1003
Joined: 20 April 2018
Location: Netherlands