Help With Sudoku Explainer

Interactive on-site game threads go here

Re: 9x9 Variants Sukaku Explainer

Postby tarek » Sat Dec 14, 2019 10:47 am

Update on progress with Variants:
Repository has been updated but I'm not planning a release until a few tweaks are done here and there.

The current variants are now fully functional & can be accessed from the new "Variants" menu:
Code: Select all
Latin Square
X (diagonals)
Disjoint Groups (P, DG)
Windows (as in Windoku or Hypersudoku (W) )
Girandola
Asterisk
Center Dot

You can combine them as well (Except that you can't combine Girandola, Astersk or Center dot with each other which a GUI design choice)

I tested the functionality of the command line solver in solving the 422,000+ SudokuX puzzles that Leren was kind in supplying with some results posted on the SudokuX thread. Anybody interested in the command line solver will be pleased to know that you'll have more control over the variants than the GUI. I'll update you with all the necessary command line options when the release happens.

For the variants I had to create specific solving techniques (most of them a variation of the known sudoku explainer techniques). These are the generalised naked sets (Pairs, Triplets, Quads). I also added a generalised intersection technique which is slightly different than Pointing and claiming.

When using variants in GUI the solving technique change to the recommended default technique set which I encourage users to follow.

The 3 , 4, and 5 strong links techniques are disabled by default in variants & I would advise (until further notice) to restrict their use to Vanilla Latin Square and Vanilla Sudoku.

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

Re: Sukaku Explainer v1.14.7 released

Postby tarek » Wed Dec 18, 2019 7:56 pm

Sukaku Explainer 1.14.7 is released.
Main Repository page has a brief description of the project
The main Wiki page for the Sukaku Explainer project which will be updated hopefully with each release.

The Main changes with this release is the full integration of some popular 9x9 variants:
    Latin Square
    Disjoint Groups ((DG, P)
    Windows (W): With Sudoku it is known as Windoku, Hypersudoku or SudokuW
    Diagonals (X): With Sudoku it is known as SudokuX or Diagonal sudoku
    Girandola: Extra group
    Asterisk: Extra Group. With Windoku it is known as Clover
    Center Dot: Extra Group

In The GUI, there is a new Menu "Variants" where the variants can be selected. You can combine variants although you can only select one out of "Girandola, Asterisk or Center Dot"

The Disjoint group has a multi-coloured cell layout. Some of the hints cell highlighting has been modified to accommodate this.

In the Edit menu you have 2 new options:
Copy Grid81 variant regions: This copies the 81 character grid with some variant regions to clipboard
Copy Pencilmark variant regions: This copies the Pencilmarks with some variant regions to clipboard

I added new techniques targeting variants:
Generalized intersections: Rated 2.9
Generalized Naked sets (Pairs, Triplet, Quad and Quintuplet)
When changing into variants, the default techniques change accordingly. It is recommended that the default techniques are used.

The Strong links techniques (3, 4 , … etc) are the only techniques not supporting variants yet. These have been disabled by default when any variant is selected.

Sudoku Explainer 1.2.1 mode can be selected from the Options menu (Bring Back SE121). The new revised rating can also be selected from the same menu.

The Welcome window will refresh with each variant selection and would show the variants being in use in addition to version number. The GUI frame will always have the variants and version in the top left corner.

The command line options have full control over the variants. visit the https://github.com/SudokuMonster/SukakuExplainer/wiki/Batch-mode-command-line-parameters for full information.

The full set of techniques available are
Code: Select all
01: 1 Hidden Single
02: 1 Direct Pointing
03: 1 Direct Hidden Pair
04: 1 Naked Single
05: 1 Direct Hidden Triplet
06: 1 Pointing & Claiming
07: 0 Generalized Intersections
08: 1 Naked Pair
09: 0 Generalized Naked Pair
10: 1 X-Wing
11: 1 Hidden Pair
12: 1 Naked Triplet
13: 0 Generalized Naked Triplet
14: 1 Swordfish
15: 1 Hidden Triplet
16: 1 Scraper, Kite, Turbot
17: 1 XY-Wing
18: 1 XYZ-Wing
19: 1 WXYZ-Wing
20: 1 Unique Rectangle / Loop
21: 1 Naked Quad
22: 0 Generalized Naked Quad
23: 1 Jellyfish
24: 1 Hidden Quad
25: 1 3 Strong-linked Fishes
26: 0 Generalized Naked Quintuplet
27: 1 VWXYZ-Wing
28: 1 Bivalue Universal Grave
29: 0 4 Strong-Linked Fishes
30: 1 Aligned Pair Exclusion
31: 0 5 Strong-Linked Fishes
32: 0 6 Strong-Linked Fishes
33: 1 Forcing Chains & Cycles
34: 1 Aligned Triplet Exclusion
35: 1 Nishio Forcing Chains
36: 1 Multiple Forcing Chains
37: 1 Dynamic Forcing Chains
38: 1 Dynamic Forcing Chains (+)
39: 1 Nested Forcing Chains


--techs controls which techniques are used
Code: Select all
Default --techs=111111010111011111111011101101001111111
V1.2.1  --techs=111111010111011011011011000101001111111
Variant default --techs=111110101110111111110111001101001111111
User avatar
tarek
 
Posts: 3358
Joined: 05 January 2006

Re: Sukaku Explainer v1.14.7 feature!

Postby 1to9only » Fri Dec 20, 2019 12:14 pm

tarek wrote:Sukaku Explainer 1.14.7 is released.

The command line serate will sometimes not rate a GUI generated and solvable variant puzzle,
e.g. this Latin Square + Windoku + Disjoint Groups + Asterisk + Diagonals:
Code: Select all
.................8...........9............6...3..9..8..........7..241............ ED=7.7/1.5/1.5

I think it's missing a call to Settings.Settings_Variants().
.
1to9only
 
Posts: 1409
Joined: 04 April 2018

Re: 9x9 Variants Sukaku Explainer

Postby 1to9only » Fri Dec 20, 2019 12:53 pm

See my previous post. I have noticed some puzzles have rated lower in the command line serate than in the GUI!
e.g. this Windoku + Girandola + Diagonals
Code: Select all
2....6...8.......................5...8.......1.5....7.32....9.................... 11 ED=10.2/10.2/2.6

In the GUI, Tools -> Analyze gives this puzzle a rating of 10.5.

tarek wrote:I tested the functionality of the command line solver in solving the 422,000+ SudokuX puzzles ...

Don't know if re-rating these (after a fix for above) will show a big change in ratings!!!
.
1to9only
 
Posts: 1409
Joined: 04 April 2018

Re: Sukaku Explainer v1.14.7 feature!

Postby tarek » Sat Dec 21, 2019 3:19 am

1to9only wrote:
tarek wrote:Sukaku Explainer 1.14.7 is released.

The command line serate will sometimes not rate a GUI generated and solvable variant puzzle,
e.g. this Latin Square + Windoku + Disjoint Groups + Asterisk + Diagonals:
Code: Select all
.................8...........9............6...3..9..8..........7..241............ ED=7.7/1.5/1.5

I think it's missing a call to Settings.Settings_Variants().
.

Hi 1to9only,
Could you check what options you used to rate that puzzle: Latin Square + Windoku + Disjoint Groups + Asterisk + Diagonals is "-Q0 -W1 -D1 -K1 -X1"
I've just tested it and gave that same rating 7.7/1.5/1.5 (I'm not sure if you were -like me- where on more than one occasion used -A instead of -K for Asterisk)

1to9only wrote:See my previous post. I have noticed some puzzles have rated lower in the command line serate than in the GUI!
e.g. this Windoku + Girandola + Diagonals
Code: Select all
2....6...8.......................5...8.......1.5....7.32....9.................... 11 ED=10.2/10.2/2.6

In the GUI, Tools -> Analyze gives this puzzle a rating of 10.5.

tarek wrote:I tested the functionality of the command line solver in solving the 422,000+ SudokuX puzzles ...

Don't know if re-rating these (after a fix for above) will show a big change in ratings!!!
.

Again please check the options used as I used the default variant options and it gave the same rating as ED=10.5/10.5/2.9

I personally always use the set option "-S -t0 -T". With a large set of puzzles I use -B2 as it is quicker on average ((but may down-rate puzzles). The -B0 option would give an identical result to GUI but is slowest.

The "-S" option prints the options and version to output file. If you can post the set of options you used then I can hopefully locate the issue. On the GUI: The Welcome Box and left top part of the frame would list the variants and if you are using SE121 mode and/or the New rating system

At anytime If you press (Bring Back SE121) to select it, then press it again to deselect it, the set of solving techniques will not change back to default. They would remain on the SE121 set of techniques until you manually change them again or if you select a different variant
User avatar
tarek
 
Posts: 3358
Joined: 05 January 2006

Re: Help With Sudoku Explainer

Postby 1to9only » Sat Dec 21, 2019 7:52 am

I usually run a custom version of SukakuExplainer built from latest source and with a few modifications, but this does not explain this issue.

I downloaded the released SukakuExplainer 1.14.7 and still get this:
Code: Select all
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.serate --input=LSWDGAX.txt -Q0 -W1 -D1 -K1 -X1
20.0/1.5/1.5


I've done a clean rebuild from the latest source, and still get the same.

I've changed code in serate.java (the code is redundant as it's already called when setting a variant):
Code: Select all
//@SudokuMonster: The following is to target the static visibleCells in case there are variants
Grid.changeVisibleCells();

to:
Code: Select all
Settings.getInstance().Settings_Variants();

and it works:
Code: Select all
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.serate --input=LSWDGAX.txt -Q0 -W1 -D1 -K1 -X1
7.7/1.5/1.5

I don't know what other users are getting, but if it's an issue with my custom setup, I can work around it.
.
1to9only
 
Posts: 1409
Joined: 04 April 2018

Re: Help With Sudoku Explainer

Postby creint » Sat Dec 21, 2019 8:27 am

The problem is when you paste first and apply constraints after and then press solve/rate it is saying multiple solutions. But if you paste again then it works.
creint
 
Posts: 147
Joined: 20 January 2018

Re: Help With Sudoku Explainer

Postby tarek » Sat Dec 21, 2019 9:32 am

1to9only wrote:I usually run a custom version of SukakuExplainer built from latest source and with a few modifications, but this does not explain this issue.

I downloaded the released SukakuExplainer 1.14.7 and still get this:
Code: Select all
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.serate --input=LSWDGAX.txt -Q0 -W1 -D1 -K1 -X1
20.0/1.5/1.5


I've done a clean rebuild from the latest source, and still get the same.

I can't see if you used the --techs option!
Code: Select all
-Q0 -W1 -D1 -K1 -X1 --techs=111110101110111111110111001101001111111

without it the command line would still use the default Settings.init() which is equivalent to "--techs=111111010111011111111011101101001111111" and isn't designed to handle variants… Your call to Settings.initVariants() solves the problem by defaulting to the correct set of solving techniques. Using --techs is what I would use normally in any setting outside Vanilla Sudoku or Vanilla Latin Square

1to9only wrote:I've changed code in serate.java (the code is redundant as it's already called when setting a variant):
Code: Select all
//@SudokuMonster: The following is to target the static visibleCells in case there are variants
Grid.changeVisibleCells();

