Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.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: OK 0.038 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'subject:based': 0.07; 'url:pypi': 0.08; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'column': 0.28; 'assuming': 0.28; 'url:ie': 0.32; 'implement': 0.32; "can't": 0.32; 'header:User-Agent:1': 0.33; 'to:addr:python-list': 0.33; 'from:addr:yahoo.co.uk': 0.34; 'someone': 0.34; 'header:X -Complaints-To:1': 0.34; 'help,': 0.35; 'sets': 0.35; 'url:python': 0.36; 'run': 0.37; 'but': 0.37; 'received:org': 0.37; 'some': 0.38; 'possible.': 0.39; 'url:org': 0.39; 'received:78': 0.39; 'did': 0.39; 'to:addr:python.org': 0.40; 'exact': 0.68; 'tough': 0.82; 'received:as13285.net': 0.84; 'row,': 0.84; 'sum': 0.88 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Blockheads Oi Oi Subject: constraint based killer sudoku solver performance improvements Date: Thu, 26 Jan 2012 18:21:18 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-78-147-187-230.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 X-Antivirus: avast! (VPS 120126-1, 26/01/2012), Outbound message X-Antivirus-Status: Clean X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1327602104 news.xs4all.nl 6933 [2001:888:2000:d::a6]:40917 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:19495 I have a working program based on [1] that sets up all different constraints for each row, column and box and then sets exact sum constraints for each cage. It'll run in around 0.2 secs for a simple problem, but a tough one takes 2 hours 45 minutes. I did some research into improving the performance and found [2] but can't work out how to implement the constraints given. Can someone please help, assuming that it's even possible. [1] http://pypi.python.org/pypi/python-constraint/1.1 [2] http://4c.ucc.ie/~hsimonis/sudoku.pdf -- Cheers. Mark Lawrence.