[Kde-games-devel] New generator for KSudoku puzzles

Ian Wadham iandw.au at gmail.com
Thu Oct 13 09:52:22 UTC 2011


Hi guys,

On 30/09/2011, at 5:57 PM, Ian Wadham wrote:
> I found a nice algorithm, written in Python and published on the Web, so I set
> about transcribing it into C++, using the Qt library, and generalizing it to support
> all the shapes and sizes of Sudoku puzzles in KSudoku, rather than just the
> classic 9x9 puzzle.

I have finished work for now on the new generator and have linked it
into KSudoku.  Although the new code is quite large, it has been extensively
tested, documented and commented.  Not having had any reply to my earlier
email, I have decided to commit the code to trunk, see rev 1258794.

Sudoku enthusiasts may wish to try out both the old and new generators,
so now the startup screen has an extra button.  The "Start Empty" and "Play"
buttons are exactly as before and will use the old generator and solver.

The new "Generate Puzzle" button will create a puzzle using the new generator
and solver.  It caters for a range of difficulties: Very Easy, Easy, Medium, Hard
and Diabolical, corresponding to ratings found in Sudokus published by
newspapers.  I used several published puzzles as input when calibrating
the generator.

The aim is to address bug 217925 and its duplicates 228614 and 237362
and eventually close them.  The documentation of the new generator is in
file ksudoku/src/generator/sudokuboard.h.

I will of course tidy up the integration between KSudoku and the new
generator in time for the 4.8 release.

Enjoy, Ian W.

P.S. I guess this makes me the new maintainer of KSudoku ... :-)



More information about the kde-games-devel mailing list