News for hackers. Stuff that matters.
Re:From Sudoku Solver to Program Synthesis by dahart on Thursday February 21, 2019 @12:48PM (#19218834)
Yep, backtracking works fine. If you only want the solution, then you don't need complex rules. But, you really want more than just the solution.

Check out http://sudokuwiki.com/sudoku.htm

This solver (and the whole site) is the best one I know of, and it will solve a puzzle by using rules in order of difficulty, to guarantee it tries the simple rules you know before resorting to backtracking.

The benefits of this are that you can grade the difficulty of a sudoku board. You can also solve a puzzle up to the "crux" and then work on only the hard moves manually. I like doing that so I can skip the hours of boring stuff and practice doing the more tricky inferences. Andrew's site is a window into how big of a rabbit hole Sudoku can be...

Re:From Sudoku Solver to Program Synthesis by akbo on Thursday February 21, 2019 @01:41PM (#19219368)
If you are interested in grading Sudokus by the difficulty of the human solving techniques required, you might want to check out the following two books:

- "Sudoku Programming with C" [https://www.apress.com/de/book/9781484209967] where a Sudoku solver and grader is implemented.

- "A to Z of Sudoku" [https://www.wiley.com/en-us/A+to+Z+of+Sudoku-p-9781847040008] where many human solving techniques are described and rated by their difficulty.