Sudoku solver

Chris Angelico rosuav at gmail.com
Fri Mar 27 05:25:30 EDT 2015


On Fri, Mar 27, 2015 at 8:07 PM, Frank Millman <frank at chagford.com> wrote:
> There seems to be disagreement over the use of the term 'trial and error'.
> How about this for a revised wording -
>
> "It should be possible to reach that solution by a sequence of logical
> deductions. Each step in the sequence must uniquely identify the contents of
> at least one cell based on the information available. Each time a cell is
> identified, that adds to the information available which can then be used to
> identify the contents of further cells. This process continues until the
> contents of all cells have been identified."
>
> Any puzzle that cannot be solved by this method does not qualify as a true
> Sudoku puzzle.

That's reasonable wording. Another way to differentiate between the
"trial and error" that we're objecting to and the "logical deduction"
that we're liking: Avoid backtracking. That is, you never guess a
number and see if the puzzle's solvable, and backtrack if it isn't; at
every step, the deductions you make are absolute certainties.

They might, in some cases, not result in actual result numbers (you
might deduce that "either this cell or that cell is a 2"), but it's a
certainty, based solely on the clue numbers given.

ChrisA



More information about the Python-list mailing list