Jigsaw Samurai

For fans of Killer Sudoku, Samurai Sudoku and other variants

Re: Jigsaw Samurai

Postby Mathimagics » Thu Feb 28, 2019 5:02 am

.
I have managed to produce a minimal form of "JSB", it has only 43 clues. The minimal form that I found is shown below.

I can't verify it just yet - creint has an experimental solver that might be able to help with this.

But meanwhile I thought it would be useful to know whether Hajime's SSSS could make this verification process a little easier by identifying additional candidate eliminations that we can make use of.

And indeed it does! Only a few are available, but every little bit helps. One cell is solved, and four candidate-eliminations are reported, I just need to know how to interpret this log:

Code: Select all
A   B   C   D   E   F   G
1   1   1   1   1   9   row
1   2   1   1   6   3   box
1   3   1   2   7   5   JS
1   4   4   8   1   9   col



MinPuzzleDef: Show
Code: Select all
#5//B4,JSB/N4,JSB/H16,X/B28,JSB/N28,JSB
.5.4.....2..9...3......59...............3...................................7....
AABBBBBCCDAABBBBCEDAACCCCCEDAFFFCEEEDAAFFFGGEDDDHFFFGEDHHHHHGGEDHIIIIGGEHHIIIIIGG
.....3.1..8...7..9..6...8...........6...2...................7.........2.....5....
CCBBBBBAAECBBBBAADECCCCCAADEEECFFFADEGGFFFAADEGFFFHDDDEGGHHHHHDEGGIIIIHDGGIIIIIHH
.....6........2.....................1............................................
....1...............9...................3.....9.........4..39.....5...7..6.......
HHIIIIIGGDHIIIIGGEDHHHHHGGEDDDHFFFGEDAAFFFGGEDAFFFCEEEDAACCCCCEDAABBBBCEAABBBBBCC
....5...................8...........2...3............1...9..4..........8.......1.
GGIIIIIHHEGGIIIIHDEGGHHHHHDEGFFFHDDDEGGFFFAADEEECFFFADECCCCCAADECBBBBAADCCBBBBBAA

MinPuzzleGrid: Show
Code: Select all
 . 5 . 4 . . . . .       . . . . . 3 . 1 .
 2 . . 9 . . . 3 .       . 8 . . . 7 . . 9
 . . . . . 5 9 . .       . . 6 . . . 8 . .
 . . . . . . . . .       . . . . . . . . .
 . . . . 3 . . . .       6 . . . 2 . . . .
 . . . . . . . . .       . . . . . . . . .
 . . . . . . . . . . . 6 . . . . . . 7 . .
 . . . . . . . . . . . 2 . . . . . . . 2 .
 . . . . 7 . . . . . . . . . . . 5 . . . .
             . . . . . . . . .
             1 . . . . . . . .
             . . . . . . . . .
 . . . . 1 . . . . . . . . . . . 5 . . . .
 . . . . . . . . . . . . . . . . . . . . .
 . . 9 . . . . . . . . . . . . . . . 8 . .
 . . . . . . . . .       . . . . . . . . .
 . . . . 3 . . . .       2 . . . 3 . . . .
 . 9 . . . . . . .       . . . . . . . . 1
 . . 4 . . 3 9 . .       . . . 9 . . 4 . .
 . . . 5 . . . 7 .       . . . . . . . . 8
 . 6 . . . . . . .       . . . . . . . 1 .


Cheers,
MM
User avatar
Mathimagics
2017 Supporter
 
Posts: 1829
Joined: 27 May 2015
Location: Canberra

Re: Jigsaw Samurai

Postby Hajime » Thu Feb 28, 2019 9:24 am

Minimal puzzles are often only solvable by using BruteForce/BackTrack.
So SiSeSuSo can only erase 1 of the 43 givens and test (bruteforce option ON) if this leads to 1 solution (skip that) and NOT 2 (in which case it is NOT minimal).
That's not yet a functionality of SSSS. And that has to be done 43 times.
I have no time to implement this as my holidays starts in 2 days :D

The Logging keeps track of solved cells. Columns meaning is:
A. Step counter; In 1 Step multiple cells can be solved.
B. Cell-Solution counter. This counts up to 5*81-4*9-43
C. Grid number
D. Row number
E. Column number
F. Value of that cell as solution
G. Why (if single)
H. Advanced used method info
All can also be found when your mouse-pointer is at the little red triangle in the top row cells of sheet Logging

