Help With Sudoku Explainer

Interactive on-site game threads go here

Re: Undo button

Postby tarek » Wed Oct 02, 2019 6:15 pm

1to9only wrote:
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!.
Or he might have stopped short of adding a Re-do button which solves the issue ;)
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Help With Sudoku Explainer

Postby tarek » Wed Oct 02, 2019 6:28 pm

I'm not sure if this was intentional or not … It appears that the Aligned Pair Exclusions (APE) eliminations are solved with WXYZ-wings as implemented by Sunny-Shine with the Aligned Triplet Exclusions (ATE) solved with their VWXYZ-wings. I will need to test with a large sample of APE puzzles (ER=6.2) and then with a large sample of ATE puzzles(ER=7.5) to check if that is correct. If that proves to be correct then we can move ahead and remove these much loved techniques from the resolution rules.

If anybody with a patterns game file that I can go through can post here or PM me then it would e helpful. I'm moving now to add the VWXYZ-wing as it will be the easiest next one to add.

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

Re: Help With Sudoku Explainer

Postby 1to9only » Wed Oct 02, 2019 6:45 pm

File contains 2 files of all 6.2s and 7.5s submitted in Patterns Games 1 to 360 inclusive.
ATTACHMENT
er_62_75.zip (37,275 bytes)
Last edited by 1to9only on Wed Feb 24, 2021 9:47 pm, edited 1 time in total.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Help With Sudoku Explainer

Postby tarek » Thu Oct 03, 2019 6:39 am

Thanks 1to9only,

The 1st sweep in testing demonstrates that all current sample puzzle with APE should be covered by Sunny-shine's WXYZ and VWXYZ wings in addition to what is already covered by XY and XYZ wings. with 5 >= X >= 3, there would be a pilot cell with [ X or X-1 ] number of candidates that is linked to [ X-1 ] bivalue cells. The total number of candidates in those X cells is X candidates. The candidate possibility in the vicinity [ which is termed the "z" candidate ] that disrupts that balance can be eliminated.

There is a possibility that the pilot cell could have more than 5 candidates linked to bivalue cells (UVWXYZ-wing or bigger) that can still be caught by APE and missed by all of these additional wings … Non of our sample puzzles have that example. I will need the VWXYZ to be working fully before starting the hunt for such puzzles which I'm sure are rare …

I haven't looked at ATE yet …

I will update you when I have more info

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

Re: Undo button

Postby 1to9only » Fri Oct 04, 2019 9:45 am

tarek wrote:
1to9only wrote:
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!.
Or he might have stopped short of adding a Re-do button which solves the issue ;)

Besides the feature in Itsukara's Undo, SudokuExplainer has own interesting feature ...

Paste the dealer puzzle for the (current) pattern game 362 from here, and click on R4C2 twice.
Image
Last edited by 1to9only on Wed Dec 30, 2020 2:57 pm, edited 1 time in total.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Help With Sudoku Explainer

Postby tarek » Fri Oct 04, 2019 5:22 pm

1to9only wrote:Paste the dealer puzzle for the (current) pattern game 362 from here, and click on R4C2 twice.


This is a bug in my opinion (others may say that you just need to be careful next time :lol: )

If you click on a cell that hasn't been selected then the action would be to select that cell which would show the following:
a. if the cell has a single candidate in large font "uncovered cell" then it will highlight all similar uncovered cells in the puzzle in addition to changing the background colour of that cell to indicate selection. It will highlight the cells of the grid in pencilmark states that have the same candidate
b. If the cell has pencilmark candidates "any number of candidates in small font" the cell background colour changes to indicate selection.

If you click on a cell the has been selected then the following happens:
a. if the cell has a single candidate in large font "uncovered cell" then it will deselect the candidate and return the cell to a pencilmark state.
b. If the cell has pencilmark candidates "any number of candidates in small font" the candidate under the mouse is selected. The cell is uncovered with that single candidate upgraded to large font eliminating the other candidates in the cell. It will then highlight all similar uncovered cells in the puzzle. It will highlight the cells of the grid in pencilmark states that have the same candidate.

You can see now that the bug is in the fact that Sukaku explainer assumes that there is a candidate under your mouse which in the center of the cell is a 5. This will happen currently even if that candidate has already been eliminated.

