.
CSP-Rules user wrote:In the "Augmented User Manual", you list the ORk-Forcing-Whips, ORk-Contrad-Whips and ORk-Whips among the generic chains. But how can they be generic if they depend on the Sudoku pattern you call "anti-tridagon""?
To be more precise, I consider that
ORk-chains are generic parametric chain rules.
Generic means that they can be formulated in general CSP terms (according to the CSP logic language introduced in [CRT] and unchanged in [PBCS]), with no application-specific reference. You can check their abstract definition, you can check their CSP-Rules code: you won't find any reference to Sudoku, Kakuro... (e.g. to rows, columns, blocks, numbers...).
Parametric means their actual use depends on some application-specific ORk-relation - an anti-tgridagon pattern in the case currently under study on this forum, but it could also be some UR pattern or Shye's pattern...
Granted, the "parameter" in question in the ORk-chains is not of the most usual type for a parameter, i.e. numeric. It's an abstract logical ORk-relation. But this idea shouldn't be too surprising for programmers who heard of parametric data types.
So, to be still more precise, CSP-Rules has ban abstract "template" (same as a C struct) ORk-relation, with fixed "slots" (i.e. C fields) independent of any application:
- Code: Select all
(deftemplate ORk-relation
(slot OR-name (type SYMBOL)) ; example: Trid;
(slot OR-size (type INTEGER) (default 0)) ; k
(multislot OR-candidates) ; the set of candidates related by an ORk relation
)
The ORk-chain rules are written in such a way that each chain may use such an abstract template once in a place where a CSP-Variable would normally appear. In the rule formulation, the ORk template appears no more and no less abstract than the CSP-Variables. And all of this is totally useless if not fed with the proper fuel, i.e. application-specific data.
In the case of CSP-Variables, they are defined by each application (in Sudoku, I've always defined them as abstraction for the 2D-cells (rc-, rn-, cn- and bn- cells) I introduced in [HLS 2007]). They are the same for any puzzle for that application (for fixed size parameters).
In the case of ORk-relations, they can't be defined
a priori:
- they depend on which type of ORk-relation one wants to consider;
- they depend on each puzzle and, contrary to fixed CSP-Variables, they appear "dynamically", i.e. during resolution.
Which ORk-relation you want to consider is defined in the application configuration file. Currently, there's only one possibility: anti-tridagons. You allow it by setting:
- Code: Select all
(bind ?*Anti-Tridagons* TRUE)
When you do this, the rules that allow to detect anti-tridagon relations and to assert them as ORk-templates (with the conventional name "Trid") will be loaded.
If you also load some of the ORk-chains rules, e.g.
- Code: Select all
;;; 2.3.3) Use ORk-Forcing-Whips in combination with Anti-Tridagons:
(bind ?*OR5-Forcing-Whips* True)
;;; 2.3.3) Use ORk-Contrad-Whips in combination with Anti-Tridagons:
(bind ?*OR5-Contrad-Whips* True)
;;; 2.3.4) Use ORk-Whips in combination with Anti-Tridagons:
;;; (Remember that ORk-Whips[n] => ORk-Contrad-Whips[n] => Tridagons)
(bind ?*OR5-Whips* True)
;;; 2.3.5) Use ORk-Contrad-G-Whips in combination with Anti-Tridagons:
(bind ?*OR5-Contrad-G-Whips* True)
;;; 2.3.6) Use ORk-G-Whips in combination with Anti-Tridagons:
(bind ?*OR5-G-Whips* True)
they will eventually have some concrete anti-tridagon relation to fill up their abstract ORk-templates.
Note: in order to use ORk-chains in an application (e.g. SudoRules), you need both the generic ORk-chains and some application-specific rules that allow to assert concrete ORk-relations.
One additional remark.
ORk-relations are ultra-persistent and this is a generic property. It means that the rules for guaranteing ultra-persistency are expressed in a way independent of any application.
.