Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19521 > unrolled thread

Re: constraint based killer sudoku solver performance improvements

Started byBlockheads Oi Oi <breamoreboy@yahoo.co.uk>
First post2012-01-27 07:47 +0000
Last post2012-01-27 07:47 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: constraint based killer sudoku solver performance improvements Blockheads Oi Oi <breamoreboy@yahoo.co.uk> - 2012-01-27 07:47 +0000

#19521 — Re: constraint based killer sudoku solver performance improvements

FromBlockheads Oi Oi <breamoreboy@yahoo.co.uk>
Date2012-01-27 07:47 +0000
SubjectRe: constraint based killer sudoku solver performance improvements
Message-ID<mailman.5154.1327650437.27778.python-list@python.org>
On 27/01/2012 06:57, Frank Millman wrote:
>
> "Blockheads Oi Oi"<breamoreboy@yahoo.co.uk>  wrote:
>
>> 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
>
> I don't have an answer, but are you aware of this -
>
> http://www.ics.uci.edu/~eppstein/PADS/Sudoku.py
>
> It is a sudoko solver written in pure python.
>
> I don't know what you call a tough problem, but this one solves the hardest
> one I have thrown at it in the blink of an eye. It also outputs a full trace
> of  the reasoning it used to arrive at a solution.
>
> Frank Millman
>

I'd looked at this years back and forgotten all about it so thanks for 
the reminder :)  Some of the code names directly match ideas given in my 
[2] above so I'll take another look.
-- 
Cheers.

Mark Lawrence.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web