1 / 8

Sudoku Most-Constrained Value Heuristic - PowerPoint PPT Presentation

Sudoku Most-Constrained Value Heuristic. How It Works. Two variable are created C and N C  is the amount of numbers 1-9 that can appear in a given cell N  is the amount of locations a single number 1-9 can appear in a given square. Example. Example.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

PowerPoint Slideshow about ' Sudoku Most-Constrained Value Heuristic' - karis

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

SudokuMost-Constrained Value Heuristic

• Two variable are created C and N

• C  is the amount of numbers 1-9 that can appear in a given cell

• N  is the amount of locations a single number

1-9 can appear in a given square

• Look at the second square in the first column

• Blue marks numbers that can be added to current cell

2,6

1,2,6

2,3,6

3,6

7,6

• C = 2 for cells 2, 6, and 7

• C = 3 for cells 4 and 5

• N = 1 for numbers 1 and 7

• N = 2 for number 3

• N = 3 for number 2

• N = 5 for number 6

2,6

1,2,6

2,3,6

3,6

7,6

• Heuristic will select 1 for cell 4 and 7 for cell 6 resulting in the square

• By keeping track of two variables the heuristic is able to make a more informed decision when selecting a cell and a number to place in the given cell, and therefore reducing the amount of searching to find a solution.

• With the example it can be shown that cell 4 would not have been selected because its C value was too high but the N value for the number 1 was exactly 1 and therefore the best solution.