The hardest sudokus (new thread)

Everything about Sudoku that doesn't fit in one of the other sections

Re: The hardest sudokus (new thread)

Postby denis_berthier » Wed Aug 16, 2023 10:02 am

hendrik_monard wrote:Hi Denis,
After publishing my list yesterday I noticed that there was a duplicate on position 3. I have removed it through an Edit. It is possible therefore that, if you downloaded the list before my Edit, each number in your list should be decreased by 1. Sorry for this inconvenience.

Hi Hendrik
The list I've used has 384 puzzles (and its 3rd puzzle is missing from your corrected list). It must therefore be the old one.
So, yes, all my numbers in my list should be decreased by 1 for your new list.
denis_berthier
2010 Supporter
 
Posts: 3977
Joined: 19 June 2007
Location: Paris

Re: The hardest sudokus (new thread)

Postby mith » Thu Aug 17, 2023 5:45 pm

denis_berthier wrote:
mith wrote:The expanded database is around 1.07M puzzles, up from 847k last update, all of which are depth 3 (I do calculate the exact depth just in case this somehow generates a depth 4, but I am very confident that no such puzzle exists).
...
The minimal database is around 4.57M puzzles, of which 897 have an 11.8+ expanded form. I run neighborhood searches on these; the resulting puzzles don't need to be minimal, instead I check depth, and if depth 3 expand them first and check against that database.

I think you meant:
- the expanded database is around 1.07M puzzles, up from 158,276 last update
- the minimal database is around 4.57M puzzle [up form 847k last update)

Or did I miss some update?


The 158276 count is for min-expands last update; 847k is the whole database. Don't have a count of min-expands in the current database (and won't until I stop all the current scripts to do the update), but probably the proportion of them isn't wildly different. Will be close to 200k I expect.
mith
 
Posts: 950
Joined: 14 July 2020

Re: The hardest sudokus (new thread)

Postby mith » Thu Aug 17, 2023 5:50 pm

Have stopped a couple of the generator scripts in preparation for an update. serate will probably be caught up by the weekend, and I'll stop the scripts fully at that point.
mith
 
Posts: 950
Joined: 14 July 2020

Re: The hardest sudokus (new thread)

Postby mith » Thu Aug 17, 2023 5:52 pm

