How to generate Sudoku numbers?

Programs which generate, solve, and analyze Sudoku puzzles

How to generate Sudoku numbers?

Postby Guest » Wed Jun 07, 2006 2:03 pm

I'm very interested in Sudoku. I want to know how to generate Sudoku numbers. Can anybody tell me? Thank you very much.
Guest
 

Postby ravel » Wed Jun 07, 2006 2:44 pm

What exactly do you want ?
Create sudokus ? By hand, my means of (free) programs you can download, with an online program, with given patterns, with given difficulty, write a program yourself ? There are a lot of answers to all of these questions:)
ravel
 
Posts: 998
Joined: 21 February 2006

Postby Guest » Wed Jun 07, 2006 2:53 pm

as a matter of fact, I wanna try to write a game of Sudoku.
So I have to know the arithmetic to generate the numbers.
Can anbody help me? thank you.
Guest
 

Postby ravel » Wed Jun 07, 2006 4:17 pm

First you will need a solver, that is a program, which determines, if a given sudoku has a unique solution. This is the easy part. I dont know, what progam language you use, but you have good chances to find sample source codes in the Solver programs forum here.
Then you can write a program to create sudokus. There are different approaches for this. E.g. you can start with an empty grid and (randomly) add numbers, until it is unique or does not have solution. In the scond case you would remove numbers and try again etc. Or you calculate a random solution grid and (randomly) drop numbers, as long as it has that one solution (maybe the easiest way). Or something between. Or you can fix a pattern and fill it randomly with numbers, until you get one with a unique solution.
Then you should implement a program, that tries to solve puzzles with some basic techniques like singles, pairs, triples, box interactions etc. to be able to see, which of your puzzles are easy (the most), medium etc.
I hope this helps for a start. If you have specific questions, just ask.
ravel
 
Posts: 998
Joined: 21 February 2006

Postby Guest » Tue Jun 13, 2006 12:04 am

[Edited by Pappocom: correspondence deleted. Lida2003's membership has been deleted, as the supplied email address is not a valid address]
Guest
 


Return to Software