Blog
Sudoku solver
A randomized constraint solver for Sudoku, ported from Python to JavaScript so it runs as you watch. Hand it a puzzle with more than one solution and it will cheerfully give you a different answer each time.
Tag
2 articles on this topic.
Blog
A randomized constraint solver for Sudoku, ported from Python to JavaScript so it runs as you watch. Hand it a puzzle with more than one solution and it will cheerfully give you a different answer each time.
Blog
In a magic square of order n, every row, column and diagonal add up to the same number while using each of 1 through n squared exactly once. Here is how to build them, and why the odd, even and doubly even cases each need a trick of their own.