Download Materials Engineering and more Summaries Material Engineering in PDF only on Docsity!
Set 3: Informed Heuristic Search
ICS 271 Fall 2016
Kalev Kask
Basic search scheme
• We have 3 kinds of states
– explored (past) – only graph search
– frontier (current)
– unexplored (future) – implicitly given
• Initially frontier=start state
• Loop until found solution or exhausted state space
– pick/remove first node from frontier using search strategy
- priority queue – FIFO (BFS), LIFO (DFS), g (UCS), f (A*), etc.
– check if goal
– add this node to explored,
– expand this node, add children to frontier (graph search : only
those children whose state is not in explored list)
– Q: what if better path is found to a node already on explored list?
What is a heuristic?
Heuristic Search
- State-Space Search: every problem is like search of a map
- A problem solving agent finds a path in a state-space graph from start
state to goal state, using heuristics
h= 253
h= h= Heuristic = straight-line distance
State Space for Path Finding on a Map
Greedy Search Example
State Space of the 8 Puzzle
Problem 1 2
4 5 6 7 8
h1=4 h1=
h1 = number of misplaced tiles
h2=9 h2=
h2 = Manhattan distance
What are Heuristics
- Rule of thumb, intuition
- A quick way to estimate how close we are to the
goal. How close is a state to the goal..
- Pearl: “the ever-amazing observation of how much
people can accomplish with that simplistic, unreliable
information source known as intuition .”
8 - puzzle
- h1(n): number of misplaced tiles
- h2(n): Manhattan distance
- h3(n): Gaschnig’s
- Path-finding on a map
- Euclidean distance h 1 (S) =? 8 h 2 (S) =? 3+1+2+2+2+3+3+2 = 18 h 3 (S) =? 8
Heuristic Functions
- 8 - puzzle
- Number of misplaced tiles
- Manhattan distance
- Gaschnig’s
- 8 - queen
- Number of future feasible slots
- Min number of feasible slots in a
row
- Min number of conflicts (in
complete assignments states)
- Travelling salesperson
- Minimum spanning tree
- Minimum assignment problem
C
A D
E
F
B
Best-First (Greedy) Search: f(n) = number of misplaced tiles
Greedy Best-First Search Example
Greedy Best-First Search Example
Greedy Best-First Search Example
Problems with Greedy Search
• Not complete
– Gets stuck on local minimas and plateaus
• Infinite loops
• Irrevocable
• Not optimal
• Can we incorporate heuristics in systematic
search?