## Sudoku generator

Everything about Sudoku that doesn't fit in one of the other sections

### Sudoku generator

I am working on a sudoku generator. I will tell you how it works.

Generate a full puzzle
-I'm taking all cels from a1 to i9 and I check if a random number from 1 to 9 is possible there. If none of numbers is possible I'm going 7 cels back and try again. It works for 99% but sometimes it lets browser crach.
(Need a fresh idea for generating puzzles on another way.)
-Then I let 10 numbers in cells a1 to c9, d1 to f9 and g1 to i9
So I have 30 numbers left. The puzzle is almost always not valid. :S
Then I add randomly 1 number till it can be solved with my sudokusolver.

Has anybody an idea about generating the puzzles and a good site with all solving techniques sorted by difficulty(for automated ranking).
yetti4

Posts: 3
Joined: 27 June 2008

if you already have a solver it's really not hard to make it into a generator. just fill in random cells until the solver solves the puzzle. If you reach a point where there's no solution start again

As for a collection of solving techniques, look here:
http://forum.enjoysudoku.com/viewtopic.php?p=21804#p21804
ab

Posts: 451
Joined: 06 September 2005

### Generating puzzles.

I will try it now. Is it really has to be completely randomly?

edit:
I enter completely randomly 25 numbers in a puzzle. row/column and 3x3 are ok, but I still get a valid puzzle.

Does anyone get a beter idea for creating puzzles.
yetti4

Posts: 3
Joined: 27 June 2008