Search Agents Uninformed Search: Artificial Intelligence
Search Agents Uninformed Search: Artificial Intelligence
Lecture 04
Search Agents
Uninformed search
Uninformed search
Strategies:
Strategies:
Strategies:
Strategies:
Strategies:
BFS criteria?
BFS
• Time 1 + b + b2 + b3 + . . . + bd = O(bd)
• Space O(bd)
Note: If the goal test is applied at expansion rather than gen-
eration then O(bd+1)
Time and Memory requirements for breadth-first search for a branching factor
b=10; 1 million nodes per second; 1,000 bytes per node.
BFS
Time and Memory requirements for breadth-first search for a branching factor
b=10; 1 million nodes per second; 1,000 bytes per node.
DFS criteria?
DFS
• Complete No: fails in infinite-depth spaces, spaces with loops
Modify to avoid repeated states along path.
⇒ complete in finite spaces
• Optimal No
Depth =16.
We go down from 10 exabytes in BFS to . . . in DFS?
DFS
Depth =16.
We go down from 10 exabytes in BFS to 156 kilobytes in DFS!
Depth-limited search
• DFS with depth limit l (nodes at level l has no successors).
• Select some limit L in depth to explore with DFS
• Iterative deepening: increasing the limit l
Depth-limited search
• If we know some knowledge about the problem, may be we
don’t need to go to a full depth.
• Idea: Iteratively increase the search limit until the depth of the
shallowest solution d is reached.
BFS
Order of Visit: Las Vegas, Los Angeles, Salt Lake City, El Paso, Phoenix, San Francisco,
Denver, Helena, Portland, Dallas, Santa Fe, Kansas City, Omaha, Calgary.
Examples using the map
Start: Las Vegas
Goal: Calgary
DFS
Order of Visit: Las Vegas, Los Angeles, El Paso, Dallas, Houston, New Orleans, Atlanta,
http://aima.cs.berkeley.edu/