Uninformed Search
Uninformed Search
Agents
Uninformed
search
[Some slides created by Dan Klein and Pieter Abbeel for Intro to AI at UC Berkeley (ai.berkeley.edu). Some slides were taken from Columbia University AI course]
https://st3.depositphotos.com/1005404/18747/i/1600/depositphotos_187473334-stock-photo-search-white-robot-and-lens.jpg
Uninformed
search
- Use no domain knowledge!
156 kilobytes!
Quiz: DFS vs BFS
When will BFS outperform DFS?
https://slideplayer.com/slide/12719512/
If have some knowledge about the
problem, may be we don’t need to
go to a full depth.
https://ds055uzetaobb.cloudfront.net/image_optimizer/5f3b305766eb8a8847f54619c1e697f36cd7b1e6.png
For this
problem
• BFS will find the shortest
path which may be costly.
• What if we want the
cheapest not shallowest
solution?
• Modify BFS: Prioritize by
cost not depth → Expand
node n with the lowest path
cost g(n)
• Explores increasing costs.
Uniformed-
cost search
Pseudo-code
Uniform-cost search
Let’s say we need to go from Baku to
Sheki. 70
Sheki Ganja
230
Sheki, because it need to expand only
350
twice. Total distance = 30 + 350 = 380
S 0
d 3 e 9 p 1
b 4 c e 5 h 17 r 11 q 16
11
Cost a 6 a h 13 r 7 p q f
contours
p q f 8 q c G
q 11 c G 10 a
a
Video of Demo Empty UCS
Video of Demo Contours UCS Pacman
Small Maze
Video of Demo Maze with Deep/Shallow Water --- DFS, BFS, or UCS?
(part 1)
Video of Demo Maze with Deep/Shallow Water --- DFS, BFS, or UCS? (part 2)
Video of Demo Maze with Deep/Shallow Water --- DFS, BFS, or UCS? (part 3)
Examples using the map
Start: Las Vegas
Goal: Calgary
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,
Charleston, Nashville, Saint Louis, Chicago, Duluth, Helena, Calgary.
Examples using the map
Start: Las Vegas
Goal: Calgary
UCS
Order of Visit: Las Vegas, Los Angeles, Salt Lake City, San Francisco, Phoenix, Denver, Helena,
El Paso, Santa Fe, Portland, Seattle, Omaha, Kansas City, Calgary.
8 Puzzle
https://kartikkukreja.files.wordpress.com/2015/06/8puzzle1.jpg
Example DFS
https://www.darpa.mil/ 43
Example
BFS
https://www.darpa.mil/ 44
Summary of algorithms