[Added]
I've now added sunny-Shine's VWXYZ-wing in addition to adding the WXYZ wing. The difference between the 2 types of VWXYZ wing is the same as the difference between the 2 types of WXYZ wing which is simply the number of candidates in the pilot cell. I've decided therefore to name the techniques according to the number of cells used in addition to the number of candidates in the pilot cells. We have now WXYZ Wing 3 / WXYZ Wing 4 and VWXYZ Wing 4 / VWXYZ Wing 5. All current examples of APE are caught now using these.

There is potential of transforming these to a generalized locked set techniques by not limiting the non-pilot cells to bivalues. It can go on the to-do list :roll:

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

Re: Help With Sudoku Explainer

Postby 1to9only » Fri Oct 04, 2019 6:17 pm

tarek wrote:
1to9only wrote:Paste the dealer puzzle for the (current) pattern game 362 from here, and click on R4C2 twice.
This is a bug in my opinion (others may say that you just need to be careful next time :lol: )

I don't use the GUI much to have figured what the buttons do! Thx for explaining.
In SudokuExplainer (1.2.1), I think this will fix:
Code: Select all
if ( target.hasPotentialValue( value) )
{
    // Set the cell's value
    engine.cellValueTyped(target, value);
    repaint();
}
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Help With Sudoku Explainer

Postby tarek » Fri Oct 04, 2019 6:53 pm

1to9only wrote:
Code: Select all
if ( target.hasPotentialValue( value) )
{
    // Set the cell's value
    engine.cellValueTyped(target, value);
    repaint();
}

Fixed … The fix should appear in future releases
The ready to compile SE with the new techniques can be found on branch "newTechniques" this will eventually merge with master branch
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Help With Sudoku Explainer

Postby 1to9only » Sun Oct 06, 2019 10:17 am

tarek wrote:I would be interested to see if anybody ... has any thoughts about the heirachy/rating.

tarek wrote:It appears that the Aligned Pair Exclusions (APE) eliminations are solved with WXYZ-wings as implemented by Sunny-Shine with the Aligned Triplet Exclusions (ATE) solved with their VWXYZ-wings.

It would be good if NewerSudokuExplainer and SukakuExplainer used the same rating for the same solving technique.

In my own hack of Sudoku16x16Explainer, I've had to disable UL, APE and ATE - so I may add the WXYZ and VWXYZ wings at a later date, slotting them somewhere with (maybe) another rating! I've added some Quintuplet, Sextuplet and Septuplet code, and for fish: Squirmbag, Whale and Leviathan code - these currently have the same rating as the equivalent Quad rating!!

It seems to me that the different SudokuExplainer variants will each end up with different rating systems.
.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Help With Sudoku Explainer

Postby tarek » Sun Oct 06, 2019 1:31 pm

Watch this space over the next few days.

I wasn’t happy with this bivalue version of sunny shine’s wings so I ended rewriting the WXYZ wing and VWXYZ wing to a better version that catches more including the lovely version which is doubly linked. In theory that should cover Most if not all APE, most ATE and Sue-de-coq, and the basic versions of ALS XZ. I’ve also written new hint explanations that go with them which I think are better. It will make it easy to add the uvwxyz and tuvwyz as well in the not too distant future. It would allow in theory expansion to ALS XZ or ALS XY although I prefer the current naked set algorithm to catch ALS better.

The current version keeps the old SE ratings with the new proposed ratings as optional. At this moment the new techniques squeeze between the old ones and have overlapping and non-displacing ratings. So if these new techniques are disabled from GUI or command line and without activating the new ratings scheme, then you would get exactly what you would expect from the old SE
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Help With Sudoku Explainer

Postby tarek » Mon Oct 07, 2019 8:42 pm

Very pleased now with how the new WXYZ wing is shaping up to be:
I removed the restriction of having the pilot cell as the largest cell. The cells forming the larger ALS have no restriction on maximum number of candiates.
Doubly linked variety supported.
The technique name will e followed by a number having 3 or 4 digits. The 1dt digit will denote if it is doubly linked or not (1 or 2) the 2nd digit is the number of candidates in the largest cell. The last will be the number of candidates in the 3 cells forming the ALS
I will be bumping it up above the 5.4 rating possibly 5.5 because as it stands now it would catch most naked quads that have a bivalue cell anyway!

