View previous topic :: View next topic |
Author |
Message |
pasha
Joined: 02 Mar 2006 Posts: 1
|
Posted: Thu Mar 02, 2006 11:04 am Post subject: HELP! How can I make a sudoku with unique solution? |
|
|
Hi!
I am programming a sudoku game that making a full sudoku board, and then shows to the player only a part of the board and gives the player to solve it.
I already succeed to write a programm that makes a full board, but I have a problem with showing the player a part of the board that I made. I mean, when you solve a sudoku, usually there are 28-30 numbers that are visible and all the rest you must fill by yourself. As I understand there are some rules to which numbers I must make visible to make by board have only one solution. I don't want the player to guess.
What are the rules?
Thanks alot!
Pasha. |
|
Back to top |
|
|
Suryansu Ray
Joined: 23 Apr 2006 Posts: 3 Location: New Delhi, India
|
Posted: Sun Apr 23, 2006 11:01 am Post subject: |
|
|
Generate a full sudoku, which you said you can do. Delete at random the digit in one cell. Make a program that can solve it,--that means, the program can get back the missing digit. Then delete a second digit at random. Let the program solve it back. Continue this process of deleting and checking whether the program can come back to the full table. At one stage the program will not be able to solve the punctured table. It will face ambiguity, showing that the uniqueness is no more there. You have created a puzzle that can be solved uniquely. |
|
Back to top |
|
|
Guest
|
|
Back to top |
|
|
Suryansu Ray
Joined: 23 Apr 2006 Posts: 3 Location: New Delhi, India
|
Posted: Thu Apr 27, 2006 7:16 pm Post subject: |
|
|
Anonymous wrote: | http://www.sudokuonline.us/make_your_own_sudoku_puzzle.php |
Pasha, for a systematic construction of a sudoku puzzle with a given number of exposed digits, please visit this site, where a digit-by-digit method of constructing a sudoku puzzle is discussed in great detail. From this article, you will surely be able to make your own program. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|