Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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: OK 0.167 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.67; '*S*': 0.00; 'python,': 0.02; 'binary': 0.07; 'rows,': 0.09; '(within': 0.16; 'clues': 0.16; 'for,': 0.16; 'force.': 0.16; 'non-trivial': 0.16; 'playful': 0.16; 'solver': 0.16; 'wrote:': 0.18; 'solution.': 0.20; 'written': 0.21; 'header :User-Agent:1': 0.23; 'satisfying': 0.24; "i've": 0.25; 'header :In-Reply-To:1': 0.27; 'tried': 0.27; 'rest': 0.29; 'chris': 0.29; 'am,': 0.29; 'wonder': 0.29; 'code': 0.31; 'page.': 0.31; 'minor': 0.31; 'probably': 0.32; "we're": 0.32; 'run': 0.32; 'quite': 0.32; 'sense': 0.34; "i'd": 0.34; 'could': 0.34; 'problem': 0.35; 'but': 0.35; 'there': 0.35; 'really': 0.36; 'so,': 0.37; 'starting': 0.37; 'being': 0.38; 'sometimes': 0.38; 'machines': 0.38; 'others.': 0.38; 'to:addr:python-list': 0.38; 'short': 0.38; 'heard': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'how': 0.40; 'even': 0.60; 'read': 0.60; 'solve': 0.60; 'then,': 0.60; 'identify': 0.61; 'new': 0.61; 'back': 0.62; 'name': 0.63; 'story': 0.63; 'our': 0.64; 'different': 0.65; 'charset:windows-1252': 0.65; 'realized': 0.68; 'received:74.208': 0.68; 'experiment': 0.84; 'hard.': 0.84; 'solvable': 0.84; 'technically': 0.84; "they'd": 0.84; 'boxes,': 0.91; 'hundred': 0.95; 'ranking': 0.96 Date: Thu, 26 Mar 2015 11:03:16 -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> <55141449.1030600@davea.name> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:zFWH1sVAl6UfF0i9PhkedvwDus34mdej35MJ0K/kbfDyuqkllzj PlYA93lxTxa+1hM2cK1g8dqA7hygMwsRdYIP+M/jsmT68VVEbDZDYW5jIi6PyFckIdfKPdN 6pwiPq4Zju+YrB1iLIiCv1DQb5FsEQgf8Z2TsMVA5lPsy/aeekt6hrhC8bBfgE2VfAdyPLm PcdyeqeOHg514QAGYjgUQ== X-UI-Out-Filterresults: notjunk:1; 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: 40 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1427382215 news.xs4all.nl 2949 [2001:888:2000:d::a6]:34090 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:88059 On 03/26/2015 10:41 AM, Chris Angelico wrote: that's already been proven. So, that's why I would avoid guessing. > > I've written a lot of solvers for various puzzles. Minesweeper, > Sudoku, a binary Sudoku-like puzzle that I don't really have a good > name for, several others. Every time, I've tried to prove the puzzles > solvable by humans, and sometimes that means rejecting ones that could > technically be solved by brute force. OK, we're on the same page. I would use different terminology for some of it, but that's okay. The purist in me would like to write a solver which (within a few seconds) could solve any unique puzzle, and identify puzzles which don't have a unique solution. One reason I never got back to writing one was I also wanted a difficulty-ranker, which would identify how hard a human was likely to consider the puzzle. Had I been writing it in Python, I'd probably have pursued adding brute force, and then used some of the code to write a puzzle-generator. But even then, the problem of ranking was one that had me buffaloed. It's clearly not enough to count the starting clues (eg. easyness = (clues - 17) * pi ) And writing an efficient program that generates a non-trivial puzzle would seem to be quite hard. I've heard it said that Sudoku puzzles generated by machines are much less satisfying than those generated by a human. When in a playful mood, I wonder if all the Sudoku puzzles out there are just permutations of a few hundred written by Will Shortz. Swap around rows, columns, boxes, and cryptogram the digit mapping. Voila, a new puzzle. i read a short story about the purpose of jokes, in which it said there were only a few hundred of them, the rest were just minor variants, and that they were an experiment being run on human beings. And once we realized it, they'd shut off our sense of humor. -- DaveA