Presentation is loading. Please wait.

Presentation is loading. Please wait.

Informed Search Strategies Tutorial. Heuristics for 8-puzzle These heuristics were obtained by relaxing constraints … (Explain !!!) h1: The number of.

Similar presentations


Presentation on theme: "Informed Search Strategies Tutorial. Heuristics for 8-puzzle These heuristics were obtained by relaxing constraints … (Explain !!!) h1: The number of."— Presentation transcript:

1 Informed Search Strategies Tutorial

2 Heuristics for 8-puzzle These heuristics were obtained by relaxing constraints … (Explain !!!) h1: The number of misplaced tiles (squares with number). h2: The sum of the distances of the tiles from their goal positions.

3 Heuristics for 8-puzzle I The number of misplaced tiles (not including the blank) 123 456 78 123 456 78 123 456 78 123 456 78 NNN NNN NY In this case, only “8” is misplaced, so the heuristic function evaluates to 1. In other words, the heuristic is telling us, that it thinks a solution might be available in just 1 more move. Goal State Current State Notation: h(n) h(current state) = 1

4 Heuristics for 8-puzzle II The Manhattan Distance (not including the blank) In this case, only the “3”, “8” and “1” tiles are misplaced, by 2, 3, and 3 squares respectively, so the heuristic function evaluates to 8. In other words, the heuristic is telling us, that it thinks a solution is available in just 8 more moves. 328 456 71 123 456 78 Goal State Current State 33 8 8 1 1 2 spaces 3 spaces Total 8 Notation: h(n) h(current state) = 8

5 Greedy Search (with systematic checking of repeated states) 8-Puzzle with h2() h2(): Manhattan Distance

6 8-Puzzle Problem Solve the following 8-puzzle problem using Greedy search algorithm as search strategy and Manhattan distance as heuristic. 5 67 84 321 87 654 321

7 Greedy Search (with systematic checking of repeated states) 8-Puzzle with h1() h1(): the number of misplaced tiles

8 8-Puzzle Problem Solve the following 8-puzzle problem using Greedy search algorithm as search strategy and h1() as heuristic. 5 67 84 321 87 654 321

9 A* Search (with systematic checking of repeated states) 8-Puzzle with h1() h1(): the number of misplaced tiles

10 8-Puzzle Problem Solve the following 8-puzzle problem using A* search algorithm as search strategy and the following function f(n) as heuristic: f(n)=g(n)+h(n) –h(n):the number of misplaced tiles –g(n):the number of steps from the initial state 57 461 382 567 48 321

11 A* Search (with systematic checking of repeated states) 8-Puzzle with h2() h2(): Manhattan Distance

12 8-Puzzle Problem Solve the following 8-puzzle problem using A* search algorithm as search strategy and the following function f(n) as heuristic: f(n)=g(n)+h(n) –h(n):the Manhattan Distance –g(n):the number of steps from the initial state 57 461 382 567 48 321

13 IDA* Search 8-Puzzle with h1() h1(n): the number of misplaced tiles

14 8-Puzzle Problem Solve the following 8-puzzle problem using IDA* search algorithm as search strategy and the following function f(n) as heuristic: f(n)=g(n)+h(n) –h(n):the number of misplaced tiles –g(n):the number of steps from the initial state 57 461 382 567 48 321


Download ppt "Informed Search Strategies Tutorial. Heuristics for 8-puzzle These heuristics were obtained by relaxing constraints … (Explain !!!) h1: The number of."

Similar presentations


Ads by Google