They’re the latest rage, they’re in newspapers and the web, you’ve probably done dozens of them … Sudoku puzzles are everywhere.
Recently I had the pleasure of introducing them to my 11 year old daughter. At first she thought them tough, and probably not worth the time, but then something clicked, and she’s a sudoku maniac. Which lead me to start thinking … how does one go about making these puzzles?
A search of the web for "generating sudoku" has suprisingly few hits that aren’t about solving them, but I did manage to find a page that is in the process of being translated from Japanese to English. Much to my surprise, there’s much more to them than just banging numbers into quasi-ordered locations. A quality Sudoku puzzle has just enough clues to make the solution possible with very few if any guesses, and little if any chance of multiple solutions.
Anyway, this has become my latest quest: A Sudoku Generator in VB.NET. Any advice will be welcome. Wish me luck.
COMMENTS FROM theSpoke:
I’ve been thinking about writing a solver. I think that the way I would write a creater is to fill up the whole board and then remove numbers. One piece of code I think I need is a Set object. I’d have sets of possibles and sets of impossibles. My actual possible numbers would be numbers that are not in the combination of impossible sets (up and across). Still working on it though.
Ah, but in doing that you might remove too much information, and thus make the puzzle either unsolvable, or solvable with too much guessing required. Take a look at this link: http://www.pro.or.jp/~fuji/sudoku/makesudoku/sudoku01.html.en
It’s the basis for the knowledge I’ve picked up. (Can’t wait for the rest of it to be translated! 8^)
Is it done yet? Are you going to do a version for the Pocket PC? That would be a great way to spend idle time on lines, planes, and you could have the kids solving them on long car trips.
A few entries ago I wrote about trying to create a Sudoku puzzle generator. As I expected at the time,…