An open API service indexing awesome lists of open source software.

https://github.com/davylandman/event-driven-sudoku

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.
https://github.com/davylandman/event-driven-sudoku

Last synced: 2 months ago
JSON representation

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.

Awesome Lists containing this project

README

        

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`