Minimal puzzles are seldom symmetrical and/or human solvable; the latter is an aim of SiSeSuSo
User avatar
Hajime
 
Posts: 733
Joined: 20 April 2018
Location: Netherlands

Re: Jigsaw Samurai

Postby Mathimagics » Thu Feb 28, 2019 11:51 am

Ha ha, I am not seriously suggesting that you implement minimality checking.

You would have to set your solver running and then go for a LONG holiday … maybe two !! :lol:

Is there a simple way for me to get a copy (a snapshot) of the pencilmarks, ie the current candidates?
User avatar
Mathimagics
2017 Supporter
 
Posts: 1829
Joined: 27 May 2015
Location: Canberra

Re: Jigsaw Samurai

Postby Hajime » Thu Feb 28, 2019 12:22 pm

Mathimagics wrote:Is there a simple way for me to get a copy (a snapshot) of the pencilmarks, ie the current candidates?

Press Show Candidates to hide en again to show, will show the current status
User avatar
Hajime
 
Posts: 733
Joined: 20 April 2018
Location: Netherlands

Re: Jigsaw Samurai

Postby Mathimagics » Thu Feb 28, 2019 12:36 pm

I want the candidates list extracted in text format.

If I select the whole grid, "copy" gives me the grid contents in text format, but it's not easy to parse. Isn't there a "CSV" option? Where Excel will separate the content of each cell with a comma? That's what I want ...
User avatar
Mathimagics
2017 Supporter
 
Posts: 1829
Joined: 27 May 2015
Location: Canberra

Re: Jigsaw Samurai

Postby Hajime » Thu Feb 28, 2019 1:11 pm

Mathimagics wrote:I want the candidates list extracted in text format.
If I select the whole grid, "copy" gives me the grid contents in text format, but it's not easy to parse. Isn't there a "CSV" option? Where Excel will separate the content of each cell with a comma? That's what I want ...

2 options:
A. Save a complete sheet in .CSV format: In Excel choose menu File Save As, Choose Browse, Choose folder and CSV type and a filename. Only active sheet can be saved. Open the filename.CSV with Notepad.
B. Select the area of the puzzle , press copy (^C) ; Start Notepad ; Paste (^V) . There will be tabs between the numbers. Select the room between two numbers en Copy (^C) . You now have a tab in the copy buffer. Choose Edit Replace ; Paste (^V) in "Find what" and a "," in "Replace with"; Replace All ; done

The candidates listed are from the previous Round/Step, so you can see why a Cell is solved. That's not what you want. Therefor press "Show Candidates" twice. and than you copy....
Or at the initial puzzle press BackStep (which is not there) but the current candidates will show up.
User avatar
Hajime
 
Posts: 733
Joined: 20 April 2018
Location: Netherlands

Re: Jigsaw Samurai

Postby Mathimagics » Thu Feb 28, 2019 2:27 pm

Ok, thanks Hajime. I hadn't noticed the hard TAB characters in the copied text.
User avatar
Mathimagics
2017 Supporter
 
Posts: 1829
Joined: 27 May 2015
Location: Canberra

Re: Jigsaw Samurai

Postby creint » Sun Dec 20, 2020 2:41 pm

Mathimagics wrote:I have managed to produce a minimal form of "JSB", it has only 43 clues. The minimal form that I found is shown below.

I can't verify it just yet - creint has an experimental solver that might be able to help with this.

MinPuzzleDef:
Hidden Text: Show
Code: Select all
#5//B4,JSB/N4,JSB/H16,X/B28,JSB/N28,JSB
.5.4.....2..9...3......59...............3...................................7....
AABBBBBCCDAABBBBCEDAACCCCCEDAFFFCEEEDAAFFFGGEDDDHFFFGEDHHHHHGGEDHIIIIGGEHHIIIIIGG
.....3.1..8...7..9..6...8...........6...2...................7.........2.....5....
CCBBBBBAAECBBBBAADECCCCCAADEEECFFFADEGGFFFAADEGFFFHDDDEGGHHHHHDEGGIIIIHDGGIIIIIHH
.....6........2.....................1............................................
....1...............9...................3.....9.........4..39.....5...7..6.......
HHIIIIIGGDHIIIIGGEDHHHHHGGEDDDHFFFGEDAAFFFGGEDAFFFCEEEDAACCCCCEDAABBBBCEAABBBBBCC
....5...................8...........2...3............1...9..4..........8.......1.
GGIIIIIHHEGGIIIIHDEGGHHHHHDEGFFFHDDDEGGFFFAADEEECFFFADECCCCCAADECBBBBAADCCBBBBBAA


