70 likes | 191 Views
CS194 Project: Sudoku Difficulty. Kha Chu Advisor: Professor Sahai. The Problem. Sudoku puzzle difficulties tend to not match the actual observed difficulty. Estimations of difficulty tend to stem from number of numbers revealed from the start.
E N D
CS194 Project:Sudoku Difficulty Kha Chu Advisor: Professor Sahai
The Problem • Sudoku puzzle difficulties tend to not match the actual observed difficulty. • Estimations of difficulty tend to stem from number of numbers revealed from the start. • Problem: such a method is innacurate, as a puzzle with many numbers revealed may be impossible to solve without guessing.
How to Fix the Problem • For a given puzzle, difficulty should not stem from how much is revealed, but how often highly logical analysis is used to solve the puzzle. • To write a program to do such a thing, it is needed to analyze the many techniques used to solve a puzzle. • Current sudoku solvers have an array of a bunch of cells and remove numbers from them through using rules, my algorithm seeks to be closer to how humans solve them. • My algorithm will be based off of how I solve puzzles.
Outline • Cycle through numbers and each block (a set of 3x3 cells of the 9x9 puzzle). • For each block for each number, determine which cells the number can’t be in (like by looking at the placement of the number in other blocks), and if there’s only one possible number, place the number in there. • A number can be determined through indirection; if the row or column of a cell can be determined, and two of the cells are cancelled, the placement of the number is found. • Once a cycle through the numbers produces no changes, proceed to other methods.
Other Methods of Solving • Check each row, column, or block for missing numbers, if there is just one missing, fill it in. • If there is a choice between two numbers in a series of blocks, guess one and proceed until done, or until a contradiction is found, then test the other. • Technique Difficulty Ranking: • One open cell left in a row, cell, or block: 0 • Indirect determination: 1 • Guessing: 2
Plan • First quarter: Create the solver that will solve a sudoku puzzle with the tools given. • Second quarter: Use the solver in conjunction with random number placement to create a puzzle generator that yields a puzzle with a unique solution. Generate a variety of puzzles and survey various people’s opinions on the difficulty of the puzzles. Find the correlation between generated difficulty and perceived difficulty. • Third quarter: Using the results from the survey, tweak the generator and solver in order to increase correlation between generated and perceived difficulty.