Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (24 sloc) 811 Bytes

Solve Sudoku

Accepts a Sudoku puzzle (a partially completed grid) and outputs all possible solutions. The algorithm is based on this article:


solve_sudoku puzzle.txt

RubyGems makes the executable available automatically. Otherwise, the executable lives in bin/.

Examples in puzzles/. Use puzzles/blank.txt as a template for new puzzles.


As a gem:

gem install solve_sudoku

Alternatively, clone the repository for easier access to example puzzles:

git clone


Developed and tested using Ruby 1.9.3-p125.


Copyright (C) 2012 David Trasbo. Released under the MIT License. Please refer to LICENSE.

Something went wrong with that request. Please try again.