This is a quick implementation of a paper by Rhyd Lewis. It finds the global optimum (aka the solution) of a Sudoku puzzle using simulated annealing.
I implemented with a short time budget and the computation is not optimized. What is great about it, though, is that you can watch the algorithm solve the Sudoku puzzle in real time.
Solver.webm
Sometimes the system will get stuck close to a non-global optimum (aka not the solution). In that case, the system is automatically reheated.
Reheat.webm
Python 3.10, Tkinter, Poetry
sudo apt install python3 python3-tk python3-poetry
poetry install