Minimal solution provided has already multiple solutions, cannot be reduced when it is already invalid.
creint
 
Posts: 326
Joined: 20 January 2018

Re: Jigsaw Samurai

Postby Hajime » Mon Dec 21, 2020 3:29 pm

I still cannot solve the "minimal" puzzle of Mathimagics, whether it is valid or not.
My solver has not enough methods to solve it and brute-force/backtrack is not sufficient.
BF/BT will first solve the most filled puzzle, say 1th, than the 2nd. But because the 2nd is more/less independent from 1st all possibilities of 2nd will be multiplied by the possibilities of the 1st.
You also could start BF/BT with the 3rd, ok. Than the 1st than the 2nd, but now also the 2nd is independent from the 1st.
If each grid has 10.000 possibilities, 2 of then has in the order of 100M. This is too much.And there are 5 :o
User avatar
Hajime
 
Posts: 733
Joined: 20 April 2018
Location: Netherlands

Re: Jigsaw Samurai

Postby urhegyi » Fri Jan 22, 2021 5:40 pm

Hajime wrote:I still cannot solve the "minimal" puzzle of Mathimagics, whether it is valid or not.
My solver has not enough methods to solve it and brute-force/backtrack is not sufficient.
BF/BT will first solve the most filled puzzle, say 1th, than the 2nd. But because the 2nd is more/less independent from 1st all possibilities of 2nd will be multiplied by the possibilities of the 1st.
You also could start BF/BT with the 3rd, ok. Than the 1st than the 2nd, but now also the 2nd is independent from the 1st.
If each grid has 10.000 possibilities, 2 of then has in the order of 100M. This is too much.And there are 5 :o

Image
urhegyi
 
Posts: 539
Joined: 13 April 2020

Re: Jigsaw Samurai

Postby urhegyi » Fri Jan 22, 2021 7:59 pm

And this proves it has multiple solutions:
Image
urhegyi
 
Posts: 539
Joined: 13 April 2020

Re: Jigsaw Samurai

Postby urhegyi » Fri Jan 22, 2021 8:10 pm

Filling the third grid with a possible solution would have solved the other grids when the solution was unique. Now it leads to deadly rectangles.
I choose
Code: Select all
475936128391482567862175934937641285128357649654298371283514796549763812716829453
for the third grid as a solution, but could also have chosen thisone:
Code: Select all
475396128391482567862517934938761245127954386654238791283145679549673812716829453
urhegyi
 
Posts: 539
Joined: 13 April 2020

Re: Jigsaw Samurai

Postby Hajime » Sat Jan 23, 2021 10:23 am

urhegyi wrote:... but could also have chosen thisone:

And that leads to multiple solutions too?
User avatar
Hajime
 
Posts: 733
Joined: 20 April 2018
Location: Netherlands

Re: Jigsaw Samurai

Postby urhegyi » Sat Jan 23, 2021 10:40 pm

Hajime wrote:
urhegyi wrote:... but could also have chosen thisone:

And that leads to multiple solutions too?

Yes, It has many solutions.
urhegyi
 
Posts: 539
Joined: 13 April 2020

Re: Jigsaw Samurai

Postby Mathimagics » Sun Jan 24, 2021 7:05 am

Many thanks to creint and urhegyi for confirming the invalidity of my puzzle above ...

I have not worked on my Samurai/Jigsaw solver for over a year, and clearly it still has bugs .... :?

Who knows when I will be able to get back to fix it, but those reports will be very useful.

Cheers
MM
User avatar
Mathimagics
2017 Supporter
 
Posts: 1829
Joined: 27 May 2015
Location: Canberra

Previous

Return to Sudoku variants