Informed (Heuristic) Search Strategies: Dept. of Computer Science Faculty of Science and Technology
Informed (Heuristic) Search Strategies: Dept. of Computer Science Faculty of Science and Technology
Informed (Heuristic) Search Strategies: Dept. of Computer Science Faculty of Science and Technology
SEARCH STRATEGIES
Course Title: Artificial Intelligence and Expert System
Course Code: CSC4226
1. BEST-FIRST SEARCH
3. A* SEARCH
5. OPTIMALITY OF A*
INFORMED SEARCH STRATEGY
roblem-specific knowledge
is the extra bit of information the program uses rather than
the problem formulation, thus known as Informed Search
BEST-FIRST SEARCH
F= 0 + 366
F= 366
Arad Fagaras
Sibiu F= 239 + 178
F= 417
F= 140 + 253
F= 393
F= 220 + 193 Bucharest(2)
F= 118 + 329
F= 413
F= 447 F= 450 + 0
Rimnicu F= 450
Timisoara
Bucharest
F= 418 + 0
F= 418
Pitesti
F= 317 + 98
Craiova F= 415
F= 366 + 160
F= 526
A∗ SEARCH FOR BUCHAREST
A∗ SEARCH FOR BUCHAREST
CONDITIONS FOR OPTIMALITY:
ADMISSIBILITY AND CONSISTENCY
• The first condition we require for optimality is that h(n) be an
admissible heuristic
• An admissible heuristic is one that never overestimates the cost to
reach the goal
• Because g(n) is the actual cost to reach n along the current path,
and f(n)=g(n) + h(n), we have as an immediate consequence that
f(n) never overestimates the true cost of a solution along the
current path through n.
• Admissible heuristics are by nature optimistic because they think
the cost of solving the problem is less than it actually is.
ADMISSIBILITY
CONSISTENCY
• A second, slightly stronger condition called consistency (or
sometimes monotonicity) is required only for applications of A∗
to graph search.
• A heuristic h(n) is consistent if, for every node n and every
successor n of n generated by any action a, the estimated cost of
reaching the goal from n is no greater than the step cost of getting
to n plus the estimated cost of reaching the goal from n :
h(n) ≤ c(n, a, n’) + h(n’).
• This is a form of the general triangle inequality, which stipulates
that each side of a triangle cannot be longer than the sum of the
other two sides
OPTIMALITY OF A*
A∗ has the following properties: the tree-search version of A∗ is optimal if h(n) is
admissible, while the graph-search version is optimal if h(n) is consistent.
if h(n) is consistent, then the values of f(n) along any path are nondecreasing.
The proof follows directly from the definition of consistency. Suppose n is a
successor of n; then g(n’)=g(n) + c(n, a, n’) for some action a, and we have
f(n) = g(n) + h(n) = g(n) + c(n, a, n) + h(n) ≥ g(n) + h(n) = f(n) .
The next step is to prove that whenever A∗ selects a node n for expansion, the
optimal path to that node has been found. Were this not the case, there would have
to be another frontier node n on the optimal path from the start node to n. because
f is nondecreasing along any path, n would have lower f-cost than n and would
have been selected first.
References