to:
Code: Select all
Settings.getInstance().Settings_Variants();

and it works
Thanks for highlighting this redundancy. The call to Settings_Variants() would then call Settings.initVariants() changing the default set of techniques to the default set of techniques designed for variants. With this change if you are planning only the default set of techniques then you can drop the --techs option and would still work. This change is easy to do and can appear in a quick bug fix release! Using the --techs option however should still work even without this fix. I also have to check which is called 1st setTechniques() after -techs or Settings.getInstance().Settings_Variants() because if setTechniques() is 1st then it means that you will not be able to control the techniques used as Settings.getInstance().Settings_Variants() will reset that.

creint wrote:The problem is when you paste first and apply constraints after and then press solve/rate it is saying multiple solutions. But if you paste again then it works.
In GUI any change in variants would clear the Sudoku Panel. The new constraints therefore would always apply before the puzzle
User avatar
tarek
 
Posts: 3358
Joined: 05 January 2006

Re: Help With Sudoku Explainer

Postby tarek » Sat Dec 21, 2019 11:06 am

Sukaku Explainer 1.14.11 is released.

I introduced an isTechs check to see if --techs has been used
Settings_Variants() will be called if it hasn't

This means that the command line solver would default to the correct set of techniques without --techs
--techs is then only needed if you are planning to use a different set of techniques from default
The SE121 mode remains (Targeting Vanilla Sudoku and Latin square):
Code: Select all
--techs=111111010111011011011011000101001111111 -U0 -G0
User avatar
tarek
 
