Skip to content

Ruby implementation of the Peter Norvig's sudoku solving algorithm

License

Notifications You must be signed in to change notification settings

giogam/Sudoku-Solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku-Solver

Ruby implementation of the Peter Norvig's sudoku solving algorithm. Actually seems to perform like the native Python implementation; On an Intel I7 2600K solves the hard puzzle below in 1' and 15". There is also a little test suite based on the one found in the original article. For a more detailed point of view you should read This

#Code Sample

require_relative 'sudoku_solver'

  grid1  = '003020600900305001001806400008102900700000008006708200002609500800203009005010300'
  grid2  = '4.....8.5.3..........7......2.....6.....8.4......1.......6.3.7.5..2.....1.4......'
  hard1  = '.....6....59.....82....8....45........3........6..3.54...325..6..................'

  sudoku_solver = SudokuSolver.new

  sudoku_solver.solve(hard1)

About

Ruby implementation of the Peter Norvig's sudoku solving algorithm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages