Help With Sudoku Explainer

Interactive on-site game threads go here

re: 16-squared

Postby Pat » Thu Sep 26, 2019 11:00 am

1to9only wrote:SE for 16x16 sudokus is possible!

some code-changes will be needed,
and new techniques added, e.g quintuple, sextuple, etc.

also
    bb\cc
    rr\bb

    ...
User avatar
Pat
 
Posts: 4056
Joined: 18 July 2005

Re: Help With Sudoku Explainer

Postby tarek » Thu Sep 26, 2019 12:16 pm

Great work on that GUI 1to9only!

16x16 SE is doable as we can extrapolate & expand on what we already have

Box/line intersection appears to be processed by a "fish catcher" this can be expanded in 2 ways.... To accommodate bigger fish and boxes in 16x16 but also to catch franken fish in our 9x9 sudoku/sukaku

The words laborious and tedious come to mind with a project like this. Certainly not as "Technical" as "improving chain processing/catching" or "Improving SE speed". It would be suitable for a collaborative project where people share the leg-work.

One easy (subjective) variant that can be done is Latin square by disabling any box related searches. Let the hunt for the most difficult LQ begin! All major digital solvers support omitting box constraints.

If the work targets developing a canvass style modifications (Essentially not using 9 or 16 but using N) then that would allow easier expansion of SE into Variant/Gattai territory
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Help With Sudoku Explainer

Postby creint » Thu Sep 26, 2019 3:47 pm

dobrichev wrote:
creint wrote:How well would they scale on larger + harder puzzles like 16x16 or samurai?

So far SE can't solve tarek's pencilmark-only 9x9 puzzles. Skfr uses the same set of techniques and wouldn't solve them too.
What about your solver (unless it only solves but doesn't calculate SE-compatible or similar rating)?


Adjusting SE to solve them could be very easy. Don't know if you want forcing chains inside forcing chains inside forcings chains. But I don't want to test this adjustment because it already takes too long.

I can add rating to my solver, but it will not be very fine grained unless it takes lowest rating and applies only 1 step at the time, which cost extra time.
creint
 
Posts: 393
Joined: 20 January 2018

Re: Help With Sudoku Explainer

Postby dobrichev » Thu Sep 26, 2019 5:43 pm

creint wrote:Don't know if you want forcing chains inside forcing chains inside forcing chains.

... and three more times because tarek's hardest have backdoor of size 6 (in singles).
Agree that there are solver programs for solving (like your and my) and other for rating and they resolve different tasks.
dobrichev
2016 Supporter
 
Posts: 1863
Joined: 24 May 2010

Other SE developments

Postby 1to9only » Fri Sep 27, 2019 9:03 pm

An interesting development is Sunnie-Shine's (he's posted here before) NewerSudokuExplainer.
The code base is SE 1.2.1, he's added a number of ((newer) solving) techniques, and he plans to add a few more.
Also blindlf has a new release! But I don't think the code has changed much.
.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Other SE developments

Postby tarek » Fri Sep 27, 2019 10:08 pm

1to9only wrote:An interesting development is Sunnie-Shine's (he's posted here before) NewerSudokuExplainer.
The code base is SE 1.2.1, he's added a number of ((newer) solving) techniques, and he plans to add a few more.
Also blindlf has a new release! But I don't think the code has changed much.
.

Thanks for pointing these out.
Sunnie-Shine's Techniques hierarchy includes
Code: Select all
        addIfWorth(SolvingTechnique.HiddenTriple, indirectHintProducers, new HiddenSubset(3, false));

        addIfWorth(SolvingTechnique.TurbotFish, indirectHintProducers, new TurbotFish());

        addIfWorth(SolvingTechnique.XYWing, indirectHintProducers, new XYWing(false));

        addIfWorth(SolvingTechnique.XYZWing, indirectHintProducers, new XYWing(true));

        addIfWorth(SolvingTechnique.WWing, indirectHintProducers, new WWing());

        //addIfWorth(SolvingTechnique.AlmostLockedPair, indirectHintProducers, new AlmostLockedPair());

        addIfWorth(SolvingTechnique.XYZWingExtension, indirectHintProducers, new WXYZWing(true));

        addIfWorth(SolvingTechnique.UniqueLoop, indirectHintProducers, new UniqueLoops());

        //addIfWorth(SolvingTechnique.UniqueRectangleExtension, indirectHintProducers, new UniqueRectangleExtension());

        addIfWorth(SolvingTechnique.WXYZWing, indirectHintProducers, new WXYZWing(false));

        addIfWorth(SolvingTechnique.WXYZWingExtension, indirectHintProducers, new VWXYZWing(true));

        addIfWorth(SolvingTechnique.VWXYZWing, indirectHintProducers, new VWXYZWing(false));

        addIfWorth(SolvingTechnique.NakedQuad, indirectHintProducers, new NakedSubset(4));

