Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sudoku difficulty rating

Tags:

rating

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.

like image 718
Jordan Borisov Avatar asked Feb 14 '26 20:02

Jordan Borisov


2 Answers

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.

like image 133
jterrace Avatar answered Feb 19 '26 01:02

jterrace


Here are some ideas. You might also be interested in this Sudoku generator.

like image 32
BenH Avatar answered Feb 19 '26 03:02

BenH