Heuristic repair and sudoku
This presentation is the property of its rightful owner.
Sponsored Links
1 / 13

Heuristic Repair and Sudoku PowerPoint PPT Presentation


  • 49 Views
  • Uploaded on
  • Presentation posted in: General

Heuristic Repair and Sudoku. Sharon Hastings Artificial Intelligence. What is Heuristic Repair?. Generate a possible solution that is close to the goal This can be done randomly or using a heuristic Make changes that reduce the distance of the state from the goal. Sudoku Puzzle.

Download Presentation

Heuristic Repair and Sudoku

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


Heuristic repair and sudoku

Heuristic Repair and Sudoku

Sharon Hastings

Artificial Intelligence


What is heuristic repair

What is Heuristic Repair?

  • Generate a possible solution that is close to the goal

    • This can be done randomly or using a heuristic

  • Make changes that reduce the distance of the state from the goal


Sudoku puzzle

Sudoku Puzzle

To solve this puzzle using heuristic repair a possible solution must be generated.


Heuristic repair and sudoku

This solution is generated by filling in the board, avoiding any conflicts within a 3x3 or a column.

The only conflicts that exist are within the rows.


Heuristic repair and sudoku

Now check the conflicts and use heuristic repair to find the solution.

Let’s begin looking at the 9 in the top left 3x3.

This 9 has no conflicts. So we can move on to the 7.


Heuristic repair and sudoku

The 7 has two conflicts.

Now, check other places in column of that 3x3.

Where the 5 is, 7 would have no conflicts.

Swap 5 and 7.


Heuristic repair and sudoku

Now check 5. 5 has no conflicts in it’s new location.

Notice the1 in the top middle 3x3 also has no conflicts.

Now, the 7 may be examined.


Heuristic repair and sudoku

This 7 has one conflict.

Where 5 is, 7 still has one conflict.

Where 4 is 7 has no conflicts.

Swap 7 and 4.


Heuristic repair and sudoku

Now check 4.

4 has no conflicts.

Now examine the 6 in the right top 3x3.


Heuristic repair and sudoku

The 6 has one conflict.

Where 2 is, 6 would have no conflicts.

Swap 2 and 6.


Heuristic repair and sudoku

2 has no conflicts.

No more conflicts exist in the top 3x3 boxes.


Heuristic repair and sudoku

Now look at the middle row of 3x3 boxes.


Heuristic repair and sudoku

Now look at the bottom row of 3x3 boxes.

SOLUTION!!


  • Login