Help With Sudoku Explainer

Interactive on-site game threads go here

Re: Help With Sudoku Explainer

Postby tarek » Sun Oct 20, 2019 1:08 pm

That’s great. Your contribution and feedback is very helpful.

The focus of our work on Sukaku explainer:

1. Increase speed and efficiency. This is highlighted by rating the most difficult puzzles, solving batch of puzzles or or both.
2. Adding new techniques: which has a few aims: one is to find techniques with simpler eliminations. This would help your GUI user without doubt. It may also reduce the overall rating. And may help with nested chains. The best would be new techniques that would have gone to deep long chains otherwise ( complex fish , uniqueness based techniques and ALS techniques with multiple eliminations potential)
3. Improving the GUi and command line solver
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Help With Sudoku Explainer

Postby tarek » Mon Oct 21, 2019 7:04 pm

Well it looks that I can't help it. Playing with the new TurbotFish algorithm has ended up with an improvement with the addition of Empty rectangle. The related three strong links algorithm received the same improvement.

Here is a taster:
Code: Select all
3 Strong links (with Empty Rectangle) 444
+----------------+----------------+----------------+
| 7    1    8    | 24   24   3    | 5    6    9    |
| 5    34   34   | 6    9    1    | 2    78   78   |
| 9    6    2    | 8    5    7    | 13   134  34   |
+----------------+----------------+----------------+
| 38   9    5    | 7   #136  2    | 4   *138  68   |
| 348  2    7    |*349 *1346 69   |*13   5   *368  |
| 1    34   6    | 5   #34   8    | 7    9    2    |
+----------------+----------------+----------------+
| 23   8    9    | 1    237  4    | 6   *37   5    |
| 2346 57   34   | 23   8    56   | 9   *347  1    |
| 346  57   1    | 39   67-3 569  | 8    2   #347  |
+----------------+----------------+----------------+
3 empty rectangles forming 3 strong links r9c5<>3
which is simmilar to a Finned Mutant Swordfish b569\r5c8b8
fin r9c9 r9c5<>3

Hidden Text: Show
718..3...5..69.2..9....7....9.7.24...2.......1.65.87...8.1.46.5........1......82.


and another but with an screenshot from SE

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

Re: Sukaku Explainer v1.8.2 released

Postby tarek » Mon Nov 04, 2019 1:07 pm

Sukaku Explainer 1.8.2 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 Skyscraper, 2-String Kite and Turbot crane have received a steroid boost with the ability to detect Grouped Strong links including "Empty rectangle". A recent discussion in the forum focused on terminology and I was hopeful that I managed to follow that. The ratings have been finalized at 4.0 for Skyscraper, 4.1 for 2-String Kite and 4.2 for Turbot crane. Any Grouped Strong link (e.g. ER) would push the rating to 4.3

The above techniques have been extended to the 3 Strong links variety with names like "3 skyscrapers", "3-String Kite" and "3-Turbot Crane" again receiving the same boost of identifying Grouped strong links. The ratings have been finalized at 5.4 for 3 Skyscrapers, 5.5 for 3-Turbot Crane & 5.6 for 3-String Kite. Any Grouped Strong link (e.g. ER) would push the rating to 5.7

I also attempted to improve the corresponding Technique Explanations.

Any comments would really help this project which unfortunately lacks the resources to progress quickly and efficiently.

My next focus is to have an option in batch solver to start with then in GUI that would revert the Sukaku Explainer to Sudoku Explainer 1.2.1 solver hierarchy and rating without the rating bug fixes. I would look into disabling any new technique that is will degrade solving performance significantly by default with an option to enabling it in GUI

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

Re: Help With Sudoku Explainer

Postby 1to9only » Thu Nov 07, 2019 8:27 pm

tarek wrote:One easy (subjective) variant that can be done is Latin square by disabling any box related searches.

This is easily done by commenting/modifying any of the 'block' stuff - tha hardest latin it generated was a 5.7 (BUG-4). I think it can generate harder ones, but the program currently crashes (exceptions!) when analyzing/solving these.
User avatar
1to9only
 
