SukakuExplainer - Addons

Programs which generate, solve, and analyze Sudoku puzzles

SukakuExplainer - Addons

Postby 1to9only » Wed Jan 01, 2020 7:44 pm

SukakuExplainer, with these addons, can be used to solve and rate the doag puzzles recently posted here, samurai puzzle posted here and sumo puzzle posted here.
The addons also support some of the SukakuExplainer variants.
The addons are provided in binary format to be added to SukakuExplainer.
To do this:
1. Download the 1.17.7 version of SukakuExplainer from: here.
2. Download the SukakuExplainerGattaiAddons.zip file from: here, unzip to obtain these files:
Code: Select all
diuf/sudoku/solver/a.class
diuf/sudoku/test/doag.class
diuf/sudoku/test/samurai.class
diuf/sudoku/test/sumo.class

3. Add these files to SukakuExplainer:
Code: Select all
jar.exe uf SukakuExplainer.jar diuf/sudoku/solver/a.class diuf/sudoku/test/doag.class diuf/sudoku/test/samurai.class diuf/sudoku/test/sumo.class

Note: jar.exe is part in the jdk (delevelopment kit) but not found in the jre (runtime environment).

Or just download SukakuExplainer v1.17.7 with (the Gattai and Generate) Addons already included from: here.

The samurai solver will solve all 80 of Ruud's samurais posted here.

The gattai solver (doag, samurai or sumo) cannot solve (rate) the hardest gattai puzzles - this is mainly because SukakuExplainer expects solving 9x9 sudokus having single solutions, whereas in gattais the subgrids will often have multiple solutions.

Usage - doag
Code: Select all
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.doag --input=doag.txt [options]

Usage - samurai
Code: Select all
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.samurai --input=samurai.txt [options]

Usage - sumo
Code: Select all
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.sumo --input=sumo.txt [options]

If no options are specified, then the default is solving a gattai puzzle made of vanilla sudokus.

Options - Output (select none or one of the following)
Code: Select all
-h   show hints
-p   show pencilmarks

The output is best redirected to a file.

Options - Variant (select none, one or more of the following)
Code: Select all
-l   enable Latin Square variant
-x   enable Diagonals (X) variant
-w   enable Windoku variant
-d   enable Disjoint Groups variant
-a   enable Asterisk variant
-c   enable Center Dots variant
-g   enable Girandola variant

Options - Chaining (select none or one of the following)
Code: Select all
-C   enable chainingHintProducers - Forcing Chains & Cycles 6.6+,7.0+
-A   enable advancedHintProducers - Nested Forcing Chains 9.5+, levels 1-3
-E   enable experimentalHintProducers - Nested Forcing Chains 9.5+, level 4

By default, the chaining solving techniques are not enabled.
Enabling a chaining option generally does not help solve the very difficult gattais!

Examples:
Code: Select all
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.samurai --input=ruud-samurai.txt

Code: Select all
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.doag --input=WinAstDoag.txt -w -a

Code: Select all
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.doag --input=WinDoag.txt -w

Code: Select all
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.doag --input=XDoag.txt -x

Edit 15Aug: update download links.
Last edited by 1to9only on Sat Aug 15, 2020 8:46 am, edited 8 times in total.
User avatar
1to9only
 
Posts: 4175
Joined: 04 April 2018

Re: SukakuExplainer - Addons

Postby tarek » Wed Jan 01, 2020 11:48 pm

Brilliant …
I will have to squeeze some time to test/play with this

tarek
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: SukakuExplainer - Addons

Postby 1to9only » Sun Jun 28, 2020 11:44 am

