help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sudoku solver


From: Paul Kienzle
Subject: Re: Sudoku solver
Date: Sat, 31 Dec 2005 21:28:58 -0500

Hmmm... That's the second posted sudoku solver.  Does that mean it is
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>



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]