My solver / Looking for new strategies to implement

Programs which generate, solve, and analyze Sudoku puzzles

Re: My solver / Looking for new strategies to implement

Postby MAGREMENT » Tue Dec 05, 2023 9:54 pm

Version 1.2.0 is out !

-Added MSLS (works only for basic n Rows x m Columns structures for now)
-ALS algorithm speed improvements (around 20%)
-Removed "Step by Step" option. This option is now represented by 2 buttons under the grid : "Solve" and "Advance".
-Added buttons above the strategy list to quickly enable/disable every strategy

-Added strategies-specific options => They are visible on the "Strategy Manager" page when you click on a strategy in your list. The only option for now is for Aligned Triple Exclusion but I will populate theses options as time goes.

-Greatly improved the "Full Scan" function. There is now the "Choose step" button under the grid in the "Solver" page. If you click on it, a new window will open with every step possible in the
current puzzle allowing you to see all of them and choose which one you want.

https://github.com/MAGREMENT/SudokuSolver/releases/tag/v1.2.0
Last edited by MAGREMENT on Thu Dec 07, 2023 1:44 am, edited 2 times in total.
MAGREMENT
 
Posts: 62
Joined: 20 October 2023

Re: My solver / Looking for new strategies to implement

Postby creint » Wed Dec 06, 2023 7:23 pm

Code: Select all
.----------------------.---------------------.----------------------.
| 1       478    34578 | 3567   3689   5678  | 3489    369    2     |
| 238     9      378   | 4      12368  12678 | 138     5      368   |
| 23458   248    6     | 1235   12389  1258  | 7       139    3489  |
:----------------------+---------------------+----------------------:
| 2468    5      1478  | 9      1246   3     | 128     1267   678   |
| 234689  12468  13489 | 126    7      1246  | 123589  12369  35689 |
| 2369    1267   1379  | 8      5      126   | 1239    4      3679  |
:----------------------+---------------------+----------------------:
| 7       148    14589 | 1235   12348  12458 | 6       239    3459  |
| 456     3      145   | 12567  1246   9     | 245     8      457   |
| 45689   468    2     | 3567   3468   45678 | 3459    379    1     |
'----------------------'---------------------'----------------------'


Missing the exclusions of digit 4 in box 4, rowlink can be reduced to boxlink.

If you can bind ctrl-v to the paste grid, it would even be better.
creint
 
Posts: 395
Joined: 20 January 2018

Re: My solver / Looking for new strategies to implement

Postby MAGREMENT » Thu Dec 07, 2023 12:08 am

creint wrote:Missing the exclusions of digit 4 in box 4, rowlink can be reduced to boxlink.


I'm sorry but I don't see it ?

creint wrote:If you can bind ctrl-v to the paste grid, it would even be better.


Will do
Last edited by MAGREMENT on Thu Dec 07, 2023 1:49 am, edited 1 time in total.
MAGREMENT
 
Posts: 62
Joined: 20 October 2023

Re: My solver / Looking for new strategies to implement

Postby MAGREMENT » Thu Dec 07, 2023 1:43 am

v1.2.1 is out !

-Sue-De-Coq definition broadened => + 50% eliminations

-Bug fixes :
a) When modifying the puzzle directly, the log before and after state were the same
b) Highlighting page number was not correctly shown in the "Choose Step" window

-Quality of life
a) Modifying the grid candidates whithout solving is now possible
b) Added a cancel button in the "Choose Step" window, which does the same thing as closing the window but is easier to user
c) Clicking on a step already highlighted in the "Choose Step" window will now stop highlighting it
d) Binded Copy/Paste to CTRL+C/CTRL+V

https://github.com/MAGREMENT/SudokuSolver/releases/tag/v1.2.1
MAGREMENT
 
Posts: 62
Joined: 20 October 2023

Re: My solver / Looking for new strategies to implement

Postby yzfwsf » Thu Dec 07, 2023 1:49 am

MAGREMENT wrote:I'm sorry but I don't see it ? If I paste this puzzle into Hodoku, the first elimination made is by Brute Force

The fourth line's link 4 covers the truth located in the minirow, so 4s in box 4 can be elimianted .
yzfwsf
 
Posts: 914
Joined: 16 April 2019

Re: My solver / Looking for new strategies to implement

Postby MAGREMENT » Thu Dec 07, 2023 1:51 am

yzfwsf wrote:
MAGREMENT wrote:I'm sorry but I don't see it ? If I paste this puzzle into Hodoku, the first elimination made is by Brute Force

The fourth line's link 4 covers the truth located in the minirow, so 4s in box 4 can be elimianted .


I'm sorry I'm stupid I thought he was talking about a box-line reduction. I'll look into it
MAGREMENT
 
