Creating Irregular Sudoku PuzzlesHave you ever wondered how irregular sudoku puzzles are created? Also known as jigsaw sudoku, these are a reasonably common variant of sudoku that replace the neat 3 x 3 boxes with regions of all sorts of different shapes (but all containing nine cells). After sudoku X and killer sudoku, irregular sudoku is probably the most seen sudoku variant. There's an example grid to the right.
What differentiates irregular sudoku from standard sudoku, sudoku X and other extra region variants is that there is a very large range of different grids, so each puzzle you play really is different in more ways, because the shape of the regions clearly has a large impact on how you solve the puzzle.
Generally a hard irregular sudoku will be tougher than a hard standard sudoku, and people generally find them harder to solve, as applying logic to irregular shaped regions and unfamiliar patterns is harder to do as a human solver.
So how are the various shapes of the nine jigsaw regions that you see in irregular sudoku created? Well, it depends on the compiler.
Some will no doubt define them by hand - which is not always as easy as it sounds, and particularly not if you wish there to be symmetry exhibited in the final result as with the sample above, you have to keep track of preserving symmetry at all times. And of course if you have lots of puzzles to create, then it is very time consuming defining the cells in each region then checking for mistakes.
Sometimes you will just see one or possibly two patterns of irregular sudoku in a book containing them, possibly due to the above fact.
Writing a program to create them is not trivial, but also not too hard as long as you get your algorithm correct. One way is to start off with the orthodox 3x3 box regions. Then look for regions that are capable of exchanging a cell with a neighbouring region - growing by one cell from the neighbouring region whilst instantly losing a different cell to the neighbour.
Then repeat this process several times, and soon all sorts of interesting jigsaw type patterns will emerge. Of course if you want symmetry, you'll need to check that the same swap can occur for the partner cells too before performing it.
Once you have your new irregular sudoku region pattern definitions, it is just a case of generating them. Depending on the pattern there may be more or less possible irregular sudoku using that pattern, so generation can be instant or take a while, you might even create a pattern of regions for which there are no valid puzzles.
Date written: 03 Dec 2010
Comments:Can you help me build irregular sudoku puzzles in varying sizes? example 5x5, 6x6, 7x7 .... 12x12 using defined "shapes" of irregularities, of course within the square
By: Jbm - 13 Apr 2017 07:44:47
Comment on this post
If you would like to comment on this post, please enter your comments below; all fields are mandatory. Posts are moderated before display.
Back to World of Puzzles