I want to build a sudoku game with a generator. I have figured out everything how to do it without the difficulty level: easy, medium, hard. My question is how many numbers should I hide depending of the difficulty level? Any ideas.
Asked
Active
Viewed 2,299 times
2 Answers
4
I'm pretty sure that the difficulty rating for a sudoku puzzle is assigned not based on the quantity of missing numbers but on the techniques required to solve the puzzle.
Take a look at this list of sudoku solving techniques. The Naked Single and Hidden Single techniques are well-known and easy for novices to complete. The harder techniques like X-Wing and Swordfish are much more difficult.
To determine the difficulty, you should write a program that iteratively solves your puzzle, each time with more techniques in its toolbox.

jterrace
- 64,866
- 22
- 157
- 202
-
This answer is about solving, not generating, surely? – Lightness Races in Orbit Sep 26 '11 at 14:28
-
1@tomalak-geretkal Yes it's about solving. How would you know how difficult your generated puzzle is without solving it? – jterrace Sep 26 '11 at 15:28
-
@jterrace, presumably different generation techniques could lead to puzzles which require different solution techniques alleviating the need to solve puzzles individually. However, I'm not sure whether these techniques are known for sodoku. – Richard Sep 18 '12 at 12:13