Jigsaw Twodoku

For fans of Killer Sudoku, Samurai Sudoku and other variants

Re: Jigsaw Twodoku

Postby 1to9only » Sun Dec 06, 2020 12:28 am

Code: Select all
......5...6.1.....9...41.7...........57...3.2........8.98...............4...5.... ED=3.0/1.2/1.2
..............37................2...9........3...71...............9.4...4.2....86 ED=2.6/1.2/1.2

A quick note on how my rating program works:
- it first tries to solve using singles only, repeating grid 1, grid 2, etc, until no number placement or pencilmark elimination is possible in grids 1 and 2
- it then tries to solve using singles + intersections
- next it tries to solve using singles + intersections + subsets
- there are options to enable chains (the default is chains are not enabled).
- until puzzle is solved, and a rating is obtained.
The process is different from how each grid would be solved on its own, or how a human solver would solve.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Jigsaw Twodoku

Postby 1to9only » Sun Dec 06, 2020 12:32 am

The interaction between the 2 grids in the overlapped region would cause the individual grid ratings to be lowered a bit.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Jigsaw Twodoku

Postby urhegyi » Sun Dec 06, 2020 2:26 pm

I did some experiments based on a random sudoku I generated with jigsawexplainer generator for the first twodoku grid.
This grid1:
Code: Select all
....26..........6......3.4....89............1....548.2.4.....7..5.23.........9... 111112222113122244333155224633555554633355444667777744668777999668788999688888999

has rating 2.8.
I created the whole solution of grid1 with jigsawexplainer solver.
I putted the valid jigsaw 1 and complete solution of this grid in a textfile.
Now a program I wrote calculates the symmetrical 2nd grid with the same rating as:
grid2:
Code: Select all
...9.........57.3..2.....6.7.163....8............91....6.5......4..........47.... 999888886999887866999777866447777766444553336455555336422551333442221311222211111

I'm curious if the rating obtained with your rating program is now 2.8 too.
urhegyi
 
Posts: 755
Joined: 13 April 2020

Re: Jigsaw Twodoku

Postby 1to9only » Sun Dec 06, 2020 3:28 pm

urhegyi wrote:I'm curious if the rating obtained with your rating program is now 2.8 too.

Code: Select all
....26..........6......3.4....89............1....548.2.4.....7..5.23.........9.2. ED=2.3/1.2/1.2
.7.9.........57.3..2.....6.7.163....8............91....6.5......4..........47.... ED=2.0/1.2/1.2

note: i've added g1r9c8=2 (from grid 2) and g2r1c2=7 (from grid 1).

To understand a bit about how the rating program works:
load your grid 1 (without the r8c8=2)
Code: Select all
....26..........6......3.4....89............1....548.2.4.....7..5.23.........9... 111112222113122244333155224633555554633355444667777744668777999668788999688888999

update grid 1 block 9 from information available in grid 2:
r9c8=2, from the 2 in g2r3c2

Analyzing this, and the rating is ED=2.8

Additional eliminations:
-9r7c79, from the 9 in g2r1c4
-6r9c79, from the 6 in g2r3c8

Analyze this, and the rating is now ED=2.3, which is what the rating program finds.

The same exercise done on grid 2 gives it a rating of ED=2.3 before solving/rating starts.
But grid 1 solves on the first pass, so grid 2 block 1 can be filled from grid 1 block 9, and grid 2 now has a rating of ED=2.0.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Jigsaw Twodoku

Postby 1to9only » Sun Dec 06, 2020 7:01 pm

1to9only wrote:
urhegyi wrote:Any ideas how to generate a colored picture of the whole twodoku, eventually with updated pencilmarks in the overlapping area in HTML?

Quck answer: I dont know.
But if you want to know how I would go about doing this:
I'll take a look at https://www.sudokuwiki.org/jigsaw.htm - it displays one jigsaw only,
but you can 'borrow' html elements from the web page to make up your twodoku. ;)

The Python Imaging Library looks quite interesting - abbreviated as PIL, and the more up-to-date version is known as Pillow.
Requires python programming knowledge to use.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Jigsaw Twodoku

Postby urhegyi » Mon Dec 07, 2020 12:11 am

Another 3.0 rating for both
grid1:
Code: Select all
92.7156...........6.3.2..7.74..........2......3...........37.6..........4.2...8.. 111112222113122244333155224633555554633355444667777744668777999668788999688888999

grid2:
Code: Select all
..4...2.8..........3.96...........6......2..........89.9..2.6.3...........3159.27 999888886999887866999777866447777766444553336455555336422551333442221311222211111
urhegyi
 
Posts: 755
Joined: 13 April 2020

Re: Jigsaw Twodoku

Postby urhegyi » Mon Dec 07, 2020 12:46 am