Posts: 3358
Joined: 05 January 2006

Re: Help With Sudoku Explainer

Postby 1to9only » Sat Dec 21, 2019 12:16 pm

Thanks. I've not tried out (downloaded) the latest release, but what if it's vanilla sudoku and techs string is not used: Settings_Variants() is called - will it then use variants techniques on vanilla sudoku? Something to try/test later??

I've moved on to work on the problem of the multitude of possible variants and having to select the correct variants options before loading a puzzle. I'll be copying/saving grids using some notation that will allow pasting/loading and automatic setting of the variants options, e.g.
Code: Select all
\-------+-------+-------/       diagonals

+--|----+--|-|--+----|--+       windoku

+-------+D-----G+-------+       disjoint groups

+-----*-+---*---+-*-----+       asterisk

+---*---+---*---+---*---+       center dot

+-*-----+---*---+-----*-+       girandola

+-----------------------+       latin square

+-------+-------+-------+       vanilla
| . . . | . . . | . . . |
| . . . | . . . | . . . |
| . . . | . . . | . . . |
+-------+-------+-------+
| . . . | . . . | . . . |
| . . . | . . . | . . . |
| . . . | . . . | . . . |
+-------+-------+-------+
| . . . | . . . | . . . |
| . . . | . . . | . . . |
| . . . | . . . | . . . |
+-------+-------+-------+

