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: 4620
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: 4620
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: 4620
Joined: 19 June 2007
Location: Paris

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

Postby denis_berthier » Wed Oct 22, 2025 5:08 am

.
Today's update on GitHub has three parts:

1) Update CLIPS:
Allow to use version 6.3 (as before) or version 6.4 - on any machine.
To launch the right version for your machine, choose the application with name clips<version><machine>, with
<version> := -63 | -64
<machine> := -arm | -x86 | .exe
in both cases, beware: "-" (hyphen) or "." (dot).

2) Introduce external programs: SHC, GSF, SER, FPGX (all the programs used in addition to SudoRules for the calculations in [HCCS3]).
Also includes a few operating system or basic C functions, such as:
- conversion from Windows to Unix format, delete first line of a file....
- delete duplicates in a file (also works for very large file),
- filter lines of a file according to some criterion (e.g. = some rating or ≥ some rating)
(I've developed the latter two in order to accelerate the initial pure CLIPS versions.)

3) Introduce a whole family of CLIPS functions allowing to call the most usual functions of the above programs in a way independent of any OS (very useful in the EXPANSION kit).
As there's no way to know the OS from within CLIPS, the OS must now be specified at the start of the configuration files.
.
denis_berthier
2010 Supporter
 
Posts: 4620
Joined: 19 June 2007
Location: Paris

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

Postby denis_berthier » Mon Oct 27, 2025 5:24 am

.
Someone noticed that, when you use version 6.4 of CLIPS, an error message appears during the initial loading phase:
Code: Select all
ERROR:
(deffunction MAIN::union$
   (
[DFFNXPSR2] /Users/berthier/Projects/CSP-Rules/CSP-Rules-V2.1/CSP-Rules-Generic/UTIL/CLIPS-utils.clp, Line 54: Deffunctions are not allowed to replace external functions.

ERROR:
(deffunction MAIN::intersection$
   (


Don't worry about it: this is normal. Functions union$ and intersection$ didn't exist in version 6.3 of CLIPS and I had to define them. As they already exist in version 6.4, the message says their re-definition is blocked. It doesn't change anything in the workings of any of the CSP-Rules applications.
.
denis_berthier
2010 Supporter
 
Posts: 4620
Joined: 19 June 2007
Location: Paris

Previous

Return to Software