[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sudoku solver
From: |
Etienne Grossmann |
Subject: |
Re: Sudoku solver |
Date: |
Sun, 1 Jan 2006 18:35:05 -0500 |
User-agent: |
Mutt/1.4.2.1i |
On Sat, Dec 31, 2005 at 09:28:58PM -0500, Paul Kienzle wrote:
# Hmmm... That's the second posted sudoku solver. Does that mean it is
Right!
http://www.octave.org/mailing-lists/help-octave/2005/2722
I had missed that one - didn't know about sudoku until last week.
I'll try Pasquale's code - so much for my "utility" good resolution!
Cheers,
Etienne
# time to add it to octave-forge/main/games?
#
# - Paul
#
# On Dec 31, 2005, at 2:55 PM, Etienne Grossmann wrote:
#
# >
# > Hi All,
# >
# >here is a sudoku solver I wrote recently. I tried it on just 3 probs,
# >the last ones from The Providence Journal, which it seems to solve.
# >
# >## [output,feasible] = sudoku (input) - Try to solve a sudoku problem
# >##
# >## This function applies brutish force and may or may not work
# >properly. The
# >## method (1) excludes impossible values of cells within each group
# >(row,
# >## column and 3x3 block), (2) deduces the value of a cell that is the
# >only
# >## one to be able to assume that value within a group and (3) makes
# >guesses
# >## and sees where they lead (depth-first search). Does not check for
# >## unicity. May or may not detect unsolvalble cases properly.
# >##
# >## Please report success/failure to me <address@hidden>.
# >##
# >## input : 9 x 9 : initial grid w/ unknown values set to 0.
# >##
# >## output : 9 x 9 : final grid.
# >## feasible: true if a solution was found, 0 otherwise.
# >
# > Good resolution for 2006: Do more useful things than the above!
# >
# > Cheers,
# >
# > Etienne
# >
# >--
# >Etienne Grossmann ------ http://www.cs.uky.edu/~etienne
# ><sudoku.m>
#
--
Etienne Grossmann ------ http://www.cs.uky.edu/~etienne
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Sudoku solver,
Etienne Grossmann <=