This sofware was translated from the python source code obtained from Peter Norvig’s website:

www.norvig.com/sudoku.html www.norvig.com/sudo.py

Thank you to Peter Norvig for the original python source code, algorithms and exceptionally clear explanations.

example:

require ‘sudoku_solver’

# The puzzle representation is simply the 9 rows of the Sudoku grid stringed together # from top to bottom (periods representing blank squares)

puzzle = “4.….8.5.3.….…..7.…..2.….6.….8.4.…..1.……6.3.7.5..2.….1.4.…..” s = SudokuSolver.new s.print_grid(s.search(s.parse_grid(puzzle)))