Download presentation
Presentation is loading. Please wait.
1
EA C461 – Artificial Intelligence
2
EA C461 – Artificial Intelligence
To Discuss Uninformed Search Strategies ( Breadth First Search, Uniform Cost Search, Depth First Search, Depth Limited Search, Iterative Deepening Search, Bidirectional Search ) Handling Partial Information Informed Search Strategies (Best First Search, Greedy Best First Search, A* Search, Memory Bounded Heuristic Search ) EA C461 – Artificial Intelligence
3
Iterative deepening search
EA C461 – Artificial Intelligence
4
Iterative deepening search l =0
EA C461 – Artificial Intelligence
5
Iterative deepening search l =1
EA C461 – Artificial Intelligence
6
Iterative deepening search l =2
EA C461 – Artificial Intelligence
7
Iterative deepening search l =3
EA C461 – Artificial Intelligence
8
Iterative deepening search
N(IDS) = (d) (b) + (d-1) (b2) + (d-2) (b3) + (d-3) (b4) + (d-4) (b5) + …+(bd) N(BFS) = b + b2 + b3 + b4 + …+ bd + (bd+1 b) For b=10, d=5 N(IDS) = , ,00 = 123,450 N(BFS) = , , ,990 = 1,111,100 IDS is the preferred uninformed search method when there is a large search space, and the depth is unknown EA C461 – Artificial Intelligence
9
Iterative deepening search
For b = 10, d = 5, NDLS = , , ,000 = 111,111 NIDS = , , ,000 = 123,456 Overhead = (123, ,111)/111,111 = 11% EA C461 – Artificial Intelligence
10
Properties of iterative deepening search
Complete? Yes Time? (d+1)b0 + d b1 + (d-1)b2 + … + bd = O(bd) Space? O(bd) Optimal? Yes, if step cost = 1 EA C461 – Artificial Intelligence
11
EA C461 – Artificial Intelligence
Summary of algorithms EA C461 – Artificial Intelligence
12
EA C461 – Artificial Intelligence
bidirectional search d d/2 d/2 Time ~ bd/2 + bd/2 < bd EA C461 – Artificial Intelligence
13
EA C461 – Artificial Intelligence
Repeated states Failure to detect repeated states can turn a linear problem into an exponential one! EA C461 – Artificial Intelligence
14
EA C461 – Artificial Intelligence
Graph search EA C461 – Artificial Intelligence
15
Searching with Partial Information
Sensorless Problems (Conformant problems) Contingency Problems Exploration Problems EA C461 – Artificial Intelligence
16
EA C461 – Artificial Intelligence
Summary Problem formulation usually requires abstracting away real-world details to define a state space that can feasibly be explored Variety of uninformed search strategies Iterative deepening search uses only linear space and not much more time than other uninformed algorithms EA C461 – Artificial Intelligence
17
Informed Search Techniques
Heuristic / Informed Uses additional information about nodes (heuristics) that have not yet been explored to decide which nodes to examine next Blind / Uninformed Assumes no additional information about the problem Heuristic function h (n) used in search provides an estimate of the distance from any given node to a goal node EA C461 – Artificial Intelligence
18
EA C461 – Artificial Intelligence
Best First Search A node is selected for expansion based on an evaluation function f(n) Choose the node which appears to be best while expanding Best First Search algorithms differs in the evaluation function Evaluation function incorporate the problem specific knowledge in the form of h(n) h(n) heuristic function , a component of f(n) Estimated cost of cheapest path to the goal node h(n) = 0, if n is the goal node Greedy Best First Search, A* Search EA C461 – Artificial Intelligence
19
Greedy best-first search
Expands the node that is closest to the goal Consider route finding problem in Romania Use of hSLD, Straight Line Distance Heuristic Evaluation function f(n) = h(n) (heuristic), estimate of cost from n to goal For the problem of finding route from Arad to Burcharest… EA C461 – Artificial Intelligence
20
EA C461 – Artificial Intelligence
Optimal Distance = 418 EA C461 – Artificial Intelligence
21
Greedy best-first search
EA C461 – Artificial Intelligence
22
Greedy best-first search
EA C461 – Artificial Intelligence
23
Greedy best-first search
EA C461 – Artificial Intelligence
24
Greedy best-first search
EA C461 – Artificial Intelligence
25
EA C461 – Artificial Intelligence
Optimal Distance = 418 EA C461 – Artificial Intelligence
26
EA C461 – Artificial Intelligence
Critics Minimizing f(n) is susceptible to false start Same issues with DFS Not optimal, Incomplete (may search an infinite path) Performance depends problem and heuristic O(bm) Worst case space needed EA C461 – Artificial Intelligence
27
EA C461 – Artificial Intelligence
A* Search A better form of best-first search f(n)=g(n) + h(n) g(n) the cost to reach the node h(n) the estimated cost of the cheapest path from n to the goal f(n) the estimated cost of the cheapest solution through the node n h(n) Admissible Heuristic / Consistent (in case of graph search) EA C461 – Artificial Intelligence
28
EA C461 – Artificial Intelligence
A* search EA C461 – Artificial Intelligence
29
EA C461 – Artificial Intelligence
A* search EA C461 – Artificial Intelligence
30
EA C461 – Artificial Intelligence
A* search EA C461 – Artificial Intelligence
31
EA C461 – Artificial Intelligence
A* search EA C461 – Artificial Intelligence
32
EA C461 – Artificial Intelligence
A* search EA C461 – Artificial Intelligence
33
EA C461 – Artificial Intelligence
A* search EA C461 – Artificial Intelligence
34
A* Search : Admissible heuristics
A heuristic h(n) is admissible if for every node n, h(n) ≤ h*(n), where h*(n) is the true cost to reach the goal state from n An admissible heuristic never overestimates the cost to reach the goal, i.e., it is optimistic Example: hSLD(n) (never overestimates the actual road distance) Theorem: If h(n) is admissible, A* using TREE-SEARCH is optimal EA C461 – Artificial Intelligence
35
A* Search : Optimality of A* (proof)
Suppose some suboptimal goal G2 has been generated and is in the fringe. Let n be an unexpanded node in the fringe such that n is on a shortest path to an optimal goal G. f(G2) = g(G2), since h(G2) = 0 g(G2) > g(G), since G2 is suboptimal f(G) = g(G), since h(G) = 0 f(G2) > f(G), from above Hence f(G2) > f(n), and A* will never select G2 for expansion EA C461 – Artificial Intelligence
36
A* Search: Repeated states
Sub optimal solutions can be returned, if we discard the optimal path to a repeated node Can be handled by keeping all nodes expanded in memory, and when repeated make a decision based on their costs Make Sure, repeated nodes are costlier Requires the heuristic to be consistent EA C461 – Artificial Intelligence
37
A* Search : Consistent heuristics
A heuristic is consistent if for every node n, every successor n' of n generated by any action a, h(n) ≤ c(n,a,n') + h(n') If h is consistent, we have f(n') = g(n') + h(n') = g(n) + c(n,a,n') + h(n') ≥ g(n) + h(n) = f(n) i.e., f(n) is non-decreasing along any path. Theorem: If h(n) is consistent, A* using GRAPH-SEARCH is optimal EA C461 – Artificial Intelligence
38
EA C461 – Artificial Intelligence
A* Characteristics A* expands no nodes with f(n)>C* These nodes are said to be pruned This pruning still guarantees optimality Expands nodes in the increasing order of costs A* is optimally efficient For a given heuristic, A* finds optimal solution with the fewest number of nodes expansion Any algorithm that doesn’t expand nodes with f(n)<C* has the risk of missing an optimal solution For most problems the number of nodes with costs lesser than C* is exponential EA C461 – Artificial Intelligence
39
EA C461 – Artificial Intelligence
Memory Bounded Heuristic Search Iterative-deepening A* (IDA*) uses f-value (g + h) as the cutoff Keep increase the cutoff for each iteration by the smallest amount, in excess of the current cutoff EA C461 – Artificial Intelligence
40
Recursive best-first search
Keeps track of the f-value of the best-alternative path available. If current f-values exceeds this alternative f-value than backtrack to alternative path. Upon backtracking change f-value to best f-value of its children. Re-expansion of this result is thus still possible. EA C461 – Artificial Intelligence
41
Recursive best-first search, ex.
EA C461 – Artificial Intelligence
42
Recursive best-first search, ex.
EA C461 – Artificial Intelligence
43
Recursive best-first search, ex.
EA C461 – Artificial Intelligence
44
EA C461 – Artificial Intelligence
RBFS evaluation RBFS is a bit more efficient than IDA* Still excessive node generation (mind changes) Like A*, optimal if h(n) is admissible Space complexity is O(bd). IDA* retains only one single number (the current f-cost limit) Time complexity difficult to characterize Depends on accuracy if h(n) and how often best path changes. IDA* en RBFS suffer from too little memory. EA C461 – Artificial Intelligence
45
EA C461 – Artificial Intelligence
Consider a state space in which start state is numbered 1 and the successor function for state n returns two states, numbered 2n and 2n+1. Draw the portion of the state space for states 1 to 15. Suppose the goal state is 11. List the order in which nodes will be visited for BFS, DFS, IDS. Explain how do you apply Bidirectional search to this problem In that case, what is the branching factor in each direction EA C461 – Artificial Intelligence
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.