Live data from Hacker News

Solving Every Sudoku Puzzle (2006)

norvig.com

1–10 of 101 posts

Re: Solving Every Sudoku Puzzle (2006)

#5
This is pretty much exactly the algorithm that https://www.ioccc.org/2005/aidan/aidan.c uses, except obviously much more clearly expressed. There's also a reasonably straightforward extension of this technique that can test for solution uniqueness, and so generate random valid puzzles; I can't remember how it was implemented exactly but it involves continuing the search after finding the first solution and seeing if it succeeds.

Re: Solving Every Sudoku Puzzle (2006)

#6
Sudoku solvers are near and dear to my heart.

They’re my go to problem when learning a new programming language because they’re just complex enough to exercise a whole bunch of different language features.

I built this when I wanted to learn Swift and dip my toe into machine learning: https://twitter.com/braddwyer/status/910030265006923776?s=21

Re: Solving Every Sudoku Puzzle (2006)

#7
post #3

Wrote a solver using basically the same idea back in college. Was kind of fun. Probably some stupid things in there that I would do differently now with more experience. https://github.com/war1025/sudoku-solver/blob/master/Sudoku/...

Same. Didn't save the code; wish I had just so I could see if I got a better execution time than his 1439 second example.

Amusingly, my rationale was much like the author's; I freakin' hate Sudoku. So the fact it's such an obvious candidate to have an automated solver for meant I wrote one (it was also an excuse to do something more meaningful than the intro to CS exercises that class had me doing).

Post reply on HN