Posts: 62
Joined: 20 October 2023

Re: My solver / Looking for new strategies to implement

Postby MAGREMENT » Thu Dec 07, 2023 1:56 am

Is it the 4 in r5c2 or are there other 4's that should be eliminated ?
MAGREMENT
 
Posts: 62
Joined: 20 October 2023

Re: My solver / Looking for new strategies to implement

Postby yzfwsf » Thu Dec 07, 2023 2:12 am

If you delete link 4r4 and then add link 4b4, it does not affect the rank of the structure, making it easier to understand the elimination logic.
yzfwsf
 
Posts: 914
Joined: 16 April 2019

Re: My solver / Looking for new strategies to implement

Postby MAGREMENT » Thu Dec 07, 2023 2:14 am

Okay I think I understand now, you meant box 4 as in the SK-Loop 4th box and not the Sudoku 4th box.

That was confusing
MAGREMENT
 
Posts: 62
Joined: 20 October 2023

Re: My solver / Looking for new strategies to implement

Postby yzfwsf » Thu Dec 07, 2023 2:51 am

We are talk about MSLS.
Image
MSLS:16 Cells r2468c1379, 16 Links 38r2,48r4,39r6,45r8,26c1,17c3,12c7,67c9
19 Eliminations:r5c37,r7c3<>1,r5c17,r3c1<>2,r2c5<>3,r5c123,r48c5<>4,r8c4<>5,r5c19,r9c1<>6,r1c3<>7,r2c56<>8

Your MSLS miss 3 elimations for 4 in box 4.
yzfwsf
 
Posts: 914
Joined: 16 April 2019

Re: My solver / Looking for new strategies to implement

Postby MAGREMENT » Thu Dec 07, 2023 3:18 am

yzfwsf wrote:We are talk about MSLS.


Saying that from the start would've made me not look as stupid lmao
MAGREMENT
 
Posts: 62
Joined: 20 October 2023

Re: My solver / Looking for new strategies to implement

Postby MAGREMENT » Thu Dec 07, 2023 11:30 am

v1.2.2 is out !

-Added Disjoint Sector Subsets
-When finding an MSLS, the solver will now search for alternative links and apply eliminations accordingly

-Bug fixes :
a) Precomputed componenents would not be cleared correctly when trying to solve and not finding any step, leading to wrong steps found if a puzzle was restarted
b) Clicking on the "Solve" button while reviewing a log would not clear the highlighting of the log

https://github.com/MAGREMENT/SudokuSolver/releases/tag/v1.2.2
MAGREMENT
 
Posts: 62
Joined: 20 October 2023

Re: My solver / Looking for new strategies to implement

Postby creint » Thu Dec 07, 2023 8:21 pm

[quote="creint"]
Code: Select all
.----------------------.---------------------.----------------------.
| 1       478    34578 | 3567   3689   5678  | 3489    369    2     |
| 238     9      378   | 4      12368  12678 | 138     5      368   |
| 23458   248    6     | 1235   12389  1258  | 7       139    3489  |
:----------------------+---------------------+----------------------:
| 2468    5      1478  | 9      1246   3     | 128     1267   678   |
| 234689  12468  13489 | 126    7      1246  | 123589  12369  35689 |
| 2369    1267   1379  | 8      5      126   | 1239    4      3679  |
:----------------------+---------------------+----------------------:
| 7       148    14589 | 1235   12348  12458 | 6       239    3459  |
| 456     3      145   | 12567  1246   9     | 245     8      457   |
| 45689   468    2     | 3567   3468   45678 | 3459    379    1     |
'----------------------'---------------------'----------------------'


Thanks for the paste support.
Yes forgot to mention the MSLS

Paste
MSLS only checked
Choose step
App crash
creint
 
Posts: 395
Joined: 20 January 2018

Re: My solver / Looking for new strategies to implement

Postby MAGREMENT » Thu Dec 07, 2023 11:31 pm

Thanks for notifying me about this bug. I forgot to make a copy of a variable. Anyways, should be fixed for the next update
MAGREMENT
 
Posts: 62
Joined: 20 October 2023

Re: My solver / Looking for new strategies to implement

Postby MAGREMENT » Fri Dec 08, 2023 4:11 am

I've just finished implementing ALC into my solver and I have two questions.

Is there a limit to the number of candidates in the pattern ? (ie, Are quads or more valid ?)

My solver doesn't find the pattern that often (3% of the time for pairs and 0.5% of the time for triples) and I don't know if the pattern is just quite rare or if my code is bad. Could someone provide me a list of instances of ALC ?
MAGREMENT
 
Posts: 62
Joined: 20 October 2023

PreviousNext

Return to Software