Every repository with this icon (
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Wed Oct 07 12:31:14 -0700 2009 | |
| |
.togglerc | Thu Jan 01 22:49:43 -0800 2009 | |
| |
README.textile | Sat Jan 03 08:08:53 -0800 2009 | |
| |
Rakefile | Fri Jan 02 01:13:21 -0800 2009 | |
| |
inline.rb | Thu Aug 13 11:20:46 -0700 2009 | |
| |
puzzles/ | Sat Jan 03 10:47:29 -0800 2009 | |
| |
rakelib/ | Wed Oct 07 12:31:14 -0700 2009 | |
| |
s.pl | Thu Aug 13 09:20:40 -0700 2009 | |
| |
s.rb | Thu Aug 13 11:19:50 -0700 2009 | |
| |
smin.pl | Thu Aug 13 11:20:15 -0700 2009 | |
| |
smin.rb | Thu Aug 13 11:20:15 -0700 2009 | |
| |
squiggle.rb | Sat Jan 03 10:56:02 -0800 2009 | |
| |
sudoku.rb | Thu Aug 13 09:20:25 -0700 2009 | |
| |
sudoku_test.rb | Wed Oct 07 12:31:33 -0700 2009 |
Yet Another Sudoku Solver
The Blame
Blame for this code base goes to Dave Hoover (@redsquirrel), who
started it all by twittering about working on a Sudoku solver
(http://github.com/redsquirrel/nest/tree/master/sudoku).
The Past
I wrote a very simple Sudoku solver a couple years ago. My coworkers
introduced me to the puzzle and spent their lunchtimes solving them.
I solved one or two by hand and realized that I would enjoy writing a
program to solve them rather than solving them myself.
That early version of the program could only handle simple sudoku
puzzles that didn’t involve guessing and backtraking. Unfortunately
that early version has been lost in the mists if time.
The Present
This new version of the solver was written from scratch and does
handle tougher puzzles the require guessing and backtracking. Except
for the puzzle parsing code, it doesn’t share any implementation with
Dave’s solution.
Usage
Just pass it the name of the puzzle file (.sud) on the command line.
It will print out the initial and final puzzles, and each step along
the way to a solution.
Example:
ruby sudoku.rb puzzles/evil.sudAnd It Continues
It seems that Corey Haines (@coreyhaines) has also caught the Sudoku
solver bug and has posted his solution
(http://github.com/coreyhaines/sudoku_solver).
License
You are granted permission to read, copy, modify, redistribute this
software or derivatives of this software.