Posts: 4175
Joined: 04 April 2018

Re: Help With Sudoku Explainer

Postby rjamil » Fri Nov 08, 2019 8:41 pm

Hi Tarek,

Could you please consider different color for puzzle's solved big digit vs given clues (as Hodoku does)?
Sukaku.png
Sukaku.png (64.24 KiB) Viewed 1282 times

Hodoku.png
Hodoku.png (15.47 KiB) Viewed 1282 times

Look the color difference of 1 @ r1c6 of both the program screen for November 8, 2019 puzzle after applying first Hidden Single move.

R. Jamil
rjamil
 
Posts: 730
Joined: 15 October 2014
Location: Karachi, Pakistan

Re: Help With Sudoku Explainer

Postby tarek » Tue Nov 12, 2019 12:56 pm

rjamil wrote:Hi Tarek,

Could you please consider different color for puzzle's solved big digit vs given clues (as Hodoku does)?l[/b]

thanks,

On the to-do list

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

Re: Help With Sudoku Explainer

Postby 1to9only » Wed Nov 13, 2019 10:23 am

I know of 2 implementations, one by Sunnie-Shine who created a new CellType class, and given cells cannot be modified, the other by myself (no new class, and given cells can be changed to pencilmarks) in private code which has yet to make it into any of my many SE variants.
User avatar
1to9only
 
Posts: 4175
Joined: 04 April 2018

Re: Help With Sudoku Explainer

Postby tarek » Wed Nov 13, 2019 1:27 pm

1to9only wrote:I know of 2 implementations, one by Sunnie-Shine who created a new CellType class, and given cells cannot be modified, the other by myself (no new class, and given cells can be changed to pencilmarks) in private code which has yet to make it into any of my many SE variants.
If this is something you would want to share, PM me. thanks

I'm in the process of finalizing a generic single digit strong links pattern detector which will allow in theory searching for any number of strong links (not just 2 & 3 as currently available in sukaku explainer). It should find Grouped strong links as well and therefore is particularly unique in this aspect. These patterns are all X-Chains and AICs but the idea is to present these as "easy to spot techniques". They can also be caught by a Finned fish catcher, but how easy to spot these is debatable. It relies partly on a recursive pattern builder and I had to use some iterative permutation coding to avoid recursion in every aspect. ... I'm still testing and finding time is a particular issue.

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

Re: Help With Sudoku Explainer

Postby 1to9only » Wed Nov 13, 2019 3:19 pm

I maintain a number of SE variants and they'll all be synch'ed sometime - wait for a future update.
User avatar
1to9only
 
Posts: 4175
Joined: 04 April 2018

Re: Help With Sudoku Explainer

Postby tarek » Thu Nov 14, 2019 1:09 pm

The to-do list is growing by the day :roll:

Just an update on the last week or so: To keep the momentum going I challenged myself into re-coding the Strong links algorithm into a generic recursive algorithm that would allow extending the number of strong links with a simple variable change. This has been successful in the preliminary tests.

The strong links beyond 2 strong links (skyscraper 2-String kite and turbot crane) is unique in a sense because it extracts them out of X-cycles into an easier to spot techniques. If a solver is keen on finding bigger fish and particularly dislikes anything finned then these techniques are useful. The use of grouped strong links is definitely a unique point for more advanced solvers as well.

They do come at a serious speed cost. I will therefore disable by default all of the strong links techniques with 4+ strong links. they can be enabled from the GUI solving techniques menu & as always the Command line solver has the facility to enable disable any technique as well. I'm mindful that part of the project targets extending the high end ratings so making sure that the path remains free of bottlenecks in the middle & bottom is essential.

After that I will look into a small clean up process, GUI related improvements, Bring back SE121 option button and to look into some of dobrichev's to-do lists as well. The next phase after that would be the W-Wing which should be extendable with the generic strong links algorithm I've developed. After that possibly the ALS wings to make them generic …..

