public
Description: A Simple Sudoku Solver
Homepage:
Clone URL: git://github.com/jimweirich/sudoku.git
sudoku /
name age message
file .gitignore Wed Oct 07 12:31:14 -0700 2009 Added RCov task. [jimweirich]
file .togglerc Thu Jan 01 22:49:43 -0800 2009 easy solver (no backup/retry) [jimweirich]
file README.textile Sat Jan 03 08:08:53 -0800 2009 fixed links in readme [jimweirich]
file Rakefile Fri Jan 02 01:13:21 -0800 2009 added default task [jimweirich]
file inline.rb Thu Aug 13 11:20:46 -0700 2009 added inline.rb to convert puzzle formats to on... [jimweirich]
directory puzzles/ Sat Jan 03 10:47:29 -0800 2009 added squiggle sudoku solver [jimweirich]
directory rakelib/ Wed Oct 07 12:31:14 -0700 2009 Added RCov task. [jimweirich]
file s.pl Thu Aug 13 09:20:40 -0700 2009 Added Perl and equivalent ruby solutions. [jimweirich]
file s.rb Thu Aug 13 11:19:50 -0700 2009 updated the ruby solution s.rb [jimweirich]
file smin.pl Thu Aug 13 11:20:15 -0700 2009 added minimal versions [jimweirich]
file smin.rb Thu Aug 13 11:20:15 -0700 2009 added minimal versions [jimweirich]
file squiggle.rb Sat Jan 03 10:56:02 -0800 2009 Group layouts may now be partial. [jimweirich]
file sudoku.rb Thu Aug 13 09:20:25 -0700 2009 Added say and verbose [jimweirich]
file sudoku_test.rb Wed Oct 07 12:31:33 -0700 2009 Updated test to cover solver. [jimweirich]
README.textile

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

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