Can your jigsawexplainer generate grid 1 jigsaws in batch and output them and their solved solution to a file as a command line option?
line 1 valid grid 1 jigsaw of rating x
line 2 complete solution of grid1
My program calculates the symmetric equivalent grid 2 with the same rating x in only milliseconds.
So one needs only one jigsaw and it's solution instead of 2. When the first grid has a high rating the second grid will have the same high rating, and it doesn't matter that they are solvable as the ratings are high enough. I'm curious to test if in case of a couple of 2 11.5 rated grids the total twodoku will be human solvable based on the relationship between the 2 grids.
urhegyi
 
Posts: 755
Joined: 13 April 2020

Re: Jigsaw Twodoku

Postby 1to9only » Mon Dec 07, 2020 9:58 am

urhegyi wrote:Can your jigsawexplainer generate grid 1 jigsaws in batch and output them and their solved solution to a file as a command line option?
line 1 valid grid 1 jigsaw of rating x
line 2 complete solution of grid1

It will take me some time to produce this.
In the meantime, you can do something similar yourself - if you generate Fiendish jigsaws, anything above ED=6.0 are ignored - these show up in the java console window as ED=20.0 - collect a few of these, solve/rate them.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Jigsaw Twodoku

Postby 1to9only » Mon Dec 07, 2020 2:38 pm

Andrew Stuart 3 jigsaw has the required layout to allow twodokus to be constructed:
Image
Code: Select all
...3...9........1.85.........7...3.4......5......29.............23..1...9........ 111222233122222333111445333114445553644447555668777755668877999668877999668888999 ED=2.0/1.2/1.2
........4...2..48.............41......1......3.4...7.........68.2........6...9... 111222233111442233111442233554444233555466663755566688777566888777999998779999888 ED=2.5/1.2/1.2
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Jigsaw Twodoku

Postby Hajime » Tue Dec 08, 2020 9:36 am

Hajime wrote:
urhegyi wrote:In total 5 solutions

Look like a bug at my side.
I will look into this, but after the weekend...

I found the bug, but it is too difficult to fix in a few days. The bug is present when 2 jigsaw Sudoku's overlap each other.
Non-overlapping jigsaw Sudoku's in the same puzzle behaves correctly.
Thank you for discovering it.


Hajime
User avatar
Hajime
 
Posts: 1385
Joined: 20 April 2018
Location: Fryslân

Re: Jigsaw Twodoku

Postby urhegyi » Tue Dec 08, 2020 3:27 pm

My simple jigsaw twodoku creating program works also with the Andrew Stuart 3 layout.
grid1:
Code: Select all
.....1......3.....2...6..7....4..5........367.1..5.....9.......56..4.7......9...6 111222233122222333111445333114445553644447555668777755668877999668877999668888999

grid2:
Code: Select all
8...9......2.5..84.......9.....4..3.281........4..5....2..8...7.....1......3..... 111222233111442233111442233554444233555466663755566688777566888777999998779999888
urhegyi
 
Posts: 755
Joined: 13 April 2020

Re: Jigsaw Twodoku

Postby 1to9only » Tue Dec 08, 2020 3:55 pm

