| Moritz
| Joined: 07 Oct 2006 | Posts: 23 | : | Location: Edinburgh, Scotland | Items |
|
Posted: Sun Dec 10, 2006 9:09 pm Post subject: |
|
|
Hi,
if you already wrote a program that solves Sudokus, it is not so hard to write one that generates them.
All you have to do is to fill random numbers into an empty grid, and check if the generated sudoku is uniq. If not, you enter more numbers.
If it is not solveable at all, you just start again with an empty grid.
I have a more detailed description as well as a few thoughts on speed here:
http://moritz.faui2k3.org/en/yasss#generate
Hope that helped,
Moritz |
|