Contents
Some terminology to help with the hints
Since I’m dealing with irregular shaped sudokus, I don’t usually use terms such as “Row”, “Column” and “Box”. Instead I refer to all of these as “Shapes”. I find that keeping the terminology general actually simplifies the understanding and greatly simplifies the programming. This is all illustrated in the 2 diagrams, below:
Solutions
All problems have a unique solution which can be generated using just 4 algorithms, see below
Algorithms
#1. Only one possible location in a Shape
Checks all possibilities in all Cells of all Shapes. If there is a possibility that exists in only one Cell in a Shape then it must be a solution for that Cell.
This simulates the normal approach to solving Sudoku problems by hand.
#2. Only 1 possibility in a Cell
Checks in each Cell to see how many possibilities remain. If only one then that must be the solution for that Cell.
This is the hard work approach of crossing out all possibilities if solving a Sudoku by hand.
#3. N possible solutions in N Cells in a Shape
Checks in each Shape for groups of 2 Cells each with the same 2 possibilities. These possibilities can be removed from all other Cells in this Shape. Then repeats for groups of 3, 4,… Cells containing the same 3, 4,… possibilities.
#4. Intersection of Overlapping Shapes
Check Cells which are in the intersection of 2 Shapes. If there are any possibilities which occur in the intersection but nowhere else in one of the Shapes then these possibilities can also be removed from all Cells in the second Shape except those in the intersection.
This can be difficult to visualise, especially if one of the shapes is not a square box, e.g. 3X3. The shapes are highlighted in colour in the hints.