• Share this article:

A new Sudoku puzzle generator

Wednesday, June 7, 2006 - 22:39 by Wayne Beaton

I’ve had to set aside the Sudoku stuff for a couple of days while I did some real work. But, George Koch has been keeping busy. George sent me a Sudoku puzzle builder that he’s been working on; he’d managed to make it work with my application. His algorithm is better than mine: where mine is pretty simple and doesn’t do key things like guarantee that a generated puzzle has a unique solution, George’s does. You can also specify difficulty of the generated puzzle. It’s a great addition to the application.

I had already done most of the work, but I spent a few minutes making it possible for the user to select the puzzle generator they want to use when they create a new puzzle. It uses the extension-point mechanism to find puzzle generators, so you just have to drop ‘generator’ plug-ins into the application and everything just works. I’ve even set it up to handle dynamically installed plug-ins; you don’t need to restart to make use of additions. This will come in very handy when I hook in the update mechanism.

I need to make sure that the legal aspects are properly managed before I commit the code into the repository and share it. I’ll let you know when that happens so you can make use of a good puzzle generator (rather than the junk I built).