sudokuSoft analyticalEngine
I'd like to share my work with you. I'm interested to know what you --- the reader --- make of my work, and my conclusions.
The sudokuSoft analyticalEngine.
I've used sudoku puzzles ---published in local and national newspapers, books and websites --- to test the development and coding of a sudoku puzzle solver application I'm scripting. I'm using the Swift programming language within Apple's Xcode scripting environment. I call my sudoku puzzle solver application The sudokuSoft Analytical Engine.
The analyticalEngine software automatically solves and analyses any sudoku puzzle, including those with more than one solution. The analysis it generates shows a step-by-step route from initial conditions through to solution outcome using six algorithmic methods. It can also solve very tough puzzles which require more powerful algorithmic methods.
The six methods I have developed and implemented in the software, I label as followed:
(1) Markup;
(2) Fetch Unique Integer;
(3) Fetch Hidden integer;
(4) pairPurge;
(5) singleBlockPurge; and
(6) Nudge
Solving a Sudoku puzzle begins with the mark up stage of the puzzle solution (algorithm method 1).
Markup finds all possible numbers in void cells by compiling a database derived from row, column, and 9x9 cell box initial condition information (the board). This database comprises the missing integers on which the puzzle's solution relies.
Next, the software exhausts a search for single integers in void cells in each row, column and box using the markup database. Specifically, there are two sorts of single integer search. There is a search for a unique integer, and a search for a hidden integer.
A unique integer is a single integer in any markup cell (Fetch Unique Integer algorithm; method 2). A hidden integer is a single integer hidden among more than one integer in any markup cell (Fetch Hidden integer algorithm; method 3).
The sudokuSoft Analytical Engine searches next for identical pair-pair sets in any row, column and box, and deletes all identical pair-pair set integers from the same row, column and box markup cells (pairPurge algorithm; method 4).
Next, the sudokuSoft package is set to undertake a second exhaustive search for single integers in cells in row, column and box generated by the application of the search for identical pair-pair sets (methods 2 and 3). The sudokuSoft package again undertakes a second exhaustive search for identical pair-pair sets, and deletes all identical pair-pair set integers from the same row, column and box (pairPurge algorithm; method 4).
Finally, the sudokuSoft package searches for identical single-pair sets in any row, column and box, and deletes all identical single-pair set integers from the same row, column and box (singleBlockPurge algorithm; method 5).
The sudokuSoft package is set to iterate these methods until the puzzle is solved. Most valid sudoku board puzzles are solved by iterating the application of the first five methods. Easier puzzles are usually resolved and solved using the first three methods. More difficult puzzles are solved using method 4. Tougher puzzles require application of method 5.
But, a few boards will remain unresolved by exhaustive application of these first five algorithms. These boards require an additional method. And there is debate about whether this additional sixth method is a method at all. Some say it is only a guess.
I have written code to emulate a guess. I call this additional sixth method a nudge because it searches out a key integer pair which unlocks the board and enables solution.
Most puzzles in books, newspapers and websites have one solution which does not involve a guess. I want to say: sudoku puzzles which involve a guess are not valid sudoku puzzles.
What do you, the reader, think?
Do you want to beta test the sudokuSoft analyticalEngine?
If you do, then contact me.