On Tue, Nov 11, 2008 at 12:34 AM, <brabuhr / gmail.com> wrote: > On Mon, Nov 10, 2008 at 12:25 PM, Matthew Moss <matt / moss.name> wrote: >>> ## Sudoku Generator (#182) >>> >>> _Quiz idea provided by Lloyd Linklater_ > > I haven't take the time to look at difficulty level, but have a very > naive generator; the basic idea is to generate a puzzle using a sudoku > solver and then punch some random holes in it: > > 72.times{puzzle[rand(81)] = 0} Hmm, changed that while I was messing around with it, originally: 64.times{puzzle[rand(81)] = 0} Since, it appears that any (unique) Sudoku puzzle must have at least 17 given numbers: http://people.csse.uwa.edu.au/gordon/sudokumin.php (Though, I take no effort to ensure that the at-least 17 numbers left will lead to a unique solution.)