Jigsaw Layouts (Generate / Test)

For fans of Killer Sudoku, Samurai Sudoku and other variants

Re: Jigsaw Layouts (Generate / Test)

Postby Mathimagics » Tue Jan 12, 2021 1:30 pm

Hajime wrote:I can confirm that all 20 JSB layouts have a solution

Ok, great! 8-)

PM me with an email address and I'll send you more ... 2500 JS-only and 2500 JSB, say?
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: Jigsaw Layouts (Generate / Test)

Postby Hajime » Tue Jan 12, 2021 4:03 pm

Mathimagics wrote: ... 2500 JS-only and 2500 JSB, say?

I send you my email adres and will publish 2 *2500 in the next release.
User avatar
Hajime
 
Posts: 1385
Joined: 20 April 2018
Location: Fryslân

Re: Jigsaw Layouts (Generate / Test)

Postby Mathimagics » Tue Jan 12, 2021 4:17 pm

Done ...
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: Jigsaw Layouts (Generate / Test)

Postby Hajime » Wed Jan 13, 2021 9:11 am

Mathimagics wrote:Done ...

Thanks, received the 2 files with 2500 jigsaws well. Now busy "attaching" them to the next version of SiSeSuSo.
User avatar
Hajime
 
Posts: 1385
Joined: 20 April 2018
Location: Fryslân

Re: Jigsaw Layouts (Generate / Test)

Postby urhegyi » Sun Feb 07, 2021 12:34 am

Today I created some interesting layouts which I want to share:
mixture.png
mixture.png (13.7 KiB) Viewed 1044 times

Code: Select all
222111333422211333442211353444211553444666555866667559868767959888777999888777999
Last edited by urhegyi on Sun Feb 07, 2021 12:42 am, edited 1 time in total.
urhegyi
 
Posts: 755
Joined: 13 April 2020

Re: Jigsaw Layouts (Generate / Test)

Postby urhegyi » Sun Feb 07, 2021 12:37 am

And another one as JS:
projs.png
projs.png (17.3 KiB) Viewed 1044 times

or as JSB:
projsb.png
projsb.png (20.16 KiB) Viewed 1044 times

Code: Select all
333395555313196565311196665311196665321297675422297778422297778442498788444498888
urhegyi
 
Posts: 755
Joined: 13 April 2020

Re: Jigsaw Layouts (Generate / Test)

Postby urhegyi » Sun Feb 07, 2021 12:14 pm

I read this on the sudoku puzzles facebook group today:
World Sudoku Champion (2016) Tiit Vunk has created this marvellous Irregular sudoku which has a not so easy solve path.
When I see the SE rating of 2.8 I'm a bit disappointed!
But a nice layout is all what I can say.
Image
Code: Select all
....6.....3.....8...6...4.....2.6...9...8...7...4.5.....7...1...5.....2.....1.... 112222233111112333114422253644775553647777753644477553648885599666899999668888899
urhegyi
 
Posts: 755
Joined: 13 April 2020

Re: Jigsaw Layouts (Generate / Test)

Postby urhegyi » Sun Feb 07, 2021 12:36 pm

Thisone with the same layout and generated by myself with a SE rating of 66 is much better!
Image
Code: Select all
...8.3....3..2..8...6.5.4............23...65............7.3.1...5..4..2....9.8... 112222233111112333114422253644775553647777753644477553648885599666899999668888899

Code: Select all
Analysis results 
Difficulty rating: 6,6
This Sudoku Jigsaw can be solved using the following logical methods:
58 x Hidden Single
 2 x Direct Pointing
 1 x Direct Claiming
 6 x Cage Pointing
 1 x Claiming
 1 x Generalized Intersection
 1 x X-Wing
 2 x Generalized X-Wing
 1 x Turbot Fish
urhegyi
 
Posts: 755
Joined: 13 April 2020

Re: Jigsaw Layouts (Generate / Test)

Postby urhegyi » Sat Feb 13, 2021 2:39 pm

Database of layouts:
1)
Code: Select all
111223333111222233141222333145555666444456666444555567888999767889999777888899777

2)
Code: Select all
111223333111222233141222333144455666445555566444556667888999767889999777888899777

3)
Code: Select all
111223333112222334111255334166255344666257444668557449688557999688777799888877999
Last edited by urhegyi on Sun Feb 14, 2021 12:22 am, edited 1 time in total.
urhegyi
 
Posts: 755
Joined: 13 April 2020

Re: Jigsaw Layouts (Generate / Test)

Postby Hajime » Sat Feb 13, 2021 3:07 pm

Shall I add these JS layouts to the 2500 selections of SiSeSuSo?
User avatar
Hajime
 
Posts: 1385
Joined: 20 April 2018
Location: Fryslân

Re: Jigsaw Layouts (Generate / Test)

Postby urhegyi » Sat Feb 13, 2021 3:55 pm