To copy/save this:
Code: Select all
\--|--*--D-|*|-G--*--|--/ LS+W+DG+A+X
| . . .   . . .   . . . |
| . . .   . . .   . . 8 |
| . . .   . . .   . . . |
|                       |
| . . 9   . . .   . . . |
| . . .   . . .   6 . . |
| . 3 .   . 9 .   . 8 . |
|                       |
| . . .   . . .   . . . |
| 7 . .   2 4 1   . . . |
| . . .   . . .   . . . |
+-----------------------+
.................8...........9............6...3..9..8..........7..241............

This can be command line rated (the lines with less than 81 characters are ignored).
It can be loaded/pasted as a puzzle, it needs parsing of the top border to set the variants options.
To be completed after the festivities ...
.
1to9only
 
Posts: 1409
Joined: 04 April 2018

Re: Help With Sudoku Explainer

Postby tarek » Sat Dec 21, 2019 2:16 pm

1to9only wrote:Thanks. I've not tried out (downloaded) the latest release, but what if it's vanilla sudoku and techs string is not used: Settings_Variants() is called - will it then use variants techniques on vanilla sudoku? Something to try/test later??
init_Variants() will not call Variant techniques if the puzzle is Latin Square only or Vanilla Sudoku. so hopefully all good now!

1to9only wrote:I've moved on to work on the problem of the multitude of possible variants and having to select the correct variants options before loading a puzzle. I'll be copying/saving grids using some notation that will allow pasting/loading and automatic setting of the variants options, e.g.
This can be command line rated (the lines with less than 81 characters are ignored).
It can be loaded/pasted as a puzzle, it needs parsing of the top border to set the variants options.
To be completed after the festivities ...
.
Fantastic!
User avatar
tarek
 
Posts: 3358
Joined: 05 January 2006

Re: Deadly pattern in FP variants

Postby tarek » Thu Dec 26, 2019 1:04 pm

This post concerns only the planned addition of Forbidden Pairs variants (e.g. Anti Chess and Non-consecutive)

Observe the following solution grid of a Toroidal Anti-kNight sudoku:
Code: Select all
394758216
612493875
578216394
736821549
849635127
125974638
263547981
481369752
957182463

Observe the cells r46c37 with values 5 and 6. In a normal Unique sudoku these would constitute a deadly pattern where you could swap these values and still get a valid solution. In this variant this is not a deadly pattern as the Anti-kNight rules invalidates that swap (look at 5 in r3c1 and 5 in r8c8). The current Uniqueness & BUG techniques in Sukaku Explainer still identify these patterns as deadly and may apply therefore incorrect Uniqueness/BUG related technique eliminations.

As I'm planning the addition of some Forbidden Pairs variants the idea is to initially disable the Uniqueness/BUG techniques by default until I introduce an "isRestricted()" method which would check all candidates in the proposed deadly pattern. If these candidates are free from the FP restrictions then a deadly-pattern can form and the techniques can be safely applied.
User avatar
tarek
 
Posts: 3358
Joined: 05 January 2006

Re: AK, AN, NC, NC+ and Toroidal

Postby tarek » Mon Dec 30, 2019 5:45 pm

I'm just through the final touches of adding the following variants which are all subsets of forbidden pairs (FP) before the next release:
Code: Select all
Anti King (AK)
Anti kNight (AN)
orthogonally adjacent Non consecutive that excludes 1,9 (NC)
orthogonally adjacent Non consecutive that includes 1,9 (cyclic NC, cNC, NC+)
Toroidal board (Toroid, Torus, Doughnut)

The Toroidal board effects will be noted only on the Forbidden pairs variants mentioned above. If selected in their absence then it would have no effect.
The AK and AN are a subset as well of Anti-Chess Sudoku which can possibly expand to include many (fairy) chess pieces. Please refer to my thread that discusses dome of the puzzles with these properties and FP puzzles in general at http://forum.enjoysudoku.com/anti-chess-nc-and-forbidden-pairs-fp-puzzles-t30002.html

