Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 47 lines (31 sloc) 1.565 kb
b9e7ebb @jimweirich added readme
authored
1 h1. Yet Another Sudoku Solver
2
3 h2. The Blame
4
5 Blame for this code base goes to Dave Hoover (@redsquirrel), who
6 started it all by twittering about working on a Sudoku solver
20098d3 @jimweirich fixed links in readme
authored
7 ("http://github.com/redsquirrel/nest/tree/master/sudoku":http://github.com/redsquirrel/nest/tree/master/sudoku).
b9e7ebb @jimweirich added readme
authored
8
9 h2. The Past
10
11 I wrote a very simple Sudoku solver a couple years ago. My coworkers
12 introduced me to the puzzle and spent their lunchtimes solving them.
13 I solved one or two by hand and realized that I would enjoy writing a
14 program to solve them rather than solving them myself.
15
16 That early version of the program could only handle simple sudoku
17 puzzles that didn't involve guessing and backtraking. Unfortunately
18 that early version has been lost in the mists if time.
19
20 h2. The Present
21
22 This new version of the solver was written from scratch and does
23 handle tougher puzzles the require guessing and backtracking. Except
24 for the puzzle parsing code, it doesn't share any implementation with
25 Dave's solution.
26
27 h2. Usage
28
29 Just pass it the name of the puzzle file (.sud) on the command line.
30 It will print out the initial and final puzzles, and each step along
31 the way to a solution.
32
33 Example:
34
35 ruby sudoku.rb puzzles/evil.sud
36
37 h2. And It Continues
38
39 It seems that Corey Haines (@coreyhaines) has also caught the Sudoku
40 solver bug and has posted his solution
20098d3 @jimweirich fixed links in readme
authored
41 ("http://github.com/coreyhaines/sudoku_solver":http://github.com/coreyhaines/sudoku_solver).
b9e7ebb @jimweirich added readme
authored
42
43 h2. License
44
45 You are granted permission to read, copy, modify, redistribute this
46 software or derivatives of this software.
Something went wrong with that request. Please try again.