grid 1 jigsaws of varying difficulty (ED=1.9 - ED=11.3):
Hidden Text: Show
Code: Select all
...7.....8...4..5..3......4....952.......7..2......81..2..1....7.2..6.......5.... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 19 ED=9.5/1.2/1.2
453728961869142357238961574176395248914587632645273819527619483782436195391854726
.64.53....9....6.7.5.8.........972...............8.....2.......8..6......8..46... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 19 ED=10.7/1.2/1.2
764253981398125647256831479613497258147968532472589316529714863835672194981346725
1.......9......4...63.5.......1...8..2.8...7......4..6....9....84.......2...13... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 19 ED=9.3/1.5/1.5
186425739539768412463957128975132684621849375317284596758691243842376951294513867
3......715...2......1......74.....3........1..983.................482............ 111112222113122244333155224633555554633355444667777744668777999668788999688888999 16 ED=9.7/1.5/1.5
362945871576123984921857463745618239283794615498361527634279158157482396819536742
......2........7....14...9...7.4...6...9..1...1......8..3..8...3.451.....9...5... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 20 ED=9.5/1.2/1.2
785691234128356749651472893237849516842963157519734628973128465364517982496285371
3..4..1.67.3.4.....5..9...7...8..7..4......83..1.53....38.6....5..7.9......3..... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 25 ED=1.9/1.2/1.2
329487156763548912854196327612835749497612583971253864138964275586729431245371698
........6........4..........6.8.7.5..9......165..3.7.9.13...........9.....7..8... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 18 ED=10.1/1.5/1.5
789415236528371964135692847962847153894763521651234789213986475476529318347158692
.6....9.2...5.1.........8.........7..4....35....9......5.6.2...43.........4...... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 17 ED=9.7/1.2/1.2
867145932392571486579213864213468579746829351685934127951682743438796215124357698
2..5716....41....9........6....2......32..7.1.............43......6.9...7........ 111112222113122244333155224633555554633355444667777744668777999668788999688888999 19 ED=9.0/1.5/1.5
239571648684157329178435296396824175453296781961782534512943867827619453745368912
6...9..5.5..........8........6...37...2..84.....4.1.....7......9...2....1........ 111112222113122244333155224633555554633355444667777744668777999668788999688888999 17 ED=2.9/1.2/1.2
643897251524763819738156942816942375392518467259471638467285193971324586185639724
.4.2....8..5..7.........1..39...........6.2........6.427.9..................38... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 17 ED=2.6/1.5/1.5
749216358835627419628543197394851726413769285982175634271984563567392841156438972
..7...4...8........24.8....16....3.....8..9.7....6.........3.......1.........8... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 16 ED=2.8/1.2/1.2
517392486489237165724681593165974328231856947348569712956123874872415639693748251
.8.1..2...7..6..5....34.....9...7.........794..........1.4.....9.1.74...7........ 111112222113122244333155224633555554633355444667777744668777999668788999688888999 20 ED=7.1/1.2/1.2
586193247478261953127349586294857361863512794649735128315428679951674832732986415
3....2....7........239.............3..1....7...6..4.5.4..72......5..1........6... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 18 ED=8.8/1.2/1.2
358642197174238569823957641567419283291563478786194352419725836635871924942386715
.....6.......4.7....63..81....8...4...8..7..9.9....5.186........4..........6.4... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 20 ED=3.4/1.2/1.2
417586392621945738976352814732819645158437269394268571865193427543721986289674153
...........5...2....6....7.4.3...98.5....2.1.2813...............3.......7.8..6... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 19 ED=9.8/1.2/1.2
862759431345168297126943578473615982594872316281397645619284753937521864758436129
7..4..85...........5.1..3......7...58....5.645..2..............9.7...........9... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 18 ED=10.3/1.2/1.2
732491856683542917258164379346978125891735264579216483124357698967823541415689732
...3.1..9...........7...68...46..3.8.........546.1...3....5.....8..2............. 111112222113122244333155224633555554633355444667777744668777999668788999688888999 18 ED=2.6/1.2/1.2
875361249428137596137942685294675318362598471546819723719253864983426157651784932
.......2.6.......1......5........987..6...4.............9..2...43.......7..41.... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 16 ED=7.2/1.9/1.9
875396124647289351398124576214635987926571438581743692169852743432967815753418269
....9.8..5....6.4..2.7.1.......3..5.9.....1......7......79..............2.6...... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 17 ED=9.9/1.7/1.7
342695871513826947629781435871439256984567123135274698457918362768342519296153784
..5.3.29......6......9.......1.8.............1.....6.7...2........425...3..8..... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 17 ED=10.3/1.9/1.9
865734291428176539572961384291583476734692815149358627653217948987425163316849752
2..96...4.36..5..................8....1.7..3....6.......5.4........27............ 111112222113122244333155224633555554633355444667777744668777999668788999688888999 16 ED=10.1/1.5/1.5
258961374136485927983754261472396815841572639327619548795243186619827453564138792
.4..832..3.4.....1....5........9.7.....1...8.6...29..5.3..1....8...4.........6... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 21 ED=10.0/1.5/1.5
146783259354967821793258416528491763465132987617829345932514678879645132281376594
6...2....5..87.........2.64....8..........5.1.....5..2...9.8.......6.....2...3... 111112222113122244333155224633555554633355444667777744668777999668788999688888999 18 ED=11.3/1.2/1.2
679124853546871239187352964235789146892436571913645782764918325351267498428593617
6..2.7.9..............9.3.......61....468.......1.....74.......367.18............ 111112222113122244333155224633555554633355444667777744668777999668788999688888999 19 ED=10.7/1.5/1.5
618237495495721638271594386589376124934685217826143759743852961367918542152469873

grid's block 9 is empty, so grid 2 block 1 would be empty as well. in gattais (overlapped sudokus), the ovelapping regions (3x3 blocks or nonets) are usually empty (looks nicer!) - but there is no rule that says the nonets have to be empty!!
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Jigsaw Twodoku

Postby urhegyi » Tue Dec 08, 2020 8:37 pm