The +3 Strong links techniques haven't been updated yet to accommodate previously added regional variants and remain by default disabled if they are added.
In the post immediately above, I mentioned the effects of relational variants on possible Deadly Patterns. The Unique solution techniques (Uniqueness, BUG) are disabled when any of these FP variants are selected until I make changes to allow their safe inclusion into the solving techniques.

I have added 2 new techniques (which will have effects on the --techs command line option):
Code: Select all
forcingCellNC
lockedNC
These deal with NC puzzles only and are only used if NC or NC+ are selected. They have been discussed elsewhere in this forum and on the net
http://jcbonsai.free.fr/sudoku/JSudokuUserGuide/relationalTechniques.html
http://forum.enjoysudoku.com/sudokuncexplainer-to-solve-and-rate-sudoku-non-consecutive-t36949.html#p285476

There are still many FP puzzles that can't be solved by SE despite the new techniques which suggests that I need to look closer the chain algorithm to see if changes can be made there. Puzzle generation can be painfully slow and tedious

A few puzzles rated:
Code: Select all
.........
..1...8..
.5.1.9.6.
..6...2..
.........
..9...7..
.9.2.8.5.
..5...6..
.........
NC ED= 5.4/2.3/2.3 3SS0111/NS/NS (3 Strong Links)

Code: Select all
.1.....6.
2.......5
....6....
.........
..4...5..
.........
....2....
7.......1
.6.....2.
NC Toroidal ED=4.1/1.2/1.2 2SK/HS/HS (2-String Kite)

Code: Select all
.........
...5.1...
..3...9..
.7.....9.
.........
.4.....6.
..4...8..
...3.8...
.........
NC+ ED=6.3/1.5/1.5 VXY2412/HS/HS (double linked VWXYZ wing)

Code: Select all
..38.64..
.........
2.......8
6.......3
.........
9.......6
4.......1
.........
..51.86..
NC+ Toroidal ED=3.2/2.3/2.3 XW/NS/NS (X-Wing)
User avatar
tarek
 
Posts: 3358
Joined: 05 January 2006

Re: combining variants/options in GUI

Postby tarek » Tue Dec 31, 2019 11:09 am

If you've used the Sukaku Explainer GUI then you would notice the following:

    You can't choose more than one of the {Girandola, Center Dot, Asterisk}. Selecting any of them would disable the others. This is to prevent Graphical color salad. You can still combine them if needed via the command line.

    The rest of the variants can be combined and should work well to check puzzle validity , however, many of these variants with low clue count can be beyond SE rating ability and therefore rating and puzzle generation could be tedious with some.

    Selecting a variant would clear the grid. This is to guarantee referencing the correct variant when solving.

    Accessing the Solving techniques menu would disable the Bring Back SE121 option even if you don't perform any changes.

    Bring Back SE 121 option is designed for vanilla sudoku & Latin square. I've disabled this option whenever a variant is selected
    I'm in the process of updating the preferences which would allow the GUI user to have the same Variant/options appear at startup as they were at the last shut down

Any of you with coding ability can download the latest release repository tree to modify it to your preference. The release would cater for the general public
User avatar
tarek
 
Posts: 3358
Joined: 05 January 2006

Re: Sukaku Explainer v1.15.10 released

Postby tarek » Wed Jan 01, 2020 8:38 am

Sukaku Explainer 1.15.10 is released.

Added: Forbidden Pair (FP) Variants: Non Consecutive (NC and NC+), Anti-King and Anti-kNight
Added: Toroidal board feature (Extends reach of Forbidden pairs)
Added: NC techniques: NC Forcing cell and Locked NC
Enhancement: Last used Variants and options used are loaded back on startup
Minor Bug fixes

With the introduction of the new solving techniques, the --techs option has 2 more 0/1 characters. Here are the default values:
Code: Select all
Default Vanilla Sudokua/LQ (without FP)
--techs=11111111010111011111111011101101001111111

Default Vanilla Sudokua/LQ (with FP)
--techs=11111111010111011111101011101001001111111

SE121 option (designed  be used with Vanilla Sudoku/LQ only)
--techs=11111111010111011011011011000101001111111 -U0 -G0

Default Variants (without FP)
--techs=11111110101110111111110111001101001111111

Default Variants (with FP)
--techs=11111110101110111111100111001001001111111


Happy new year

Tarek

[EDIT: Release update mainly due to a small but annoying bug that kept defaulting GUI techniques to FP default techniques on startup]
User avatar
tarek
 
Posts: 3358
Joined: 05 January 2006

PreviousNext

Return to Interactive games