Here is a taster of the 5 strong links technique which should appear in the next release:
Code: Select all
+----------------+----------------+----------------+
| 3   $469  5    | 679  4679 8    | 69   1    2    |
| 1   $469  2    | 3    469  49   | 5    7    8    |
| 679  8   #79   | 5    1    2    | 3    4   #69   |
+----------------+----------------+----------------+
|*29   7    3    | 4    8   *19   | 26   5    16   |
|2469 $69   49   |12-9  23-9 5    | 7    8    13   |
| 5    1    8    | 27   237  6    | 24   9    34   |
+----------------+----------------+----------------+
|^479  2    6    | 8    5    479  | 1    3   %479  |
| 8    3   ^479  | 1269 2469 147  |%49   26   5    |
|^479  5    1    | 269  2469 3    | 8    26  %479  |
+----------------+----------------+----------------+
5 Strong links (including blocks) 410012 (Using 4 grouped strong links)
9*^%#$ r5c45<>9

Hint Explanation: Show
5 Strong links (including blocks) 410012 (Using 4 grouped strong links)

This technique relies on Conjugate Pairs that infer a strong link and/or a
special arrangement of values in a line or block also known as Grouped
Strong Links (where a strong link is inferred from a groups of cells having
the same value). the arrangement of cells with value 9 in row 4, block 7,
block 9, row 3 and column 2 form strong links (conjugate pairs, shown as
green values) or grouped strong links (yellow cell background). These strong
links are weakly linked to each other via column 1, row 8, column 9 and
block 1 (Red or Green outlined region).

Any occurrence of the value 9 can
therefore be removed from any cells sharing a row, column or block with ALL
cells with value 9 in row 4 and column 2 that are not part of column 1 or
block 1.

This technique is part of more genralized technique called X- chains
which in itself is part of more generalized technique called Alternating
Inference Chains (AIC). This technique uses logic closely realted to Finned
Starfish technique logic.

The grouped strong link when inferred from cells
in a block that are arranged in one mini-row and one mini-column is also
known commonly as "Empty rectangle". The inference of a strong link from a
group of cells with value 9 in any region can be spotted when a an "Empty mini
Area (EmA)" is observed. This EmA could be an empty mini-Line (EmL) in a row,
column or block. In the case of "Empty rectangle" the EmA is a group of empty
cells that can also be referred to as "Empty mini Rectangle (EmR)".

The pattern can be also viewed as an UFG fish:
Finned mutant starfish 9r34c2b79\r8c19b15 fin r5c2

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

Re: Help With Sudoku Explainer

Postby tarek » Sat Nov 16, 2019 8:23 am

Repository updated but still final minor adjustments before the next release:

To transform Sukaku explainer back into Sudoku Explainer 1.2.1 compatibility mode in command line in the upcoming release you need to use the following:
Code: Select all
techs=1111111111110110111100101001111111 -U0 -G0
These will effectively enable only SE121 techniques and will disable lkSudoku's fixes to the BUG and UR/UL catching algorithms

In the GUI Options menu, there will be 2 new options:
    New Revised Rating/Order: This will enable/disable the Rating and order revision discussed earlier (Disabled by default)
    Bring Back SE121: This will revert Sukaku explainer to Sudoku Explainer 1.2.1 compatibility mode (Disabled by default)

Image

The Strong links algorithm searching for 4-6 Strong links are disabled by default but can be enabled from the Techniques Selection Option menu

For practicality reasons: accessing the Techniques Selection Option menu would disable the "Bring Back SE121" if enabled. The same would happen if "New Revised Rating/Order" was enabled
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Sukaku Explainer 1.10.4 released

Postby tarek » Thu Nov 21, 2019 2:43 pm

Sukaku Explainer 1.10.4 is released.
Main Repository page has a brief description of the project
The main Wiki page for the Sukaku Explainer project

This release will allow you to rate and use Sukaku explainer in Sudoku Explainer v1.2.1 compatibility mode:

