Sudoku Bench
benchmark three sudoku solvers side by side
three sudoku solvers on one bench
i'd been playing a lot of sudoku on linkedin games. figured, hey, let me see what solving these actually looks like under the hood. so i built a bench where i can run experiments and just look at the data. three solvers side by side: mrv backtracking, naive backtracking, and dlx (knuth's dancing links). pick a size (6, 9, or 16), a difficulty, an algorithm. it generates a puzzle, solves it, and logs placements, backtracks, and wall time to sqlite. the auto ×54 button runs the whole matrix and plots placements vs time on a log–log chart. flask backend, plotly front. just made it usable on mobile. naive chokes on 16×16 hard and times out — that's kind of the point.
Updates · 1
Where this came from
This thing started because I wanted to figure out the best way to solve Sudoku. I've been doing Sudoku mini on LinkedIn every day for months now. It has turned into a ritual, and I love it, especially because you don't need a strategy: you just drop in numbers from 1 to 6. I realized, what would a strategy look like? After experimenting for a couple of days, I realized, why not just get a computer to solve this? Show me all the different solves, and then I started messing around. I realized I just want to look at a lot of data from a lot of runs and snowball from there. The goal now is to generate a large dataset and start doing some more analysis on top of it.
Comments
sign in to join the conversation.
~JustBuildApps
