For the time being, I have not that much to do in the solver. All known puzzles are cracked and hardest puzzles producers have some difficulties to pass Golden Nugget.
So I am working on improving the solving solutions and preparing a personal web site (already opened with a French draft in construction) to describe, in addition of the method, the programming options and to deliver the sources(C+).
Doing so, I thought over how to explain in an easier way the solutions of hardest puzzles.
I will make a trial in two posts,
That one will develop a model of the tagging process in “rules” and “constraints”. The second one will explain thru drawings the solving process for hardest steps.
Model used in taggingTo build that model, we need specific definitions:
Candidate: any potential digit that can still be part of the solution in a cell; (nothing new, just for the next topic)
Group of candidates: a set of candidate having a solving potential. In a group of candidates, at most one is valid. Most common groups will be:
The candidates of one digit belonging to two units,
The candidates of one digit belonging to an ALS, an AHS …..
Any set of candidates belonging to a cell.
Like super candidates here after, groups of candidates validation does not lead generally to a fix, but at least provides a clearing of candidates
Super Candidate: any potential group of digits that could change an unlocked set in a locked set.
I applied the concept of super candidate to sets with four unknown digits, two of them valid, this is I think the general definition for super candidates in that process.
The set of digits can have several patterns in the unlocked set.
Strong and weak link:We use the standard definition of strong and weak link /inference. We only need an extension based on the basic definition:
Strong link between two entities: One has to be true (valid), only one is true (valid)
Weak link between two entities: if one is True (valid), the other one is False (not valid)
Chains: We will use two chains
Chain of strong links: That well known chain is used in the tagging procedure. Thru Chain of strong links: we define useful tags and associated tags (at least the collection at the start of the process)
AICs (Alternate inference chains): we are using such chains with tags. They have exactly the same properties as the AICs made of candidates.
The canonical AIC in the full tagging process has a weak link at each end. This is not the preferred form in other methods.
Any canonical AIC defines a distant weak link using both ends. In drawings, a canonical AIC will be shown as a line Bold Blue
Tag: A tag is a kind of container having the following properties
1) If the puzzle solution makes one component True (valid), all components are True (valid).
2) If the puzzle solution makes one component False (not valid), no components is True (valid).
3) If two tags have one component each having a strong link with the other one, any component of the first tag has a strong link with any component of the other tag.
4) If two tags have one component each having a weak link with the other one, any component of the first tag has a weak link with any component of the other tag
Rules 1) and 2) is the
equivalence relation with the short
==The smallest tag has one known Tag component (the smallest Tag component is a candidate)
With such a set of rules, a tag can be used in a chain in place of any component.Tag component (TC):A tag Component is any entity that complies with tag specifications;
A candidate; a group of candidates, a super candidate are tags components.
If a tag candidate is proven valid, we have at least some clearing of candidates. In the best case, we have one or several fix.
In the future, other TCs could be added. As long as they fulfill the tag requirements, there is no problem.
One tag component can enter one and only one tag. If it happens during the process that two tags (or two tags components of different tags) have an equivalence link, this means that we have open one tag container in excess. One must be emptied and all tag components put in the other. This has been called a merging of tags.
Although this can happen due to imperfect tagging procedure, new equivalences are normally generated by Nice loops.
Associated tag :We have the associated tag of a tag if both are linked by a strong link relation:
We can also say that there is a strong link between associated tags
Most often, such a relation is marked using upper case lower case letters.
If the tag is represented by a candidate, we will use the ~ sign to indicate the associated tag.
If 5r1c2 is a candidate, ~5r1c2 is the tag associated to the tag in which r1c2 is included.
Choice: A collection of tags where one and only one is valid.
Native choice: A choice where tags are represented by candidates, groups or super candidates expressing a basic choice.
Candidates of a cell are forming a choice,
Row, column or box candidates of the same digit (groups authorized) are forming as many choices as you can find combining candidates and groups including all candidates with no overlapping,
AC (almost cell) components (the groups of candidates of the same digit for the unknown digits) are forming a choice.
AC2, components (the couple tags still valid.) are forming a choice.
=======================
These definitions are too general to generate a solving process . The scope is too large, it must be reduced thru constraints. The constraints are given to create an homogeneous set of tags and choices, leading to clearing of candidates.
We have several examples of constraints:
Ground level:We want chains crossing exclusively row, columns and boxes, We use bi values of candidates of the same digit in rows, column and boxes. Groups are authorized (candidates of the same digit belonging to two units). No choice activated.
Level oneSame as ground level, adding cells in chains and bi values in cells.
Level “T “ chainsThis should be validated by Denis, but for me, the first “T” chain set would have been:
Ground zero without groups, plus level one, Choices (cells only ??) and groups of candidates complementary to any isolated candidate.
Meantime, the scope has been extended.
I have in mind to create a similar level in the solver to facilitate comparisons..
Level twoLevel one plus ALS AHS plus choices (cells and on digit in one unit)…….
Rules applied to a group of candidatesWe will consider a group of candidates and the candidates belonging to the group.
Rule 1: A candidate in weak link with a group of candidates is in weak link with any of the candidatesRule 2: If a candidate in weak link with each of the candidates of a group, it is in weak link with the group.Rule 3: If two groups of candidates are in weak link each candidate of the first group is in weak link with each candidate of the second one.This is trivial, but good to keep in mind. The same rules can be written with strong links and extended to tag components and tags..
Example of application of these rules :- Code: Select all
a
___________b
/___________c
X____________d (a,b,c,d are the candidates of a cell)
Let’s assume a,b,c,d is a the list of candidates in a cell or the tags associated to theses candidates.
‘X’ is a tag and each line means that we have a canonical AIC linking X,b X,c and X,d respectively. If we define a tag ‘Y’ for the group (b;c;d) Applying the rules, we can say that
X and Y are in weak link. But Y is complementary to a, so we should have identified the group as tagged A
Nothing more to say about the model. Next psot will develop drawings