Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!newsfeed0.kamp.net!newsfeed.kamp.net!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.87.MISMATCH!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: UNSURE 0.311 X-Spam-Level: *** X-Spam-Evidence: '*H*': 0.38; '*S*': 0.00; "board's": 0.16; 'fits': 0.16; 'those,': 0.16; 'uniquely': 0.16; 'wording': 0.16; '(you': 0.16; 'wrote:': 0.18; 'meant': 0.20; 'seems': 0.21; 'rules': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'adds': 0.24; 'logical': 0.24; 'simpler': 0.24; 'least': 0.26; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'absolute': 0.30; 'cells': 0.31; 'consequence': 0.31; 'continues': 0.31; 'them?': 0.31; "we're": 0.32; 'run': 0.32; 'another': 0.32; 'fri,': 0.33; 'guess': 0.33; 'actual': 0.34; 'sense': 0.34; 'but': 0.35; 'there': 0.35; 'sequence': 0.36; 'method': 0.36; 'possible': 0.36; 'should': 0.36; 'error.': 0.37; 'list': 0.37; 'step': 0.37; 'to:addr:python-list': 0.38; 'fact': 0.38; 'pm,': 0.38; 'does': 0.39; 'structure': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'identify': 0.61; 'numbers': 0.61; 'entire': 0.61; 'simply': 0.61; 'further': 0.61; 'reach': 0.63; 'information': 0.63; 'term': 0.63; 'more': 0.64; 'charset:windows-1252': 0.65; 'direct': 0.67; 'between': 0.67; 'mar': 0.68; 'book.': 0.68; 'frank': 0.68; 'received:74.208': 0.68; 'trial': 0.83; '"it': 0.84; '2015': 0.84; 'disagreement': 0.84; 'given.': 0.84; 'received:74.208.4.194': 0.84; 'resorts': 0.84; 'step,': 0.84 Date: Fri, 27 Mar 2015 09:14:27 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Sudoku solver References: <87r3sdnw5t.fsf@elektro.pacujo.net> <87fv8sndw1.fsf@elektro.pacujo.net> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:WGsAPQ8aSY6SPrmliaK9/RCPBpnzrA/ifUskvJa/qg7P6nOnj90 YjoMazkgnmtTod7fQRsDBvzJPnIMOGjYLtp69jEz3UtKm0BOylTAW5JW3EGNUQ1TQ9vG4re lVi4wXIX3/wwPBYoUquQ2DwIRXvPrR6fkzjarRXaa7KFjpUg3tgfE8BybEpDIDKYLEsIWg9 ShvOndeRdXDXu0ztSFOxQ== X-UI-Out-Filterresults: notjunk:1; X-Mailman-Approved-At: Fri, 27 Mar 2015 14:15:24 +0100 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.19 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 46 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1427462125 news.xs4all.nl 2902 [2001:888:2000:d::a6]:38410 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:88149 On 03/27/2015 05:25 AM, Chris Angelico wrote: > On Fri, Mar 27, 2015 at 8:07 PM, Frank Millman 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. > I like that wording. It fits what I meant by trial and error. Frank: But now I have to disagree about "true Sudoku puzzle." As we said earlier, it might make sense to say that puzzles that cannot be solved that way are not reasonable ones to put in a human Sudoku book. But why isn't it a "true Sudoku puzzle"? Isn't the fact that one resorts to trial and error simply a consequence of the fact that he/she has run out of ideas for more direct rules and the data structures to support them? The simpler rules can be built around a list of possible values for each cell. More complex rules can have a more complex data structure for each cell/row/column/box. And when you run out of ideas for all those, you use guess and backtrack, where the entire board's state is your data structure. -- DaveA