Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed4.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: UNSURE 0.233 X-Spam-Level: ** X-Spam-Evidence: '*H*': 0.62; '*S*': 0.09; 'patterns': 0.04; 'subset': 0.09; 'cc:addr:python-list': 0.11; 'posted': 0.15; 'define,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'heads.': 0.16; 'optional': 0.16; 'subsequently': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'error.': 0.37; 'little': 0.38; 'does': 0.39; 'generating': 0.39; 'though,': 0.39; 'called': 0.40; 'easy': 0.60; 'tell': 0.60; 'maximum': 0.63; 'talking': 0.65; 'capable': 0.67; 'mar': 0.68; 'difficulty': 0.68; 'analysis': 0.75; 'trial': 0.83; '2015': 0.84; 'algorithm,': 0.84; 'checks.': 0.84; 'choose.': 0.84; 'step,': 0.84; 'thing,': 0.91; 'to:none': 0.92; 'besides,': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=DFR1Ia0xXI7CDor+rjRVKdAdZWfIW19tzZDNrLGoGps=; b=0G+W/xwRsf3/pwVdlOXMFgHEAo1KdkdJ8tv7E/wVCzL8aSkPvKsjZimdKCxt4a1Rph vLPVqlYx10OVWXqT/GbFpQFGcaEUw+W1yMpgPHnDrz8mtNlj4/niNJDYuHUYULWcdE1I LxHa+poNIdGVukoOSLphODQfMkN3+aRDKbxJ9g3gTYO+4nzzxgN3t1h8cRNjGEVqWwOd nrBh/TIA23F1pv4Cc1ssQ8Dna4iwQzqybe41JHQPvCbdq5f/VLeOF+aklrF/4trkKX6H VO2nugPPbnsDb0wyRPq5J8oVfI6hLpWFGFmpXqxCUAvgt06+YfIPCIdxmHtXAuveClK7 AlNQ== MIME-Version: 1.0 X-Received: by 10.42.159.132 with SMTP id l4mr44173323icx.59.1427465248197; Fri, 27 Mar 2015 07:07:28 -0700 (PDT) In-Reply-To: <87twx6lf15.fsf@elektro.pacujo.net> References: <87r3sdnw5t.fsf@elektro.pacujo.net> <87fv8sndw1.fsf@elektro.pacujo.net> <551557B3.5090102@davea.name> <87twx6lf15.fsf@elektro.pacujo.net> Date: Sat, 28 Mar 2015 01:07:28 +1100 Subject: Re: Sudoku solver From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Fri, 27 Mar 2015 15:10:40 +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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1427465441 news.xs4all.nl 2915 [2001:888:2000:d::a6]:48295 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:88162 On Sat, Mar 28, 2015 at 12:56 AM, Marko Rauhamaa wrote: > "Frank Millman" : > >> So what I am talking about is called a "satisfactory" puzzle, which is >> a subset of a "proper" puzzle. > > That is impossible to define, though, because some people are mental > acrobats and can do a lot of deep analysis in their heads. What's > satisfactory to you may not be satisfactory to me. > > Besides, looking for "satisfactory" patterns can involve a truckload of > trial and error. Not really. I already gave a broad generation algorithm, capable of generating puzzles at any difficulty you choose. (Well, maximum difficulty. If you tell it "generate HARD puzzles", it might still generate a MEDIUM or EASY one. But you could post-filter for that.) The only back-tracking required is at the last step, where it seeks to minimize the number of clue digits - an optional step, and one that involves very little backtracking. I think you subsequently posted code which does broadly the same thing, but without the difficulty-class checks. ChrisA