Op 2005-09-21, Tom Anderson schreef <[EMAIL PROTECTED]>:
> On Mon, 19 Sep 2005, Antoon Pardon wrote:
>
>> Op 2005-09-17, Tom Anderson schreef <[EMAIL PROTECTED]>:
>>> On Fri, 16 Sep 2005, Bas wrote:
>>>
-any ideas how to easily incorporate advanced solving strategies?
solve(problem1) and
On Mon, 19 Sep 2005, Antoon Pardon wrote:
> Op 2005-09-17, Tom Anderson schreef <[EMAIL PROTECTED]>:
>> On Fri, 16 Sep 2005, Bas wrote:
>>
>>> -any ideas how to easily incorporate advanced solving strategies?
>>> solve(problem1) and solve(problem2) give solutions, but
>>> solve(problem3) gets st
On Wed, 21 Sep 2005 [EMAIL PROTECTED] wrote:
> Excellent strategies are provided by Dan Rice's blog:
> http://sudokublog.typepad.com/sudokublog/2005/08/two_and_three_i.html
There's an interesting remark in this post:
http://sudokublog.typepad.com/sudokublog/2005/08/where_do_sudoko.html
"Some Su
Bas, you and I are both a little late to the sudoku python experience.
Here's my feeble attempt:
http://home.earthlink.net/~daliblume/Download/sudoku/index.html
Inspired by this article: http://somethinkodd.com/oddthinking/?p=21
Excellent strategies are provided by Dan Rice's blog:
http://sudokubl
Very interesting that sudoku solving appears on the python group - there
is a programming competition at mathschallenge.net (euler) where one of
the puzzles is developing a sudoku solving algorithm...
Actually the python entrants are giving the C guys a good run!
On Mon, 19 Sep 2005 09:12:54
Anton Vredegoor wrote:
> I like to program sudoku and review such
> code.
Some non-Python examples:
APL (The Horror! The Horror!...):
http://www.vector.org.uk/archive/v214/sudoku.htm
and my own effort with Excel/C# (very humble - needs work):
http://exmachinis.net/code/cs/2005/08/4.h
Op 2005-09-17, Tom Anderson schreef <[EMAIL PROTECTED]>:
> On Fri, 16 Sep 2005, Bas wrote:
>
>> -any ideas how to easily incorporate advanced solving strategies?
>> solve(problem1) and solve(problem2) give solutions, but solve(problem3)
>> gets stuck...
>
> the only way to solve arbitrary sudoku
Op 2005-09-16, [EMAIL PROTECTED] schreef <[EMAIL PROTECTED]>:
>
> Bas ha escrito:
>
>> Hi group,
>>
>> I came across some of these online sudoku games and thought after
>> playing a game or two that I'd better waste my time writing a solver
>> than play the game itself any longer. I managed to writ
My current solver does 1 level of backtracking (i.e. constant space, and
bounded time) only, and it has been able to solve every puzzle I've
thrown at it. It's based on the usual logic and book-keeping for the
most part. (It also explains how it comes up with each answer step as
it goes, wh
Diez B. Roggisch wrote:
> As everyone posts his, I'll do the same :) It uses some constraint based
> solving techniques - but not too complicated ones. When stuck, it
> backtracks. So far it never failed me, but I haven't tested it too
> thouroughly.
Thanks to all for sharing. I like to program su
Had the same reaction as everyone when I saw theses puzzles a month or
so ago, so here is my solution...
the solve function is recursive, so it can also solve the 'deadlock
set' (example3). find_cell looks for an empty cell with the most filled
cells in it's row and column, so the search tree doesn
As everyone posts his, I'll do the same :) It uses some constraint based
solving techniques - but not too complicated ones. When stuck, it
backtracks. So far it never failed me, but I haven't tested it too
thouroughly.
Diez
import copy
def condense(vals):
if len(vals) == 0:
retur
>> def all(seq, pred=bool):
>What's this? What is bool?
That came straight out of the manual for itertools:
http://docs.python.org/lib/itertools-recipes.html
--
http://mail.python.org/mailman/listinfo/python-list
Hi Bas,
I came across Soduko puzzles recently too and had the same reaction:
why waste my time solving the things when it would be much more fun
to write a Python program to do so?
#!/usr/bin/python
import sys
import copy
import EasyDialogs
# Solve functions return these result codes:
k
Sybren Stuvel wrote:
>>def all(seq, pred=bool):
>
> What's this? What is bool?
See http://docs.python.org/lib/built-in-funcs.html#l2h-10
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Tom Anderson a écrit :
> On Fri, 16 Sep 2005, Bas wrote:
>
>> -any ideas how to easily incorporate advanced solving strategies?
>> solve(problem1) and solve(problem2) give solutions, but
>> solve(problem3) gets stuck...
>
>
> the only way to solve arbitrary sudoku problems is to guess.
Well, th
On Fri, 16 Sep 2005, Bas wrote:
> -any ideas how to easily incorporate advanced solving strategies?
> solve(problem1) and solve(problem2) give solutions, but solve(problem3)
> gets stuck...
the only way to solve arbitrary sudoku problems is to guess.
of course, you have to deal with guessing w
Bas enlightened us with:
> I came across some of these online sudoku games and thought after
> playing a game or two that I'd better waste my time writing a solver
> than play the game itself any longer. I managed to write a pretty
> dumb brute force solver that can at least solve the easy cases
>
Bas ha escrito:
> Hi group,
>
> I came across some of these online sudoku games and thought after
> playing a game or two that I'd better waste my time writing a solver
> than play the game itself any longer. I managed to write a pretty dumb
> brute force solver that can at least solve the easy c
Hi group,
I came across some of these online sudoku games and thought after
playing a game or two that I'd better waste my time writing a solver
than play the game itself any longer. I managed to write a pretty dumb
brute force solver that can at least solve the easy cases pretty fast.
It basical
20 matches
Mail list logo