which is impressive … Having the Turbot fish technique detached from chains as a separate technique (with skyscraper and 2 string kite) allows them to demote it in the hierarchy and rating to a more acceptable level. The added techniques difficulty ratings are
Code: Select all
W-Wing, XYZ-Wing Extension, WXYZ-Wing, WXYZ-Wing Extension, VWXYZ-Wing, Skyscrapers, 2-String Kite, Turbot Fish are 4.4, 4.5, 4.6, 4.8, 5.0, 4.0, 4.1 and 4.2 respectively
I can't see any change in ratings or order for the already known techniques … This would allow the possibility of just disabling these new techniques if someone desires the technique set in SE 1.2.1

The unique loops are still sandwiched between these additions which means that there will be further overlap in the ratings. All unique loop techniques will be exhausted before going to *WXYZ-wings which in turn have to be exhausted before going to Quads and Jellyfish. So still similar issues to original and sukaku explainer.

I haven't downloaded it to check or test yet but I'm certainly interested in any code optimizations
Code: Select all
Optimize some syntaxes of code, for example, using Lambda expression to replace anonymous inner class to sort difficulty ratings in Hint class
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Help With Sudoku Explainer

Postby dobrichev » Sat Sep 28, 2019 5:48 am

The referred Sunnie's repository https://github.com/Sunnie-Shine/NewerSudokuExplainer is created on 9.9.2019.
Before a repository https://github.com/Sunnie-Shine/Sudoku-Explainer was published which seems to target translation only, and was active from Feb 28, 2018 to Mar 16, 2018.

Is this announcement for collaboration?

From the list of the changes above, I found that some classes are maybe renamed (nothing wrong), and found no hint sort optimization we did in Chaining.getHintList().

IMO the newly implemented techniques is worth to be investigated and eventually implemented in SukakuExplainer if they fit well in the whole picture.
dobrichev
2016 Supporter
 
Posts: 1863
Joined: 24 May 2010

Re: Help With Sudoku Explainer

Postby tarek » Sat Sep 28, 2019 10:41 am

At 1st glance these *wxy-wing hints are based on the already available and implemented xy-wing hint so adding these shouldn't be an issue

I can have a stab at this if no one has done so already and report back

Although it may result in speed degradation especially in solving the harder puzzles, this may result in reducing the difficulty of some puzzles or even solving some of those currently unsolvable Sukakus.

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

Re: Help With Sudoku Explainer

Postby 1to9only » Sat Sep 28, 2019 11:43 am

tarek wrote:I can have a stab at this if no one has done so already and report back

I did send Sunnie-Shine an email pointing him/her to the work done with SukakuExplainer.

