projects skfr-fast-rating and sudoku-multi-purpose-program

Programs which generate, solve, and analyze Sudoku puzzles

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby champagne » Wed Jul 08, 2026 9:59 am

Hi "yzfwsf",

all my shared code is in repositories located here

for sure I intend to open in due time a new repository for the DLL to build.

So far, I did not see enough external interest to do it, so I continue to draft the code in my last solver.
If you want to work on the clone in the range Er 1.0 to 7.5, I can change the priorities and setup a first version of the repository when this is ready.
This would give you the opportunity to see what has to be changed to use it in Sukakus rating.

The area 6.5 to 7.5 has a common property. All ratings are based on AIC (chains or cycles). I try to have a similar way to find them in all cases.
I am first checking each SE level, but the code is designed to work faster (as somehow in skfr) when a bigger ER has been seen.
champagne
2017 Supporter
 
Posts: 7948
Joined: 02 August 2007
Location: France Brittany

Y loops Y chains

Postby champagne » Fri Jul 24, 2026 6:41 am

Sudoku Explainer has one thing I intend to change in the area of AICs.

For X AICs and XY AICs, SE looks for loops and chains.
For Y AICs, SE looks only for loops, but cleans all side effects similar to a chain elimination.

Here is an example

Code: Select all
|1  8   5  |2   9  7  |3  6  4 |
|6  2   7  |8   4  3  |9  5  1 |
|9  3   4  |15  15*6  |2  8  7 |
+++++++++++++++++++++++++++++++
|2  16  16*|45  7  45 |8  9  3 |
|3  5   8  |9   6  1  |4  7  2 |
|47 47  9  |3   8  2  |5  1  6 |
+++++++++++++++++++++++++++++++
|8  46  36*|7   35*45 |1  2  9 |
|47 9   13*|146 2  8  |67 34*5 |
|5  147 2  |146 13*9  |67 34*8 |


To clean 1r8c4, 19c2 SE uses the loop of the cells r9c5 r9c8 r8c8 r8c3 r4c3 r7c3 r7c5 r3c5 r9c5
8 cells with the indirect effect that ~1r9c5 -> 1r8c3

This is easier and shorter to see using only the first four cells r9c5 r9c8 r8c3 r8c3

~1r9c5=3r9c5 ~3r9c8=4r8c8 ~4r8c8=3r8c8 ~3r8c3=1r8c3

IMO, it makes sense here to apply the same rule for X AICs, Y AICs, XY AICs.

To stay in line with other choices, I’ll apply a 0.1 penalty to chain against loop.

This often will not change the rating, but can lower by 0.1 the new rating, and more (switch form XY chain to Y chain if we have no Y loop) in some cases


I Hope to close this area in the next days.
champagne
2017 Supporter
 
Posts: 7948
Joined: 02 August 2007
Location: France Brittany

SKFR2 DLL repository

Postby champagne » Wed Aug 12, 2026 3:48 am

I know that I am now very slow, but the time to open the new repository is there

https://github.com/GPenet/skfr2

This is the repository for the second version of Sudoku Fast Rating skfr.

This is a dirty and partial code that I share with the hopeless attempt to build a team to finish the work and optimize the task. I’ll likely continue coding alone, what will take more time.

The released code is partially tested, but with still a lot of work to do.

The current draft covers ratings from 1.0 to around 7.xx with more drafts in the area 7.5 to 8.5.

Releasing the draft sources of the DLL is also done to finish the design and test of the sukaku entries.

The DLL itself (and the user file to use it) is not yet in the repository
champagne
2017 Supporter
 
Posts: 7948
Joined: 02 August 2007
Location: France Brittany

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby champagne » Sat Aug 15, 2026 8:10 pm

I just added in the repository the .dll and .lib needed to use the DLL, currently limited to low ratings
The best expected for the end of the month is a tested rating limited to multi chains (range 8.2-8.x)

A c++ user file tells how to use it.
champagne
2017 Supporter
 
