Sudoku Solver in Common Lisp (2009)
deepaksurti.com
deepaksurti.com
In fact just the frustration inducing thing to tickle the first of the virtues of a programmer: "Laziness". I then wrote a solver in Python which was far more fun than solving sudokus by hand and has the advantage that I never need to solve one of the dratted puzzles again ;-)
I recommend it as an exercise for all programmers!
I didn't document that process, but I did for solving a different puzzle which you may enjoy if you need inspiration: https://www.craig-wood.com/nick/articles/snake-puzzle/
Then I created a solver in Python as well, it uses backtracking. It can solve the puzzle instantly. Never solved another sudoku puzzle ever since.
For some fun I also translated the algorithm to Javascript (https://github.com/vyuh/sud.js) and Java (https://github.com/vyuh/sudoku-lister/blob/master/java/sudok...). The javascript code is used in a toy browser application i made (https://su-do-ku.herokuapp.com/).
Some day I might generalize the program to larger Latin Squares (https://en.wikipedia.org/wiki/Latin_square).
I’ve recently started reading up on optimization strategies, my first attempt was pretty straightforward. It’s a fun exercise I recommend for anyone who likes solving these puzzles manually.
https://www.kevinhooke.com/2019/01/22/revisiting-donald-knut...