I don't think there's any issue with code sharing (both sources under GPL), but for courtesy I think Sunnie-Shine should be informed - I can send another email, or a PM sent via this forum (I don't know if Sunnie-Shine still visits or the registered email is still working). Sunnie-Shine may also be interested in 'borrowing' code from Sukaku Explainer!!

I trust tarek to credit Sunnie-Shine with any of NewerSE's code that make it across into SukakuExplainer.
.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Help With Sudoku Explainer

Postby tarek » Sat Sep 28, 2019 1:41 pm

I think we did a good job crediting other projects and work related to our Sukaku Explainer. lksudoku already has a dedicated wiki page, an open issue and a mention on the external projects wiki page :lol:

I probably haven’t mentioned this but I did PM many people who worked on SE related improvements to include lksudoku, Patrice, JPF, champagne, ... Some replied and some didn’t.

I also opened an issue on blindIf’s repository to inform them of crediting their work a few weeks back.

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

Re: Help With Sudoku Explainer

Postby tarek » Sat Sep 28, 2019 8:13 pm

I just had a deeper look at the original implementation of XY and XYZ wings and the new implementation of WXYZ and VWXYZ wings ….

Few comments:

    As you already know in this technique there are x values in x cells. This means that it would be silly to place a WXYZ and VWXYZ wings as a simpler techniques than a naked Quad IMO.

    There are (x-1) cells in a single region with x values forming an ALS and a bivalue cell (The xz cell) sharing a region with at least one of those cells. This means that there are several different ways of how the ALS in the (x-1) cells appear.


[Edit: fixed typo]
Last edited by tarek on Sun Sep 29, 2019 5:47 pm, edited 1 time in total.
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Help With Sudoku Explainer

Postby tarek » Sun Sep 29, 2019 11:33 am

[Edit:]
I've deleted these posts. It looks I over-thought it. After some manipulation, it appears that the logic wasn't sound …

tarek
Last edited by tarek on Sun Sep 29, 2019 5:45 pm, edited 1 time in total.
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Help With Sudoku Explainer

Postby tarek » Sun Sep 29, 2019 4:11 pm

[Post deleted]
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Help With Sudoku Explainer

Postby tarek » Mon Sep 30, 2019 7:53 am

I managed to add Sunny-Shine’s WXYZ wing to the project:

Few notes:
The project has passed the bug fixes stage and many enhancements/improvements are already in place. lksudoku’s changes and now Sunny’s need many changes to their code before they can be incorporated. It is not a case of copy and paste!

As I mentioned before: the WXYZ wing is based on 4 cells and in my opinion it should be more difficult than a naked quad. My current initial rating of both versions of the WXYZ wings of 4.5 and 4.6 respectively (The 4 cell WXYZ wing but with a pivot having 3 candidates is called confusingly the XYZ extension) will most likely be bumped over the quad level to the 5.0 - 5.5 region.

The construct of the technique is based on the construct of the XYZ and XY technique in SE. We look for a pivot cell having x number of candidates (similar to XYZ wing) or (x-1) candidates (similar to XY wing) then proceed to look for (x-1) of bivalue cells that are linked to our pivot cell. X=3 for XYZ X=4 for WXYZ and X=5 for VWXYZ

In this way: You may end up having a construct similar to an ALS-XZ / ALS-XY or even a creature with (x-1) tentacles connected to this pivot cell. It will miss some varieties of the WXYZ wing because of the way it is constructed(I'm not sure if the current code can be simply modified to catch them).

Sunny assumes that if the pivot cell has (x-1) candidates that it is somehow easier to spot and therefore deserves a lower rating. For the WXYZ wing with 3 candidates in the pivot he calls it "XYZ extension" (I'm assuming because the XYZ wing has a pivot cell of 3 candidates) but the same construct with a 4 candidate pivot is called an WXYZ-wing. I've abandoned that and will call them WXYZ-wing B and WXYZ-wing A (But happy if there are any thoughts)

I would be interested to see if anybody has done any independent testing or has any thoughts about the heirachy/rating. The following are puzzles generated by Sukaku explainer through the GUI generation option which has now a WXYZ category:
Code: Select all
WXYZ wing to solve:
.78......5..2.4....1.3...........9.........733....916263.58.7......92.....27....1
5..6....3..9...2....4..5....5.9.......742....2...1...98......65.4...13......8..7.
..8.3..7...9..7815.....49.....5..6..75.....82..3..2.....47.....8124..7...7..8.3..
6.5....23.3...684..1.....6782.359.7....721.8....468.9.4..6...1..9218..3.163...758
...378........2.451..4..67..3....4......9..2.9.....1........8....18.3.9.29.1.....
....9..1276..........8......73.5.4.8......3..5..2....9........3.....1.4..3..8.7.5
97...1.....3.4......5....8...6..3.148...265.....1..6.94....29...2.....5...1...3..
....6....6...34..5.95..14.........1..4.8..79...8..96......75..3.89....7..........
..15...4....9..56.3.......2..8..49.............4.2...11...7..2.7..2.8.3...6.3....
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Undo button

Postby 1to9only » Wed Oct 02, 2019 9:42 am

tarek wrote:I've now integrated (and yes it was painful ;) ) the Undo button improvement in GUI.

I notice the Undo button appplies to the GUI session (not the current loaded puzzle), for example: load a grid and solve a few cells, load another grid and click Undo. Maybe this is what the Undo coder (https://github.com/Itsukara/SudokuExplainerPlus) intended. I'll probably implement the Undo differently in my own SE!
.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

PreviousNext

Return to Interactive games