
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A lecture note from cs 1571 introduction to artificial intelligence course by milos hauskrecht. It covers the topic of informed search methods, specifically uniform cost search, best-first search, and greedy search. The notes explain the concepts, provide examples, and discuss the properties and limitations of each method.
Typology: Assignments
1 / 24
This page cannot be seen from the preview
Don't miss anything!
CS 1571 Intro to AI M. Hauskrecht
Milos Hauskrecht
milos@cs.pitt.edu
5329 Sennott Square
Course web page: http://www.cs.pitt.edu/~milos/courses/cs1571/
CS 1571 Intro to AI M. Hauskrecht
f ( n )
g ( n )
f ( n )= g ( n )
CS 1571 Intro to AI M. Hauskrecht
Best-first search
Special cases (differ in the design of evaluation function):
f ( n )
f ( n )= h ( n )
f ( n )= g ( n )+ h ( n )
h ( n )
f ( n )= h ( n )
CS 1571 Intro to AI M. Hauskrecht
Arad 366
f(n)=h(n) queue (^) Arad 366
Arad
Zerind Sibiu Timisoara
366 75 140 118
374 253 329
queue Sibiu 253 Timisoara 329 Zerind 374
f(n)=h(n)
CS 1571 Intro to AI M. Hauskrecht
Even if we reach the goal, we may be biased by a bad heuristic estimate. Evaluation function disregards the cost of the path built so far.
O ( bm )
O ( bm )
Worst case !!! But often better!
Often better!
CS 1571 Intro to AI M. Hauskrecht
Total: 450
Total: 450
Total: 418
CS 1571 Intro to AI M. Hauskrecht
Arad
Zerind Sibiu Timisoara
366 75 140 118
449 393 447
queue (^) Sibiu 393 Timisoara 447 Zerind 449
f(n)
Arad
Zerind Sibiu Timisoara
75 140 118
Zerind Sibiu
Arad Oradea Fagaras RimnicuVilcea
366
(^140 151 99 )
646 526 417 413
449 393 447
Rimnicu V. 413 Fagaras 417 Timisoara 447 Zerind 449 Oradea 526 Arad 646
queue
f(n)
CS 1571 Intro to AI M. Hauskrecht
Arad
Zerind Sibiu Timisoara
75 140 118
Zerind Sibiu
Arad Oradea Fagaras RimnicuVilcea
366
(^140 151 99 )
646 526 417 413
449 393 447
Craiova Pitesti Sibiu 526 415 553
146 97 80
447
Pitesti 415 Fagaras 417 Timisoara 447 Zerind 449 Oradea 526 Craiova 526 Sibiu 553 Arad 646
queue
f(n)
Arad
Zerind Sibiu Timisoara
75 140 118
Zerind Sibiu
Arad Oradea Fagaras RimnicuVilcea
366
(^140 151 99 )
646 526 417 413
449 393 447
Craiova Pitesti Sibiu 526 415 553
146 97 80
Craiova Bucharest 607 615 418
97 138 101 Rimnicu Vilcea
447447
Fagaras 417 Bucharest 418 Timisoara 447 Zerind 449 Oradea 526 Craiova 526 Sibiu 553 Rimnicu V. 607 Arad 646
queue
f(n)
CS 1571 Intro to AI M. Hauskrecht
It can overestimate, be equal or underestimate the true distance of a node to the goal
h *^ ( n )
h ( n )
CS 1571 Intro to AI M. Hauskrecht
400
overestimate
f(n)= 220+400= 400
f(n)= 239+178= 417
CS 1571 Intro to AI M. Hauskrecht
Example: the straight-line distance in the travel problem never overestimates the actual distance
Is A search with an admissible heuristic is optimal ??*
h ( n )≤ h *^ ( n ) for all n
h *^ ( n )
h ( n )
( ) since isadmissible
( 1 ) sinceG2issuboptimal
( 2 ) ( 2 ) since ( 2 ) 0
f n h
g G
f G g G hG
start
G
G
n
Then:
And thus A never selects G2 before* n
CS 1571 Intro to AI M. Hauskrecht
CS 1571 Intro to AI M. Hauskrecht
Heuristics 1: number of misplaced tiles
Initial position Goal position
h(n) for the initial position: 7
Initial position Goal position
h(n) for the initial position:
CS 1571 Intro to AI M. Hauskrecht
Initial position Goal position
h(n) for the initial position: 2 + 3 + 3 + 1 + 1 + 2 + 0 + 2 = 14
For tiles: 1 2 3 4 5 6 7 8
∀ n h 1 ( n )≥ h 2 ( n )
h 1 h 2
h 3 (^) ( n )=max( h 1 ( n ), h 2 ( n ))
h 1 , h 2
Then:
is admissible