How long would it take you to solve this devlishly hard Sudoku puzzle (from Le Monde)?
You could do it the old-fashioned way -- with a pencil -- but Xi'an decided to solve it by programming a simulated annealing solver in R. The algorithm works by first guessing a solution at random -- filling in the empty cells above with random digits between 1 and 9. Then it "scores" this solution by counting the number of digits duplicated in all the rows, columns and blocks. Next it evaluates a number of candidate new solutions by tweaking one of the free digits, and scores those. The algorithm then selects one of the candidate solutions at random for the next step, weighted by the change in the score.
The code to do all this , which you can use to solve your own Soduku puzzles if, say, you've lost your pencil, is at Xi'an's blog.
Xi'an's og: Sudoku via simulated annealing
I've been addicted to Sudoku for a long time. There are several sites that let you play for free using a Javascript solution. I can't solve the online ones if they are too complicated because you don't have a place to write down temporary placement to try certain strategies, which is why I like to work with book versions of sudoku.
I printed the puzzle you have and look forward to trying it out without using s Sudoku solver.
Posted by: Dave Ryder | July 24, 2010 at 13:39
Using brute-force with backtracking (implemented with recursion), a solution was found in 30ms on an Intel dual-core 2.2GHz (E4500) computer.
8 9 4 | 6 7 1 | 2 5 3
6 7 5 | 3 4 2 | 8 9 1
3 1 2 | 9 5 8 | 7 6 4
-------------------------------
1 4 7 | 2 3 5 | 9 8 6
9 6 3 | 7 8 4 | 5 1 2
5 2 8 | 1 6 9 | 3 4 7
-------------------------------
2 3 1 | 8 9 6 | 4 7 5
4 8 6 | 5 2 7 | 1 3 9
7 5 9 | 4 1 3 | 6 2 8
http://this1that1whatever.com/miscellany/sudoku/ offers Sudoku puzzles to solve.
Posted by: David | October 25, 2010 at 20:07
Great post! To get unlimited free sudoku to play and print as well as a sudoku widget which can be embedded into every website visit http://print-sudoku.com - it free!
Posted by: Thomas | January 02, 2011 at 09:05
it's nice
Posted by: Indra | June 13, 2013 at 10:09