Hi denis_berthier,
Thank you for your interest and kindness to confirm my explanation.
denis_berthier wrote:1) what you call "logic operation" is the application of three kinds of rules:
- propagation of elementary constraints (direct contradictions)
- singles
- locked candidates (also called pointing/claiming, basic interactions, or whips[1] in my approach)
Let me call T this set of rules.
"logic operation" is the application of some kinds of rules.
To explain "some kinds of rules", I use the terms in the following page.
http://www.sudocue.net/guide.php "some kinds of rules" include:
Naked Singles, Full House, Hidden Singles, Squeezing, Cross-Hatching,
(I suppose direct contradictions and singles mean above rules.)
locked candidates
Disjoint Subsets
Some kind of coloring technique using strong/weak link chain
a technique using a vector between a pair of candidate( "If A is eliminated, then B must be eliminated")
As for this theme, I had to respond to the following comment.
eleven wrote:(where only singles and locked candidates are used as "solving techniques").
But I didn't. I'm very sorry.
denis_berthier wrote:2) You're implicitly defining two closely related notions by mutual recursion: the rating R of a puzzle P and the rating R of a candidate (I use the same name for both as there can’t be any confusion)
Let P be a puzzle
2_1) apply repeatedly to P all the rules in T until quiescence, thus obtaining a puzzle P1 (with both decided values and candidates)
2_2) if P1 is solved, define R(P) as 0 (or 1 ???)
2_3) otherwise, define R(P) as the weighted average of the R ratings of the (yet undecided) candidates in P1, where the weight for each candidate C in P1 is the inverse of the number of candidates in the same cell as C, [*** for efficiency reasons, this is limited to candidates C in cells with the smallest number of candidates in P1, say n];
2_4) for each candidate C in P1 [restricted by ***], create a new puzzle P1(C) by adding C as a value and then applying repeatedly all the rules in T until quiescence; define the rating R of C as follows:
2_5) if P1(C) is solved then R(C) = n (this case allows no conclusion, all the candidates in the same cell must be tried)
2_6) if P1(C) displays a contradiction, i.e. a cell with no possible value, then R(C) = 1 (this case allows the elimination of C)
2_7) otherwise, define R(C) as R(P1(C)), where the latter is computed by applying recursively the above procedure [or are you adding anything else ("from assumption to the above stage"?]
[tknottet add numbers from 2_1) to 2_7) for referring.]
(That’s guaranteed to converge)
Thank you very much for better framework of description.
Before I rewrite the description with your framework, I would like to emphasize that R(P) is statistical expectation of "how many times T is applied form first quiescence until determined solved/displaying a contradiction". I don't think of eliminating candidates. If a contradiction is found, another candidate in the same cell is tested.
Followings are my description with your framework.
Let P be a puzzle
2-1)apply repeatedly to P all the rules in T until quiescence, thus obtaining a puzzle P1 (with both decided values and candidates) [no change]
2-2)if P1 is solved, define R(P) as 0. [not 1]
2_2+)if P1 displays a contradiction, define R(P) as 0. [for the use in applying recursively]
2_3) otherwise, define R(P) as the weighted average of the R ratings of the (yet undecided) candidates in P1, where the weight for each candidate C in P1 is the inverse of the number of candidates in the same cell as C, (*** for efficiency reasons, this is limited to candidates C in cells with the smallest number of candidates in P1, say n);
[no change]
2_4) for each candidate C in P1 [restricted by ***], create a new puzzle P1(C) by adding C as a value and then applying repeatedly all the rules in T until quiescence; define the rating R of C as follows:
[no change]
2_5) if P1(C) is solved then R(C) = R(P1(C))+1. [changed; R(P1(C))=0 by 2_2). +1 is count of until getting P1(C).]
2_6) if P1(C) displays a contradiction, R(C) = R(P1(C))+1 + R(C_S) + (1+R(P1(C_C))/2
C_S is the candidate in the same cell as C such that (directly or after applying rules recursively) determined as the big number of the cell
C_C is the other candidate in the same cell as C (in case of n=2 no C_C exists, in case of n=3 only one C_C exists)
[changed; my rating program calculates the statistical expectation under the condition that if a candidate(C) is selected as a starting candidate to be added as a value, the next candidate after finding contradiction is selected in the same cell as C. So try and error continues until C_S is selected and evaluated. The probability that C_C is selected before C_S is 1/2.]
2_7) otherwise, define R(C) as R(P1(C)), where the latter is computed by applying recursively the above procedure.
After the procedure, R(C) is calculated by the equation in 2_5) or 2_6) for each case.
[added: equation depends on the final results (solved/contradiction)]