Sudoku Solver. Just for fun.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Sudoku Solver

Just for fun. Read in a json file with 81 numbers, will solve and print the solution.


In irb:

load 'lib/sudoku.rb'
game =
game.load_gamefile 'test/fixtures/game.json'
game.solve # => true
puts game


  • Add more puzzles for testing
  • Move current solution to "Deductive" strategy
  • Add brute force backtracking strategy
  • Add Dancing Links strategy
  • Handle unsolvable puzzles
  • Handle puzzles with multiple solutions (more common with hard puzzles)
  • CLI:
    • Read json: sudoku [json filename]
    • Read Rubyquiz format: sudoku
  • Image processing? (ie read the puzzle from an image)
  • Fix stack level error when inspecting objects (recursive relationships make an infinite loop)