CSP-Rules, SudoRules, KakuRules...

Programs which generate, solve, and analyze Sudoku puzzles

Re: CSP-Rules, SudoRules, KakuRules...

Postby denis_berthier » Fri Feb 14, 2025 12:34 pm

.
One function I forgot to document in the last version of the Manual is p-different-numbers-out-of-n ?p ?n

This allows e.g. to randomly extract puzzles from a collection:
(p-different-numbers-out-of-n ?p ?n) will produce a list of p different number within [1 n]

Then use: (extract-lines-in-list ?file-in ?file-len ?list ?file-out) , with
?file-in the original file of puzzles
?file-len the length of the previous file
?list the result if the previous function
?file-out the list of extracted puzzles

Combined in one function:
(extract-lines-in-list ?file-in ?file-len (p-different-numbers-out-of-n ?p ?file-len) ?file-out)

If you want to keep the order of the original file, use function p-different-ordered-numbers-out-of-n instead of p-different-numbers-out-of-n.
.
denis_berthier
2010 Supporter
 
Posts: 4592
Joined: 19 June 2007
Location: Paris

Re: CSP-Rules, SudoRules, KakuRules...

Postby denis_berthier » Fri Mar 14, 2025 9:41 am

.
Following my result here: http://forum.enjoysudoku.com/ur1-1-again-t37404-152.html, I've made minor changes in SudoRules priorities: they now allowi to raise the priorities of deadly patterns as high as before Singles (i.e. just at the start as the theorem requires in order to be able to apply with certainty), or immediately after Singles. However, the default value remains after S3 (Subsets of size 3), which remains IMO a good compromise between not missing a DP and not having too many guardians in the initial ORk-relations.
.
denis_berthier
2010 Supporter
 
Posts: 4592
Joined: 19 June 2007
Location: Paris

Re: CSP-Rules, SudoRules, KakuRules...

Postby denis_berthier » Wed Sep 03, 2025 5:42 am

.
Only minor changes this morning, to prepare the publication of the SudoRules EXPANSION kit.

I've also added the possibility of having external programs and I've included gsf's solver (in the XTERNS directory) as the first of them (It is used by the EXPANSION kit).
The way to use gsf is described in [HCCS2]. As of now, use it as an independent software (after compiling it as detailed in the "how to use" file).
The way to use it from within SudoRules, in particular in the EXPANSION kit, will appear in [HCCS3].

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

Previous

Return to Software