Levels | ![]() |
---|
This article explains the Levels in the logic puzzle solver. The solver invokes each level to find Marks, and only when a level is complete will it move on to the next level. While levels are used to find marks, Laws are invoked on the mark to (1) validate the mark, and (2) find additional marks based on the current mark. Before you continue, please read the article on Facts. The levels are explained using the example logic puzzle "Five Houses".
Level 1 examines one fact at a time to enter one or more marks. It starts with facts of type 1 (where the link is "with"), moves on to facts of type 2, then examines facts of type 3 and 4. Type 1 facts always yield exactly one mark, while the other types of facts usually yield more than one mark. Our example puzzle, along with most puzzles, does not have type 2 facts.
Below are the facts of type 3 or 4.
Level 2 examines two facts at a time to enter one or more marks. It looks at two facts at a time where the links for both facts have the same noun type Logic puzzles that benefit from this level include: "Circus Anniversaries", "Fancy Footwear", "Hello Dolly!", "Mixed-Up Mythology", "The Seven Wives of Henri VII", "Six Fearsome Heroes", and "Witnesses".
Level 3 examines all facts at a time to enter one or more marks. It is for difficult puzzles such as "Hello Dolly!" and "The Seven Wives of Henri VII".
Level 4 is the level of last resort. If a logic puzzle cannot be solved with its facts and rules, then assumptions must be made. Usually assumptions are necessary for difficult puzzles. If the program makes an assumption, then later finds a contradiction or violation, the program must undo the assumption, and make another one. Even when the program finds a solution, it will undo the last assumption it made to see if there is another solution. The program will proceed in this manner until all possibilities have been exhausted. If there are multiple solutions, this usually means the puzzle was not properly designed and/or implemented (i.e., I made a mistake!).
For more information, please read the article on Assumptions.