The calculated grids:
Hidden Text: Show
Code: Select all
....1.......4..8.3....5..8..52......8..3.......819....6......7..1..6...2.....3...
...21..5......2..5.......6.....5...............639.........5.8.3.2....9....78.12.
...89...7.......63....1....4..6......2...3.7..3...9.......5.84...6......1.......9
............175.................679..2........6.....58......2......1...428......6
...3...2.....431.5...8..5..8......4...4..2...7...1.6...2...14....6........9......
.....3......7.9..6....5.23....36.4..32......1..9..2...9...7..6.....1.3.95.4..1..3
...3..9.....7...........81.7.9.8..651......7..6.9.3.5..........2........5........
......9.........69...5.3.2......4....26....9..8.........7.........1.2...5.4....3.
........9...7.1......43.............6.9..84......8....1........7....63....1695..8
........4....9...2......3.....4.1.....18..9...37...5........8..........6.6..2...5
...19..................3.654.7........5.7...........39..8.........6..2..1....5.4.
...1.........8.......3.........9....5.6..1.....3....98....1.24........1...2...5..
........1...91.7.4.....9.7..........941.........1...4.....93....6..5..1...8..7.2.
...7........3..8......26..9.8.9..7...6....3..1.............412........6....2....1
...3.9..........3........987.2....6.6..1..8...3...8....78..49....1.3.......9.....
...6..4.9.......1...............1345.3.5....2.47...1.8.9....6....5...2...........
...3...........8.3..............6..142.1....71...8......9..5.1...........17..4..8
.............8..2.....5....6...7.395.........2.6..39...23...1...........4..7.6...
....16..9.......26...3..7.............6...4..957........8......1.......4.3.......
......8.7..............52......2......1.....5.9..4.......1.2.7..3.8....9..6.5....
.....7..1...495........9...8.6.....3.............7.3.......2......6......29.1.4..
............61........3.5.......7....4..6.2....9..................5..74.3...78..1
...4.........6...5....2..3.8..71...4.5...2.....9.7........8....2.....6.3..135..6.
...7...1.....5.......4.9...1..6.....2.6..........4....85.1.........34..6....1...5
............18.679.......46.....8.......174....87.......9.3..............3.6.5..7
urhegyi
 
Posts: 755
Joined: 13 April 2020

Re: Jigsaw Twodoku

Postby urhegyi » Tue Dec 08, 2020 9:18 pm

Now we have 25 grids 1 and my calculated ones produced with a simple procedural java console application. Can you pick out any of the hard ones and make the generale rating. I'm curious if the combination of two very hard ones makes a human solvable twodoku with a lower rating. I have posted the originals below so that they can be easily combined with the calculated ones.
Last edited by urhegyi on Tue Dec 08, 2020 10:02 pm, edited 1 time in total.
urhegyi
 
Posts: 755
Joined: 13 April 2020

Re: Jigsaw Twodoku

Postby urhegyi » Tue Dec 08, 2020 9:59 pm

The original 25 jigsaws grid1:
Hidden Text: Show
Code: Select all
...7.....8...4..5..3......4....952.......7..2......81..2..1....7.2..6.......5....

.64.53....9....6.7.5.8.........972...............8.....2.......8..6......8..46...

1.......9......4...63.5.......1...8..2.8...7......4..6....9....84.......2...13...

3......715...2......1......74.....3........1..983.................482............

......2........7....14...9...7.4...6...9..1...1......8..3..8...3.451.....9...5...

3..4..1.67.3.4.....5..9...7...8..7..4......83..1.53....38.6....5..7.9......3.....

........6........4..........6.8.7.5..9......165..3.7.9.13...........9.....7..8...

.6....9.2...5.1.........8.........7..4....35....9......5.6.2...43.........4......

2..5716....41....9........6....2......32..7.1.............43......6.9...7........

6...9..5.5..........8........6...37...2..84.....4.1.....7......9...2....1........

.4.2....8..5..7.........1..39...........6.2........6.427.9..................38...

..7...4...8........24.8....16....3.....8..9.7....6.........3.......1.........8...

.8.1..2...7..6..5....34.....9...7.........794..........1.4.....9.1.74...7........

3....2....7........239.............3..1....7...6..4.5.4..72......5..1........6...

.....6.......4.7....63..81....8...4...8..7..9.9....5.186........4..........6.4...

...........5...2....6....7.4.3...98.5....2.1.2813...............3.......7.8..6...

7..4..85...........5.1..3......7...58....5.645..2..............9.7...........9...

...3.1..9...........7...68...46..3.8.........546.1...3....5.....8..2.............

.......2.6.......1......5........987..6...4.............9..2...43.......7..41....

....9.8..5....6.4..2.7.1.......3..5.9.....1......7......79..............2.6......

..5.3.29......6......9.......1.8.............1.....6.7...2........425...3..8.....

2..96...4.36..5..................8....1.7..3....6.......5.4........27............

.4..832..3.4.....1....5........9.7.....1...8.6...29..5.3..1....8...4.........6...

6...2....5..87.........2.64....8..........5.1.....5..2...9.8.......6.....2...3...

6..2.7.9..............9.3.......61....468.......1.....74.......367.18............
urhegyi
 
Posts: 755
Joined: 13 April 2020

PreviousNext

Return to Sudoku variants