Posts: 7948
Joined: 02 August 2007
Location: France Brittany

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby yzfwsf » Sun Aug 16, 2026 2:06 pm

Is there an unfixed bug in SudokuExplainer's Y-Cycle implementation? The difficulty rating for the puzzle below differs from that of skfr, and an AI audit revealed a bug in the Y-Cycle logic.
Code: Select all
800000400000000092001204003000150000600300700050007040009000007040070030760001500
016009008900030400000700050003007005500010060000000109400008090060090800005000003
004030700050000040800200006000390002500000060002008100060009001019040080000603900
900070000070005010000100800004009002200600050000000700030000068400002000006040201
010034000200008009008500000300070020004009100000400005400600000030020801002003700
006400003000009020050080400010000006009000300300010070001050240400900600030000005
002000009080009100400080030030700604009005700700060090000030008060200300000004500
005097080490050000006100000600009030050060000007000001009002050070080006200500304
006800000300000090000560004090700100100000008003050070040007005802040009700030040
620000080000700320004080001000904007000000800007010040500030400006008050090051003
100200080030000009007001400300008010070600800008050004409003700003400000080070002
800500009030009000004060200060200500007010040900000002600300001003040800000002050
010004070800000500006005008000070200350006007004900050030007040000050000009800003
500070400060000009008003210100005700000010005000280060009001000270500800001000004
010080000000200060800004003040008001050400970900060200700090000003006004090800000
000000040700080009900000600005900000000010050080003700100029080004070100060300004
062100000000007090900060500010004200600000080709000000200400007005001900000050060
010600082500030004006000700100008090000050007009200000005002900700500600080070000
300400008070003000800070000700090050050030004006100900007050001000002390060300500
006050004100240000040001600500000000060010000002400300009600000010007090700005203
004600010050010008700000300500900007000002030002060800400070001007089240080100000
700008050000070800090400000006000702050040080800001500900800070601005004000030100
020090007019008300700200040007009200030500000400070000002060400000005003600400090
006000002012600090000004700000001004020930800009000010000040100090108020005000008
004080030500300100070005000060008001000070008045200900100006020007900000020000800
001600090200050100060041008006003800000800000300060007070020005008004009500300400
200800004003000000060004100050900600900030000006001000004080060080100400500006079
003000600800005001090100020070009300000200170006040002000000460300060000060900780
008000105030800200700060000900003500010070000000600001040000307270005000000200800
000006090005080400030190007400008010000010500003500000009700004800001000020060900
100209006006050070070000940060080010300000000005007009400090080080600000000003002
010200000000009300700080001500100200040030005003000000100500070020008003008020904
700200050020007001004000600080700006300010000900008000100500009003001007070030068
200008000070300006006070500080090630047002050600100000008000700090007000000200180
030009100900060080006004005004700200000031060050008000007080000080006010400000003
600000040000002000047650300070009400900070030006400005002080000090000000800901200
020080060008000100700500009500001907019070020002400005005010006000900200000004030
010000200000834060800050009090002003030060020000100900020300006008010000600009700
060000000700003060080020013010900007900050800003100050006008000100700090090030500
006590000400000800009100030050000080000070005300002610200000000001600200900003060
200604005040700010008010300300000006050060100009002480400080000001006040030000200
002060000600008007000100050006070003800900100070006080300004005045010000010200000
800050090010000000003000005001600900300009080060034052100800004040070000009000670
020008001009200008800070000005600000600503010040090007080700000500060090000001006
700200060040000902008006010000900001800007090090010480000001005003090040600300000
700004300000810000009200000050000060000050400800300200500090007060700000002008509
400900300007000000500004020100090002004007090030400100300020006002000015040700080
000600470000030020004701006006400001050000040090050000300900600060000003001002000
021700006700020040000000200070040000600900800008005002800400001010070060003001508
020000001100060200009000070002900005700003090300200010000080053007009800080300000
500600001004000060090007300040030050009002800000800200300080005005000100010079030
003000008050000070000090410502680000040030060001009004007010040100800900090007002
010080050009000700400700003504900002007005600060010040000600004800090000000002080
003050006040000501000100020000800002900010080007005900020000005300600000086002070
005008670010020003800000020000090006050300010200004000100000080000930400096000000
000005030900400050082010000000800403020060070008001006800050000006040007040200500
900200507060080000003009020000000009009050300000903060800000074006000200040712008
300008009090030005002504600007050030000002001050600700030006020001000006800300100
020050400400009010000200007090400000200010090007092005050001000900063002006700050
500790300002040006460200050040009000000100000000050400080000705100007009009030020
704200000005004080000060200010806007500003020009020000800090100007000040000000506
010003540504600070000090001005007800800000004090800050060020700103000020200001005
000000500060700008700050010010004003003500000070020900100070300039600050000205009
002070060730200900060000004040009306300080009001300050000607002007905000400000000
010040800500800000004001003000002040200000065090500100007100020800090700030007001
003090050700003004020500000062008100900060008007300040005002400090800001200070030
600500200030040006004001050090080001002060700700102040000000070006850000040000900
000070009600200084050000000100020900004800072080000030030060040000400006006051200
006800150000040009000005800004020000060500300100004020005100700030009010980000003
800300600070094000009000020001030000040700200200006003600500100000020030090001005
410005600009300005000074010000200300300000008080030070000008000050400090001020700

