Skip to content

I've previously had the idea of creating a event driven sudoku solution with no special algorithms except simple guessing and backtracking, now I've adapted an old version I started and tried to create this with the least amount of code needed.

Notifications You must be signed in to change notification settings

DavyLandman/event-driven-sudoku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event Driven Sudoku

This is a very simple sudoku solver, it uses events to cancel out possible cell values, and when this does not result in a solution, it just makes a guess and backtracks if it was the wrong guess.

To run/fork

  • Clone the repository
  • git submodule init
  • git submodule update
  • windows: ruby solve_sudoku.rb sudokus\fiendish.sraw
  • unix: ./solve_sudoku.rb sudokus/fiendish.sraw

TODO

  • Be smarter about the selection of which candidates to use while guessing (hidden singles are easy to detect)
  • Avoid duplication in the guessing (memoization)
  • Reduce the size Sudoku.initialize_units and Sudoku.get_unit

About

I've previously had the idea of creating a event driven sudoku solution with no special algorithms except simple guessing and backtracking, now I've adapted an old version I started and tried to create this with the least amount of code needed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages