1 / 8

Sudoku Most-Constrained Value Heuristic

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.

karis
Download Presentation

Sudoku Most-Constrained Value Heuristic

An Image/Link below is provided (as is) to download presentation 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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SudokuMost-Constrained Value Heuristic

  2. 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

  3. Example

  4. Example • Look at the second square in the first column

  5. Example • Blue marks numbers that can be added to current cell 2,6 1,2,6 2,3,6 3,6 7,6

  6. Example • 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

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

  8. Why Two Variables • 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.

More Related