Gavin’s Odd Bits of Code

2008-04-23 (Wed)

JavaScript Sudoku Solver

Filed under: Web — Gavin Brock @ 10:36 pm
Tags: , ,

Solving Sudoku with software has been rather fashionable at the office this week. So here is page that does it in JavaScript entirely on the client:

Gavin’s JavaScript Sudoku Solver

As could be expected, this is not the fastest solver in the world, but it will get there using brute force. You have an option to watch the internal decision tree or not.

Gavin's Sudoku Solver screen shot

Inspiration for the code comes from a beautiful perl three line sudoku solver by Eccles & Toad. The extremely hard test case from the list of incredibly hard puzzles strings at Sudoku Players’ Forums on


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at

%d bloggers like this: