I had a go at solving sudokos, but I found the experience tedious, mechanical and far too easy to make a mistake.
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 wrote a program that generates all sudokus that satisfy constraints given in a partially filled grid. I thought it might be feasible to find out the distribution of 81 digit numbers that are valid Sudokus by such brute force. Since there are so many sudokus, I made the program capable of resuming an interrupted computation using a dump file. All this I did in C. It was quite a learning experience.
Here goes: (https://github.com/vyuh/sud.c)
I enjoy these puzzles a lot in my commute time. Recently on a flight to Germany I built a solver in python. It was a pretty great way to consume a portion of the long flight from US.
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.
If you haven't already seen it, check out Donald Knuth's Dancing Links algorithm for solving sudoku. Here's a good overview and intro (that includes a link to the paper).
I wrote a sudoku solver in Visual Basic 5 many years ago. I've lost the source code to it but I remember the algorithm mostly. I've been meaning to re-implement it in a new language as a learning/practice exercise.
One could also write a sudoku solver in z3. I did this for an assignment and it was fun. I have never programmed in Lisp before but there seems to be some similarity between them.
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/