Example:
Code: Select all
+-------------------+-------------------+-------------------+
| 2     36789 3678  | 1     36    49    | 5     479   4789  |
| 1369  13689 5     | 489   36    7     | 1249  1249  489   |
| 179   4     178   | 589   2     59    | 6     179   3     |
+-------------------+-------------------+-------------------+
| 8   1-267-9 167   |%579   4    %259   |%29    3     567-9 |
| 379   2379  4     | 6    *57    1     | 8     2579  79    |
| 679   5     67    |3-79   8     239   | 249   24679 1     |
+-------------------+-------------------+-------------------+
| 4     1367  2     | 357   9     356   | 13    8     56    |
| 1356  1368  1368  | 2     15    346   | 7     14569 469   |
| 13567 1367  9     | 347   157   8     | 134   1456  2     |
+-------------------+-------------------+-------------------+
WXYZ wing 238 (doubly linked) ALS r4c467 2579 and  bivalue r5c5 57
5,7 are 2 restricted commons ==> r5c2<>2<>9 r5c9<>9 r7c4<>7


HintExplanation: Show
WXYZ-Wing 238
The four cells r4c4, r4c6, r4c7 and r5c5 form a double-linked WXYZ-Wing: The three cells r4c4, r4c6, and r4c7 form an almost locked set linked to the bivalue cell r5c5 through both values 7 and 5. Regardless of the final value of cell r5c5, the double-link would force the other 3 cells from the pattern to have different values to that one. The 4 different values will be in 4 cells therefore forming a locked set.
Other occurrences of any of the values of the Wing pattern can therefore be removed from any cells sharing a row, column or block with all Wing cells containing that value.
The largest cell of the wing has 3 candidtaes and all 4 cells of the WXYZ-Wing pattern have a total of 8 candidates.


I'm just finalising things then will upload to repository and update you
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Help With Sudoku Explainer

Postby tarek » Tue Oct 08, 2019 4:51 pm

I will introduce this WXYZ wing with a base rating of 5.5 and will squeeze the technique just higher than Hidden Quad (Jellyfish in the new scheme of rating)

The difficulty rating will also increase depending on the number of candidates in the bigger 3 cell ALS (minimum of 6 candidate maximum in theory of 12 candidates)

