.
Here's some update of my work on generating rules.
Generation is now complete: I've found a solution to my printed output problem and all the rules associated with the (630-38) patterns are now generated in such a way that they can produce fully detailed information about their output (an ORk relation), adapted to each puzzle.
An example of the output is available in the Puzzles section:
http://forum.enjoysudoku.com/350-in-mith-s-63137-t-e-3-min-expands-t40902.htmlI had to make some decisions, e.g. about how to assign priorities:
- impossible patterns are looked for after W2 and S3 (this may change in the future, but it's unlikely);
- patterns with fewer cells are looked for before patterns with more cells this (may change in the future if some patterns appear to be more useful than others);
- all these patterns are looked for after Tridagon (this may change in the future, but it's very unlikely);
- patterns with the same number of cells are looked for in no particular order (this may change in the future if some patterns appear to be more useful than others);
- rules don't allow degenerate forms of the patterns, i.e. missing candidates (this will not change);
- parametric ORk chain rules based on them (the rules that do the real elimination job) are generic and they are used at their place in the rules hierarchy, defined by their length and independent of the internal complexity of the ORk-relation they use (this will not change).
Notation: a pattern in eleven's 630 list is mentioned as EL<xxx>c<yyy>, where <xxx> is the number of cells in the pattern and <yyy> is its place in the original <xxx> list.
When an ORk relation based on such a pattern is found, it appears as e.g.:
EL13c259-OR2-relation for digits: 2, 4 and 9
in cells (marked #): (r3c5 r1c2 r1c4 r2c7 r2c1 r2c6 r5c2 r4c7 r4c1 r4c5 r6c7 r6c3 r6c5)
with 2 guardians (in cells marked @) : n6r2c7 n1r6c5- Code: Select all
+----------------------+----------------------+----------------------+
! 12489 249# 3 ! 249# 5 6 ! 7 128 149 !
! 249# 5 7 ! 1 8 249# ! 2469#@ 23 3469 !
! 12489 6 2489 ! 3 249# 7 ! 5 128 149 !
+----------------------+----------------------+----------------------+
! 249# 8 1 ! 6 249# 3 ! 249# 7 5 !
! 56 249# 56 ! 249 7 8 ! 1249 123 1349 !
! 7 3 249# ! 5 1249#@ 1249 ! 249# 6 8 !
+----------------------+----------------------+----------------------+
! 35689 7 5689 ! 89 169 159 ! 136 4 2 !
! 2469 249 2469 ! 7 3 1249 ! 8 5 16 !
! 234568 1 24568 ! 248 246 245 ! 36 9 7 !
+----------------------+----------------------+----------------------+
Cells "in the pattern" are automatically marked with a # and cells with a guardian are automatically marked with a @
Chain rules appear in standard nrc notation, with the prefix EL<xxx>c<yyy>-OR<k>-<chain-type>[<chain-length>], e.g.:
EL13c259-OR2-whip[3]: OR2{{n1r6c5 | n6r2c7}} - b9n6{r7c7 r8c9} - r8n1{c9 .} ==> r6c6≠1I've started to run all these rules + Tridagon on a small part of mith's larger collection of 158,276 T&E(3) min-expand puzzles. I have concentrated on puzzles with a smaller W+OR5W rating when the 630 patterns are activated (Tridagon being always activated).
It's too early to provide interesting results, but it already seems that:
- a lot of ORk-relations are found, but most of them have large numbers of guardians; this has led me to restrict the relations to 6 guardians, but this is a parameter that can be changed by the user in the config file;
- some patterns appear much more often that others. Indeed, in 1000 puzzles, I've seen only a few lead to effective eliminations;
- one might have wondered if adding 3*(630-38) = 1176 resolution rules to SudoRules would crash it. But no; most of the puzzles tried until now are solved in a few seconds.
Notes:
- the factor 3 is for the activation rule, the original pattern and the diagonally symmetric pattern
- the activation rule is lightweight
- the other two rules have complex conditions, about 3*<xxx> conditions if the pattern has <xxx> cells.
If you're interested in more examples with these patterns, see the puzzles I'll propose in the puzzles section when I find noteworthy ones.
[Edit, Feb 20, 2023]: I changed the order of components in the printed form of ORk-relations, so that the order is consistent with the generic one of ORk-chain rules: they will now be printed as:
EL<xxx>c<yyy>-OR<k>-relation
instead of the previous: OR<k>-EL<xxx>c<yyy> relation
My old posts in the Puzzles section will not be changed.
This is just a cosmetic change, with no bearing on understandability.
.