I have added sumo.class to SukakuExplainerAddons.zip (see post #1) to solve/rate sumo gattai puzzles.

It solves 2 of 3 of Ruud's sumo gattais posted here.
Code: Select all
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.sumo --input="Sumo #001 (November 30, 2006).txt"
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.sumo --input="Sumo #002 (May 4, 2007).txt"
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.sumo --input="Sumo-X #001 (January 21, 2007).txt" -x

It also solves Tarek's Bank Holiday 1108 Sumo Special from here.

It requires that the grid variant type be specified after each 81-chars sudoku grid, as follows:
Code: Select all
.8.....9.4.5.3...6.1..6...4....2..3..549.......................5..2......21...... 01 X
.........1.2...3.6.6.....7...81.92..3.......5..7...9............................. 02 W
.5.....1.7...9.5.41...5..6..7..3.........945........................8..9......62. 03 X
.............17......29......58..1...94..1....6..7.......4....................... 04 A
............98........15.....5..14.....3..87.....4..1......4..................... 05 A
.5..6......6.......7.4.9......9.................8......4.3.5.....2.......3..4.... 06 W
....3...............................2.......9...............................5.... 07 AWX
....6..3.......4.....9.3.6......8.................7......3.6.1.......2......5..4. 08 W
.....................9......5..6.....68..2.....35..6.....29........35............ 09 A
.......................2.......2..4....6..25...9..41......51......23............. 10 A
.86......5..8........................591.........2..1..9..5...37.5.9...1.4.....9. 11 X
.............................2...3..4.......6..75.31...6.....8.1.4...9.7......... 12 W
......12......3..5.......................571..5..7....4...1..7.1...3.6.8.6.....9. 13 X

The line format is: sudoku-81-chars (space) NN-grid-number(optional!) (space) variant-type

variant-type is none (for vanilla sudoku), one or more of the following:
Code: Select all
L   Latin Square
X   Diagonals (X)
W   Windoku
D   Disjoint Groups
A   Asterisk
C   Center Dots
G   Girandola

For Tarek's Bank Holiday 1108 Sumo Special:

Usage - dump pencilmarks from input grids, no solving is done
Code: Select all
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.sumo --input=tarek-s-bank-holiday-1108-sumo-special.txt -P

Usage - solution, with pencilmarks and hints for each grid's partial solution
Code: Select all
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.sumo --input=tarek-s-bank-holiday-1108-sumo-special.txt -D -h

Note: Some features are untested, I am aware of at least 1 bug, there may be others.
Edit 29Jun: I think having a Vanilla Sudoku in a mix of Variants will not work (untested!), I'll fix this sometime!
Last edited by 1to9only on Mon Jun 29, 2020 8:48 am, edited 1 time in total.
User avatar
1to9only
 
Posts: 4175
Joined: 04 April 2018

Re: SukakuExplainer - Addons

Postby enxio27 » Mon Jun 29, 2020 2:51 am

1to9only wrote:3. Add these files to SukakuExplainer:
Code: Select all
jar.exe uf SukakuExplainer.jar diuf/sudoku/solver/a.class diuf/sudoku/test/doag.class diuf/sudoku/test/samurai.class diuf/sudoku/test/sumo.class

I'm guessing you meant java.exe rather than jar.exe; otherwise I get
'jar.exe' is not recognized as an internal or external command, operable program, or batch file.


Changing it to java.exe I get:
Error: could not find or load main class uf


Help?
User avatar
enxio27
 
Posts: 532
Joined: 13 November 2007

Re: SukakuExplainer - Addons

Postby tarek » Mon Jun 29, 2020 6:24 am

I had a look and had the same issue which appears to be easy to fix hopefully.

I managed to build the jar file adding the the new class files. This is from the unreleased current SE repository version of SE1.17.5

I tested it with the SumoSpecial and it solved it as 1to9Only described

Here is the link which will expire in a few days. You can rename the file to match 1to9Only's usage notes.

https://www.transfernow.net/OdtLdU062020

Well done 1to9Only on a good job :D

Tarek
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: SukakuExplainer - Addons

Postby 1to9only » Mon Jun 29, 2020 7:15 am

jar.exe: I think this would be part of the jdk (delevelopment kit) but not found in the jre (runtime environment).

SukakuExplainer1175AddOns.jar: This is from Tarek's link, rename to SukakuExplainer.jar - this works on the doags and samurais I use for testing.

The Addons (post #1) are matched to SE 1.15.10 source code and released jar. I hope there are no issues with the 1.15.10 addons used with 1.17.5 jar. In my dev rig, I'm on 1.17.3 (from git source) and the addons did not work with the latest 1.15.10 released SE.jar - I think this because of a new function introduced after 1.15.10.
User avatar
1to9only
 
Posts: 4175
Joined: 04 April 2018

Re: SukakuExplainer - Addons

Postby tarek » Mon Jun 29, 2020 7:24 am

This suggests that I may need to get back to Sukaku Explainer & finalize a release before giving it a rest ...

tarek
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: SukakuExplainer - Addons

Postby tarek » Wed Jul 15, 2020 1:24 pm

Sukaku explainer v1.17.7 has been released. The add-ons that were compatible with v1.15.10 haven't been affected by this release.

Tarek
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: SukakuExplainer - Addons

Postby 1to9only » Wed Jul 15, 2020 6:36 pm

If you've downloaded the Addons previously, they should work fine with SE 1.17.7.
I've recompiled everything using the latest SE source code, and I've updated the links in post #1.

You can also download SukakuExplainer v1.17.7 with Addons already included from: here.
.
User avatar
1to9only
 
Posts: 4175
Joined: 04 April 2018

Re: SukakuExplainer - Addons

Postby 1to9only » Sat Aug 15, 2020 8:38 am

I've made another Addon for SukakuExplainer - this one allows you to generate a small batch of (20) sudoku puzzles (also variants) from a Command Line.
Download the SukakuExplainerGenerateAddon.zip file from: here, and add the files to SukakuExplainer, as per the (similar) notes in post #1.
Or just download SukakuExplainer v1.17.7 with (the Gattai and Generate) Addons already included from: here.

Usage:
Code: Select all
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.generate [options]

If no options are specified, the default is to generate vanilla sudoku puzzles (default Difficulty).
The output is to the screen, it can be redirected to a file.

Options - Difficulty (select none or one of the following)
Code: Select all
-D   generate Diabolical puzzles, ED=1.0-12.0 (default Difficulty)
-F   generate Fiendish puzzles,   ED=1.0-6.0
-H   generate Hard puzzles,       ED=1.0-2.5
-M   generate Medium puzzles,     ED=1.0-1.5
-E   generate Easy puzzles,       ED=1.0-1.2

Options - Variant (select none, one or more of the following)
Code: Select all
-l   generate Latin Square variant
-x   generate Diagonals (X) variant
-w   generate Windoku variant
-d   generate Disjoint Groups variant
-a   generate Asterisk variant
-c   generate Center Dots variant
-g   generate Girandola variant

Example:
Code: Select all
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.generate -E -w

Sample output - options: -E -w
Code: Select all
89....1.3..26....5.3...2.7...94..5.8........2..8.2.4.7.......8......9..4....46..9 25 ED=1.2/1.2/1.2
.6.....7...81.9..6..562..1.8.97..36.5.3..4.2.47.2.3............694.8..5...7..1... 30 ED=1.2/1.2/1.2
78.9..46...6.83219.........2..1.4...9....51865.......4..9...54...7....91.1.6....2 30 ED=1.2/1.2/1.2
.62.3...5.......8..7914.......37.9.6.1..8.25.6..25.81.48.52.3.............5...1.. 29 ED=1.2/1.2/1.2
...1....61....4.9..5489..2...3..8.......1...38.7..5..1.9....6...........57.3..... 23 ED=1.2/1.2/1.2
.........49.7.5...1.....746514...3.7.89......3......9....9...82.4..6..3..25.38... 27 ED=1.2/1.2/1.2
.15.2.7.96.9.4123....5...6...6.......9..3.516.5.7.8942.6.38.1541.....3...3721..98 39 ED=1.2/1.2/1.2
21........6.1...2...9.34.716...9......8.1..6.3.145.....36...4.7...8.....9.2.6.81. 29 ED=1.2/1.2/1.2
6..........7..29.8..387..6.391.....58...4.....429.3.7.............39.2.773....68. 28 ED=1.2/1.2/1.2
6..7..9..8...............2....4..1..9.56..7.31...9.28.4....5.12...........8....6. 22 ED=1.2/1.2/1.2
2...56..9.3.17....57.2.8..3.....7....6........1...5...1....4......7238.5......34. 25 ED=1.2/1.2/1.2
7.....45........273.4........3.5......892...5.9...1.......6...353....2.86......71 24 ED=1.2/1.2/1.2
7.9....5.1.57.6........8..2...3....9..4.1..75....9...3...2...................169. 21 ED=1.2/1.2/1.2
.9.5.......2.8.....839.65..6..73.8.292.....53.1..5......9..5.8.8.52..13..4.37.2.. 32 ED=1.2/1.2/1.2
5.2.........9..7......3...2423...91.6.5...2.3..........8..........219....1...3.6. 22 ED=1.2/1.2/1.2
472.5..8..3.74862.6...39.5........32793...146...3.7..8.1.....6...58.3214.48.1597. 40 ED=1.2/1.0/1.0
..4...5......4..1..5...674.......9..6.....1.7.2.....6...3..7.2.....8.3......92... 21 ED=1.2/1.2/1.2
...8.1..59.5.2....38...5916.93..7..8.....95...6...2.......1.......27...3..1...482 28 ED=1.2/1.2/1.2
.2..6.......257..8.5..4...2.3.8924....8..1..3........7..2.......4.3.5..997....... 25 ED=1.2/1.2/1.2
948......1...6.839..........7..3.56.32..541.....1....469....7....5.....8.17.45.26 30 ED=1.2/1.2/1.2

Be aware that some options, e.g. -w -d -a -x (all at the same time!), take a long time to generate puzzles!
And have a file naming system ready for your sudoku files if you intend to generate lots of puzzles!!
.
User avatar
1to9only
 
Posts: 4175
Joined: 04 April 2018

SukakuExplainer v1.17.11

Postby 1to9only » Thu Aug 27, 2020 11:26 am

You can download SukakuExplainer v1.17.11 with Addons already included from: here.
User avatar
1to9only
 
Posts: 4175
Joined: 04 April 2018


Return to Software