(Also need to check hendrik's latest list for additions and run the scripts on those.)
mith
 
Posts: 950
Joined: 14 July 2020

Re: The hardest sudokus (new thread)

Postby Paquita » Fri Aug 18, 2023 11:01 am

Hi champagne, glad to be back.

I tried SErate on the minlex and maxlex versions and it does the same as PGE : the minlex version gets a higher rating. So I want to switch to minlex and try if some of my previous 11.8 become a 11.9. I use skmpp for maxlex with the 312 option, but I can't find the documentation and I wonder if skmpp has a minlex option?
Paquita
 
Posts: 72
Joined: 11 November 2018

Re: The hardest sudokus (new thread)

Postby champagne » Fri Aug 18, 2023 2:05 pm

Paquita wrote:Hi champagne, glad to be back.

I tried SErate on the minlex and maxlex versions and it does the same as PGE : the minlex version gets a higher rating. So I want to switch to minlex and try if some of my previous 11.8 become a 11.9. I use skmpp for maxlex with the 312 option, but I can't find the documentation and I wonder if skmpp has a minlex option?

Hi Paquita,
The minlex was already available in several programs as GridChecker, so I did not duplicate it in skmpp.

Regarding the possible deviation in morphs for the rating, I see no reason to have the highest rating with a specific morph.

And again, if reaching a high SER rating (he highest!!) became a game, it remains for me a way to detect puzzles having specific properties, and to find the potential hardest.
champagne
2017 Supporter
 
Posts: 7363
Joined: 02 August 2007
Location: France Brittany

Re: The hardest sudokus (new thread)

Postby mith » Fri Aug 18, 2023 2:48 pm

Paquita wrote:Hi champagne, glad to be back.

I tried SErate on the minlex and maxlex versions and it does the same as PGE : the minlex version gets a higher rating. So I want to switch to minlex and try if some of my previous 11.8 become a 11.9. I use skmpp for maxlex with the 312 option, but I can't find the documentation and I wonder if skmpp has a minlex option?


As champagne says, there's not any reason to expect a particular morph would be higher or lower than a particular other morph. The differences tend to be due to a bug that depends in some subtle way on how it treats that particular step.

IIRC PGE has a fix for this at some version? We've just stuck with SE 1.2.1 for consistency. But eventually I may consider re-rating all the 11.6+ (or whatever cutoff; could try to put the cutoff at the DFC+DFC level but there is overlap between this and DFC+MFC) without the bug (and possibly without uniqueness?).

That's a big project with the depth 3 database. There are over 200k expanded forms with ER>=11.6 (and I expect all or almost all depth 3 expanded forms would be if uniqueness were disabled), vs. ~10k minimals in the old ph-style database (up from 601 in ph2010 specifically). SER being a bottleneck is another reason it would be good to make this distributed somehow.
mith
 
Posts: 950
Joined: 14 July 2020

Re: The hardest sudokus (new thread)

Postby Paquita » Fri Aug 18, 2023 3:05 pm

Hi champagne

I found a minlexer.

Is it a game to find hard puzzles? To me, yes, or else, a quest. It is a thrill when a high rate pops up in my script results.

I know, we are searching for the reasons why puzzles are hard.
One thing I noticed is that among the hardest puzzles some solutions occur quite often. For the about 50.000 high rated puzzles I selected there were 33625 different solutions, the highest occurence was 53 times the same solution. It can be a result of vicinity search or maybe there are solutions that create harder puzzles. The patterns of givens on the other hand are not in clusters that occur often.

Anyway right now I am puzzled by some rating results. If I rate minlex instead of maxlex, some 11.8 become 11.9. But some other 11.8 become 11.7.
Also, when I rate minlex minimals derived from rated expanded minlex puzzles, if the expanded have 11.9, the minimals sometimes are 11.8. This is against my expectation that a minimal puzzle has less information so would be potentially harder. (I use PGE for rating now, skfr does not work on my newer processor anymore).

It would be nice, when searching for the hardest puzzles, if the rating would not show such glitches. Not just because the search is a game, but also to have a stable, reliable rating method that can define what is hardest.
Paquita
 
Posts: 72
Joined: 11 November 2018

Re: The hardest sudokus (new thread)

Postby Paquita » Fri Aug 18, 2023 3:07 pm

Mith

SErate has the same bug as PGE
Paquita
 
Posts: 72
Joined: 11 November 2018

Re: The hardest sudokus (new thread)

Postby denis_berthier » Fri Aug 18, 2023 4:02 pm

Paquita wrote:One thing I noticed is that among the hardest puzzles some solutions occur quite often. For the about 50.000 high rated puzzles I selected there were 33625 different solutions, the highest occurence was 53 times the same solution. It can be a result of vicinity search or maybe there are solutions that create harder puzzles. The patterns of givens on the other hand are not in clusters that occur often.

Vicinity search has an obvious impact. Probably much higher than what you observed, if you have tested equality of solutions instead of isomorphism.
I don't know for patterns of givens, but patterns in the usual sense occur very often: sk-loops in the ph database, tridagons in mith's database...Obviously, such patterns are much more stable under vicinity search than patterns of givens.

Paquita wrote:Anyway right now I am puzzled by some rating results. If I rate minlex instead of maxlex, some 11.8 become 11.9. But some other 11.8 become 11.7.
Also, when I rate minlex minimals derived from rated expanded minlex puzzles, if the expanded have 11.9, the minimals sometimes are 11.8. This is against my expectation that a minimal puzzle has less information so would be potentially harder. (I use PGE for rating now, skfr does not work on my newer processor anymore).
It would be nice, when searching for the hardest puzzles, if the rating would not show such glitches. Not just because the search is a game, but also to have a stable, reliable rating method that can define what is hardest.

Mith wrote:SErate has the same bug as PGE

Such problems of SER have been known for quite a long time.
Unfortunately, it's not a programming bug in SE (or at least not only that). It's before all a conceptual bug.
Sudoku Explainer is not based on a set of resolution rules.
SE "rules", i.e. (dynamic)-contradiction-(forcing)-chains, are not resolution rules in the precise sense I've given to this expression: due to their counting of "nodes", i.e. of inference steps, they can't be written as pure logic formulae. From this and from the arbitrary thresholds in the numbers of nodes defining the SER levels, "rules" at some SER level don't have the confluence property: as a result, different paths can lead to different ratings. Isomorphisms may imply different paths...
The only ratings/classifications I know of that don't have this problem are those I've defined (B, gB, SB and BB ratings and T&E-depth)
SER is useful to give an idea of difficulty. Don't expect of it more than it can provide.

There's no unique rating that could define what's hardest. You always have to specify hardest wrt what.

.
denis_berthier
2010 Supporter
 
Posts: 3977
Joined: 19 June 2007
Location: Paris

Re: The hardest sudokus (new thread)

Postby Paquita » Fri Aug 18, 2023 4:50 pm

Denis

Can we use your rating methods? Do you have or know of a tool to rate puzzles with your classifications?

(As for T&E, I can't get SudokuClassicMinLex to work. Building asks for a python3.8.lib and I have python38.lib. After renaming it builds, but won't run, giving an error that seems to be about lib versions. Python does run but the import from the rust lib is rejected. Now I don't know what to do next, either recreate the rust project or rewrite the rust code. I am not familiar with rust so either way it is going to take longer time).
Paquita
 
Posts: 72
Joined: 11 November 2018

Re: The hardest sudokus (new thread)

Postby champagne » Fri Aug 18, 2023 4:52 pm

Paquita wrote:Mith

SErate has the same bug as PGE


Serate (dated 2005 I think) has problems. Some can be called "bugs" some are voluntary limits decided by the inventor to maintain the run time in reasonable limits. A third group could be discussed in the UR handler.

The small deviation in the rating of different morphs in the high ratings belongs to the second category. This is something I already often had to write. In the low ratings, the search of a contradiction is exhaustive. In the very high ratings, it is not. As a consequence, if the order of the candidates in the search is changed, the process can be stopped with a different rating. This is what happens with different morphs. Which morph will give the highest rating is unpredictable;

One thing is granted, SERATE has been so intensively used that all these oddities are well known.
champagne
2017 Supporter
 
Posts: 7363
Joined: 02 August 2007
Location: France Brittany

Re: The hardest sudokus (new thread)

Postby denis_berthier » Fri Aug 18, 2023 5:43 pm

Paquita wrote:Denis
Can we use your rating methods? Do you have or know of a tool to rate puzzles with your classifications?

With SudoRules (https://github.com/denis-berthier/CSP-Rules-V2.1), you can compute:
- the T&E-depth of any puzzle
- the W, B, gW or gB rating of any puzzle în T&E(1)
- the BpB classification of any puzzle in T&E(2)
- various ratings of puzzles in T&E(3)
How to use it is explained in full detail in the Manual.

However, it's slow if you want to use it on large collections. Which didn't prevent me from rating millions of puzzles.
I'm currently talking with Defise for making his solver available for such ratings - it has less functionalities than SudoRules,but it is faster.

Paquita wrote:(As for T&E, I can't get SudokuClassicMinLex to work. Building asks for a python3.8.lib and I have python38.lib. After renaming it builds, but won't run, giving an error that seems to be about lib versions. Python does run but the import from the rust lib is rejected. Now I don't know what to do next, either recreate the rust project or rewrite the rust code. I am not familiar with rust so either way it is going to take longer time).

I installed it on my Mac for testing; it worked after some change; but it remains useless to me as there's no script for files of puzzles.
denis_berthier
2010 Supporter
 
Posts: 3977
Joined: 19 June 2007
Location: Paris

Re: The hardest sudokus (new thread)

Postby mith » Mon Aug 21, 2023 10:33 pm

I'm intending to get all my scripts on github, so that at least won't be an issue much longer.

serate finished for the current batch, will be checking new puzzles posted here next.
mith
 
Posts: 950
Joined: 14 July 2020

Re: The hardest sudokus (new thread)

Postby mith » Mon Aug 21, 2023 11:27 pm

Doesn't look like any new ones in JPF's, Paquita's, or hendrik's lists (as far as singles expanded forms). The first two in JPF's have the same expanded form which did not appear in my most recent update (but has been found since), so I'll update the credit on those. It has four minimals total:

Code: Select all
..............1..2....3..14..5.......67.....831..687...7165.....8..13...6.38.7.5.|........1....23.4...5..6....576..4.814.....766.8...51..81.6...456...8..77.4......|JPF|forum-20230814|26|1|1|1|1
..............1..2....3..14..5.13....1678....73.5.6.8..67.....53.1.7.6..58.......|........1....23.4...5..6....576..4.814.....766.8...51..81.6...456...8..77.4......|JPF|forum-20230814|26|1|1|1|1
........1.....2.34.23.4.56.......6....56.7....6...8....56....2.24.1..3.53.1....4.|........1....23.4...5..6....576..4.814.....766.8...51..81.6...456...8..77.4......|mith||26|1|1|1|1
........1....23.4...5..6.....7...51...86..4.714.....86.71.6....56...7..88.4......|........1....23.4...5..6....576..4.814.....766.8...51..81.6...456...8..77.4......|mith||26|1|1|1|1


Here's the output of this check script (only run on puzzles which are depth 3, so if there are any missing from your posts that's why).
google doc

Hopefully publish the minimals will help avoid some of the overlap :)
mith
 
Posts: 950
Joined: 14 July 2020

PreviousNext

Return to General