Hajime wrote:Shall I add these JS layouts to the 2500 selections of SiSeSuSo?

I see no reason why not!
urhegyi
 
Posts: 755
Joined: 13 April 2020

Re: Jigsaw Layouts (Generate / Test)

Postby sigh » Sat Oct 02, 2021 2:15 am

Mathimagics wrote:Just to give a little example of the problem, here are two JL's, both of which are invalid:

Two invalid JLs: Show
SudokuJ-Invalid.png

The left-hand JL must be invalid because it requires the cells marked "A" to have the same value, and consequently the region below, which is entirely contained in cols 8 and 9, has nowhere that A can go.

But what about the other JL? Is there a simple logical argument one can make to demonstrate its invalidity? Can the "Law of Leftovers" tell us that this JL is invalid? I very much doubt that, but would be very happy to be proven wrong, so by all means have a go at it.


My brute-force solver helped me find a simple proof that the second layout is invalid:

Proof: Show
Code: Select all
 . . . . . . . . X
 . . . 1 X A . . .
 . . . 2 . B . . .
 . . . 3 . C . . .
 . . . 4 5 6 . . .
 . . . . . 7 . . .
 . . . . . 8 . . .
 . . . . . 9 . . .
 . . . . . . . . .


I'm going to call the the left box b1, and the top-right boxy thing b2.

If we fill the center region with 1 to 9, then we can show that the cells A, B and C can't take any of the values {1, 2, 3}, thus we can't fill the 6th column.

Note that the two Xs must be the same value. Thus we can ignore the top-right cell, and focus on the three rows shared by b1 and b2.

This means that for {1, 2, 3}, one of the rows is unavailable due to sudoku, and the other two have to be claimed by b1 and b2. This covers all of A, B and C.


Mathimagics wrote:
You might like to think about ways to use software to confirm this. Is there any free solver that can do this? JSudoku as far as I can tell is the only one that has inboard general Jigsaw support. One should approach this with caution, however - I am currently testing this JL in JSudoku, by filling in the first region as givens, and then recursively solving. This has been running for over 32 hours (!) so far without any resolution! :(

I do have a method which is generic (requires no pattern analysis, "advanced solving techniques", etc), and in this case identifies the JL as invalid in less than 100ms. I will describe this method shortly, but I must point out here that some invalid-JL cases can take much longer, up to 5 minutes.

Anyway, if you have solvers that can be used to attack the problem by any other means, we would definitely like to hear about it. 8-)


I tried to automate the reasoning in a general way, which is what powers the "Validate layout" button on the page.

This takes it about ~150ms on the layout above, but I suspect it could be tuned much better. I have no idea if this is still effective on harder layouts.

Do you still have your list of invalid and valid jigsaw layouts, especially the the more difficut ones? Would I be able to get a copy?
sigh
 
Posts: 22
Joined: 01 September 2021

Re: Jigsaw Layouts (Generate / Test)

Postby 1to9only » Sat Oct 02, 2021 8:26 am

sigh wrote:... valid jigsaw layouts, especially the the more difficut ones? Would I be able to get a copy?

Andrew Stewart's Jigsaw Sudoku Solver has a number of jigsaw shapes, some of which can produce ED=11.x ratings.
The jigsaw layouts and examples for the web page can be found in one of the js files.
I posted the layouts that produce ED=11.x jigsaws here.
The highest rated I found was ED=11.9/11.9/2.6 (layout: H, Bob & Debbie Scott).
The thread mentions JigsawExplainer used to rate the jigsaws, it is no longer distributed as the project has been inactive for some time.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Jigsaw Layouts (Generate / Test)

Postby Mathimagics » Sat Oct 02, 2021 9:21 am

sigh wrote:My brute-force solver helped me find a simple proof that the second layout is invalid ...

Well done!

That's a useful approach. It would be interesting to know, for the invalid JL list that I have, whether a simple 2-region test can be used to confirm invalidity. Or are there invalid JL's for which 3 or more regions need to be tested? Interesting ...

Regarding JL data, if you PM me an email address I can send you the invalid JL list, and a sample of perhaps 10,000 valid JL's.


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

Re: Jigsaw Layouts (Generate / Test)

Postby sigh » Sat Oct 02, 2021 2:41 pm

Thanks 1to9only! The layouts in Andrew Stewart's includes all the ones you've posted, which was convenient.

My validator seemed to verify most of them easily, but took 0.1-0.3s on 3 of them due to bad choices of initial value settings. The time doesn't bother me as much as the fact that the code made some very obviously suboptimal choices, so room for improvement there.

Thank you Mathimagics, I've sent you a PM. I've very curious to see how my approach holds up against these. Even if there are simple refutations present, I don't know if there is a good general approach to find them. The refutation of the grid above seems incredibly straight-forward, but start with the wrong initial values set and my solver hardly notices it.
sigh
 
Posts: 22
Joined: 01 September 2021

PreviousNext

Return to Sudoku variants