the difficulty rating will also increase depending on the number of candidates in the largest cell. the fewer, the more difficult (in theory all cells could be bivalue which is more difficult spot as a 4 node WXYZ wing compared to when there is a cell with 4 candidates where you would think of WXYZ wing when spotted.

The technique name will be followed by a number with the form "ABCc": A=1,2 depending of the links between the bivalue cell and the 3 cell ALS, B=2,3,4 depending on the size of the largest cell and Cc which is the number of candidates in the 3 cell ALS (6-12) … It will be unlikely to have a 3 cell ALS with candidates over 10.

I'll give an example of how rating works for these wings in the Revision of SE ratings threadhttp://forum.enjoysudoku.com/revision-of-se-ratings-and-resolution-rules-t36376.html

tarek

[Edit: I changed my mind about the rating. I decided on a different way of rating WXYZ wings where the rating would be 5.5 normally except if the largest cell in the wing has 3 candidates. This pattern would be tougher to spot as a WXYZ wing and therefore has a rating of 5.6]
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Help With Sudoku Explainer

Postby tarek » Tue Oct 08, 2019 11:10 pm

The following are puzzles with double linked WXYZ wing techniques all rated 5.5-5.6
Code: Select all
..7....3...9..62.723.4...8...1.9..4....624....9..8.7...1...7.959.83..1...4....3..
..4.3.8...........9..628..77...4...24.92.57.882.....56...........74931..1.......4
4..9.5..8..7.1.3.....4.3....7..3..6..2.6.1.9..5..4..1....7.4.....5.2.4..1..3.6..7
.6.291.3..........2..567..1.25...98.1.......2.4.6.9.1..52.8.46.....5.......9.6...
6.....4.3.....791.....3..56...37..9...54.13...1..89...78..1.....362.....5.1.....8
2...1...7.4..5......9.3.15....54....3629..........38....4..7.2...7...5849......7.
8....2.4..9..........16.7...49..6..3..62....5.57..1..8...42.5...2.......9....3.6.
73.56..1.9.....263.......8.4....7...8...4...9...3....1.1.......524.....8.8..91.35
8...4....9.52.8.......5.8.1....9.5.32.4...9......6.4.2....2.7.54.19.7...6...3....
....8..32.8.3.2..9.....56...9....26.1...7...5.34....8...94.....6..2.1.9.27..9....


One of the puzzles above includes this gorgeous move:
Code: Select all
+----------------+----------------+----------------+
| 8    1236 236  | 1367 4    1369 | 236  5    79   |
| 9    136  5    | 2    17   8    | 36   37   4    |
| 7    4    236  | 36   5    369  | 8    239  1    |
+----------------+----------------+----------------+
| 1    678  678  | 4    9    2    | 5    678  3    |
| 2  36-7-8 4    |%1378 %17  5    | 9  16-7-8 %78  |
| 5    379  379  |-1-378 6   *13  | 4    178  2    |
+----------------+----------------+----------------+
| 3    89   89   | 16   2    16   | 7    4    5    |
| 4    5    1    | 9    8    7    | 23   23   6    |
| 6    27   27   | 5    3    4    | 1    89   89   |
+----------------+----------------+----------------+
WXYZ-Wing 248
*:r6c6 %:r5c459 --> r5c28<>7<>8, r6c4<>1<>3
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Help With Sudoku Explainer

Postby tarek » Wed Oct 09, 2019 11:16 pm

Also added my version of VWXYZ wing now …

WXYZ wing (including double linked version): Rating 5.5-5.6
VWXYZ wing (including double linked version): Rating 6.2-6.4
APE is now redundant and can be disabled for more difficult puzzle ratings.

The SE version with these techniques is on branch "newTechniques" in the repository. It will be pulled to "Master" soon.

The following puzzles are generated by SE all of which have a double linked VWXYZ wing and rated 6.2-6.4
Code: Select all
..2..13.....62....6....7....4..3..2..2.4....53.1..6.875...........3.9..8....62.91
.4..5...13...9..6...6....35....72..676.5..8.....6.8.......2.1.3.73....9.8.29..6..
..2.....4........85..3....27.4.836.5..8..6.2..56..24.....2...9.93..68........7...
.9...46....3..1...5...8...39....6248.........7349....63...1...2...6..3....98...7.
4..6........8...296..9.3..816.7.4.9.......24...9......5...7......3...........9.12
3.5..9....2....6..67..1..4545.2......1...5........3...9.23..5........4.77....4.8.
9...52.....6..8....8..914.....5.....8.4.67.3.679.2...5..8...16.....4.78......9..3
.57...1.......4..52.....96..6..39..1...86...3.1..27..81.....57......2..9.43...8..
..7.5..9....7..2.6..1..874...89.24...7.3....8....87.1...6..51.48...4....21.......
9..2....8......19..6..9..25.358..2.............2..475.85..4..6..43......7....3..2
........1.52..3...89..4.3...1..58.2..3..915.....4......6.....4...9.6578.......1..
3...1...5...9.2.....2.5.7..18.....572.64.51.875.....69..1.8.6.....3.1...8...9...1
...6.89.5.6.....488....5...7..4....2..9...4..1....3..6...1....395.....7.2.37.6...
..8........284....64...9....3.45.2...1.7.8.3...7.23.4....9...85....819........7..
8....192..6..3..5....9.5..8..7...2...3......95.8...74.1..6.38..37...4.....9.1...6
....98..3.286............7..4...1...56..74...97...5.41.8.....3.1..3....5......2.4
...51..8.....789....3....74.1.7823.............7365.1.45....8....185.....3..91...
4....6...7.9...1..8....3.57.....1.8....89...6..6.....4...18.3......52.....1.4....
.174..6.......85.168......3.4..7...6...8.1...1...9..2.3......178.23.......1..539.
..7.....48....3.6.2.4.5.1.......7.95...632...67.5.......9.6.3.2.5.2....67.....8..
.....84.2.....4.5.3.....6.8.78....96.9.71....1.6.2.....1.9.5.....5.42......3..8..
3...2..81.....92.6..25...4...49...2.5...8...4.2...51...8...46..7.96.....26..9...5
..5.91.4....5......24....5..56..3..8.176..4...48..9..3.79....3....1.......1.42.8.
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Help With Sudoku Explainer

Postby tarek » Sat Oct 12, 2019 9:45 am

I've now added a satisfactory wxyz-wing and vwxyz-wing (different and better than sunny-shine's implementation) to the Master branch of the repository and should be available in the next release. These when used would make the APE technique redundant.

I'm adding now the easy to spot versions of finned sashimi x-wing (including mutant & franken) ... Which you are all aware come under the names ("Skyscraper" "2-String kite" and "Turbot fish"). essentially taking advantage of 2 strong links connected by a weak link

I'll start with sunny-shines implementation and work on it from there as I'm not sure what I'll end up having! The result with wxyz and vwxyz were very good and I'm hoping this would be the same.

If there is a list of all the SE puzzles showing Turbot fish (ER=6.6) then it would be helpful for testing reasons.

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

PreviousNext

Return to Interactive games

cron