Badges!

Badges!

Funky little badges for 75p each!
Buy some soon

What's new

RSS Feed for what's new

What's updated

RSS Feed for what's updated

Standards I'm breaking (probably)

Valid XHTML!
Valid RSS!
Valid CSS!

Ads

Dreamhost Web Hosting

Online Sudoku Solver

Updated 2005-06-09

The latest puzzle craze here in the UK is Sudoku. Sudoku puzzles (also known as Su Doku or Sudoko) are fairly interesting (from a Computer Science point of view). I thought I'd try and write a program to solve them. I did, and it's pretty quick - 2 seconds to solve a "Fiendish" puzzle from the Times.

The idea is simple: each row of the sudoku puzzle must have the digits 1 to 9 in it; each column must have the digits 1 to 9 in it; the 9 3x3 squares must have the digits 1 to 9 in them. That's it. Typically you're given somewhere from 25% to 60% of the cells already filled in and you must fit your answers around them, but the solver will also deal with blank grids.

To use the solver, enter the values you do know, and leave the ones you don't know blank. You can use the tab key to move from cell to cell, and if you like you can enter something for the blank ones. A 0, a space, a dot - as long as it's not a number from 1 to 9 it's fine.

If you're looking for sudoku puzzles, you could do worse than visit The Guardian's page.

Problems? Issues? Is it not solving puzzles it should? Is it solving puzzles it shouldn't? Please, please, please contact me with as many details of the problem so I can fix it. Make sure you include details of the sudoku grid you were trying to solve.