For this part, shouldn't `skfr2` align with `skfr` rather than the original SudokuExplainer?
yzfwsf
 
Posts: 978
Joined: 16 April 2019

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby champagne » Sun Aug 16, 2026 7:45 pm

yzfwsf wrote:Is there an unfixed bug in SudokuExplainer's Y-Cycle implementation? The difficulty rating for the puzzle below differs from that of skfr, and an AI audit revealed a bug in the Y-Cycle logic.
Code: Select all
800000400000000092001204003000150000600300700050007040009000007040070030760001500
...

For this part, shouldn't `skfr2` align with `skfr` rather than the original SudokuExplainer?



Hi "yzfwsf",

First of all, the forum availability is to-day very low, a true problem for the future.

Preparing a design for skfr2, I try to stay as close as possible to SE, but I feel confortable if I stay in a +/- .1 .2 deviation if this gives a faster implementation.

As I wrote earlier, I had a problem with the Y cycle in SE. No Y chain, but an extended analysis of eliminations possible with an Y cycle.

I had not seen the bug that you describe, and I do'nt intend to reproduce bugs of SE.

I'll have a look to-morrow to your file of puzzles.

And to be honest, I must say that we have started in private a shared analysis of this fresh code released in Git Hub , and that you came with an amazing AI audit of the process.
champagne
2017 Supporter
 
Posts: 7948
Joined: 02 August 2007
Location: France Brittany

Re: Y loops Y chains

Postby champagne » Mon Aug 17, 2026 7:39 am

After a quick look to the first items of the list, this seems covered by this recent post
champagne wrote:Sudoku Explainer has one thing I intend to change in the area of AICs.

For X AICs and XY AICs, SE looks for loops and chains.
For Y AICs, SE looks only for loops, but cleans all side effects similar to a chain elimination.
.......


The code is there, by not yet tested. should be available soon in the repository.
champagne
2017 Supporter
 
Posts: 7948
Joined: 02 August 2007
Location: France Brittany

NISHIO

Postby champagne » Tue Aug 25, 2026 3:00 pm

NISHIO variant

a 0.1 Deviation skfr to Sudoku Explainer in Nishio was relatively common. SE did not always find the shortest count.

To have a better chance to optimize the process, I’ll change slightly the rule with a possible +0.1 skfr2 to SE.

I’ll use the count of ‘on’ seen in the expansion steps as first filter to select the cases to check.

The chances to have a smaller final count with more ‘on’ is very small, but not null.
champagne
2017 Supporter
 
Posts: 7948
Joined: 02 August 2007
Location: France Brittany

Previous

Return to Software