In the GUI goto Options menu & select "Bring back SE121". The frame title should change to show that you are in explainer v1.2.1 compatibility mode & if you press the Options menu again you would see that "Bring back SE121" has been selected. Here a screen shot of how the option is highlighted before selection (Note that because it hasn't been selected yet, the frame title change and the selection mark haven't appeared yet, The image below it shows you the Options menu after "Bring back SE121" had been selected)

Image

This release will also allow you to select/deselect the new rating system that was discussed earlier

Image
Image

A solved cell now appears in Blue font as discussed above and elsewhere

Image

To rate puzzles from command line in sudoku Explainer compatibility mode similar to what is being used currently in the Patterns Game use (% must be entered as %% in windows .bat files and shortcut commands):
Code: Select all
java.exe -Xrs -Xmx500m -cp SukakuExplainer.jar diuf.sudoku.test.serate
--techs=1111111111110110111100101001111111 -U0 -G0 -t0 --format="%g ED=%r/%p/%d"
--input=puzzles.txt --output=puzzles.rated.txt
This would effectively enable all original techniques, disable all new techniques and disable lkSudoku bug fixes to both BUG and Uniqueness

The new command line options:
Code: Select all
  -G, --islkSudokuBUG=N
      Enable/disable lkSudoku "Bivalue Universal Grave" bug fix 0=disabled 1=enabled (Default)
  -U, --islkSudokuURUL=N
      Enable/disable lkSudoku Uniqueness bug fix 0=disabled 1=enabled (Default)


The added techniques "4,5 and 6 strong links" are disabled by default and if needed will require selection from the Techniques selection menu in GUI and via "--techs=" in Command line.

In command line if you leave "--techs=" without numbers behind it it will give you an idea of the technique set used and which are disabled/enabled by default

There will be also the experimental "Variants" drop down menu which at this moment is still "Static" pending more experiments which I'll update you about
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Many moons ago

Postby 1to9only » Sat Nov 23, 2019 11:57 pm

tarek wrote:There will be also the experimental "Variants" drop down menu which at this moment is still "Static" pending more experiments which I'll update you about

I wonder if I should now make an NCExplainer. :lol:
Many moons ago, I had a basic SE for NC (non-toroidal variety, i.e non-wrapping) working, and it solved a few of the NCs I collected from these threads. I don't think I got as far as making it work for wrapping NCs.
I have not given much thought to SEs for any of the other constrained sudokus, maybe in a few more moons.
.
User avatar
1to9only
 
Posts: 4175
Joined: 04 April 2018

Re: Help With Sudoku Explainer

Postby tarek » Sun Nov 24, 2019 10:42 am

If there is an investment in SE variants than the lust is endless …

My variants priority would be DG, X and the extra groups (Centre dot, girandole)
The NC, Anti-chess , Forbidden pairs in general & continuity planes are easier tasks but still would need time for them to be done. They could come a bit later after I manage what I think are the more challenging tasks 1st.

I am conscious that I shouldn't try not to clutter the code with these things as well because there is still a need to develop Sukaku explainer further to target the unsolvable & speed it up. So there will be a limit that will not exceed for Sukaku explainer

tarek

P.S. I did mention elsewhere that A new release Sukaku explainer v1.11.1 is out which has a functional GUI Latin square variant (From the Variants drop down menu) & can be used from the command line using the -Q0 option
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: 9x9 Variants Sukaku Explainer

Postby tarek » Mon Dec 02, 2019 11:38 am

Small steps towards full functionality of some 9x9 variants. The repository is up-to-date but I haven't released anything yet.

Latin Square and Sukaku are fully functional and take advantage of Sukaku explainer's features.

The rest are not yet fully implemented. The GUI can select them now from the Variants menu. The GUI sudoku panel & frame changes accordingly.
The Brute force puzzle solve & validity checker are operational with all of them (although not fully optimised yet). You may find that the solver can advance the puzzle in many situations but as the techniques are not fully updated then I would use the solver with caution.

The Disjoint groups colours are not my cup of tea. To avoid a colour salad I also limited (for the time being) simultaneous Extra groups in the GUI

Here are a few screen shots

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

PreviousNext

Return to Interactive games