sudoku solver

Just for fun, I implemented a Sudoku solver entirely in Javascript. It uses Knuth's Dancing Links technique, which is an efficient way of solving "exact cover" problems (of which Sudoku is a well-known example).

This is hardly innovative—such solvers have probably been implemented thousands of times—but my implementation of Dancing Links is one of the few I've found written in Javascript. Also, my implementation exists entirely within one HTML file, so you can save it to your computer and use it to solve puzzles offline.

This is hardly innovative—such solvers have probably been implemented thousands of times—but my implementation of Dancing Links is one of the few I've found written in Javascript. Also, my implementation exists entirely within one HTML file, so you can save it to your computer and use it to solve puzzles offline.

Vi estas mia heroo!

2008-01-21T18:29:51Z

We made a sudoku solver in hardware (written in our functional langauge for designing hardware). We also used the solver to generate puzzles, though not very efficiently.

2008-01-21T18:34:14Z

Oh, it was also written in a parameterized way which means we can change N=3 to N=4 and *poof* we have a 16-element sudoko solver. (Though, ours is rule-based, and even though the rules are highly abstracted -- you can write one rule and apply it to any mask of the board, like a row, a column, or a square --- while the set of rules that we wrote allows us to solve really tough 9x9 sudoku boards, it might not be so great at 16x16.)

sonjaaa2008-01-19T08:54:51Z