Sudoku Solver. Just for fun.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test/fixtures
README.md

README.md

Sudoku Solver

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

Usage

In irb:

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

TODO

  • 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)