artificial intelligence lecture 5 uninformed search
TRANSCRIPT
![Page 1: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/1.jpg)
Artificial IntelligenceArtificial Intelligence
Lecture 5
Uninformed Search
![Page 2: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/2.jpg)
OverviewOverview
Searching for Solutions Uninformed Search
• BFS• UCS• DFS• DLS• IDS
![Page 3: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/3.jpg)
Searching for SolutionsSearching for Solutions
![Page 4: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/4.jpg)
Tree Search AlgorithmsTree Search Algorithms
![Page 5: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/5.jpg)
Tree Search ExampleTree Search Example
![Page 6: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/6.jpg)
Implementation:Implementation:State vs. NodesState vs. Nodes
and state
![Page 7: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/7.jpg)
General Tree SearchGeneral Tree Search
![Page 8: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/8.jpg)
Search StrategiesSearch Strategies
![Page 9: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/9.jpg)
Uninformed SearchUninformed Search
![Page 10: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/10.jpg)
Uninformed Search StrategiesUninformed Search Strategies
Use only the information available in the problem definition• Breadth-first search• Uniform-cost search• Depth-first search• Depth-limit search• Iterative deepening search
![Page 11: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/11.jpg)
Breadth-First SearchBreadth-First Search
Expand shallowest unexpanded node Implementation: fringe is a FIFO queue, that is
new successors go at end
![Page 12: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/12.jpg)
Properties of BFSProperties of BFS
Complete?• Yes. (if b is finite)
Time?• 1+b+b2+…+b(bd-1)=O(bd+1), exp in d
Space?• O(bd+1) (keeps every node in memory)
Optimal? • Yes, if cost = 1 per step; not optimal in general when
actions have different cost Space is the big problem; can easily generate
nodes at 10MB/sec, so 24hrs = 860GB
![Page 13: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/13.jpg)
Uniform-Cost SearchUniform-Cost Search
![Page 14: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/14.jpg)
Depth-First SearchDepth-First Search
Expanded deepest unexpanded node Implementation:
• Fringe = LIFO queue, i.e. put successors at front
![Page 15: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/15.jpg)
Properties of DFSProperties of DFS
Complete? • No. Fails in infinite-depth spaces, spaces with loops• Modify to avoid repeated states along path => complete
in finite space Time?
• O(bm), terrible if m is much larger than d, but if solutions are dense, may be much faster than BFS
Space?• O(bm), linear space
Optimal?• No
![Page 16: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/16.jpg)
Depth-Limit SearchDepth-Limit Search
Depth-first search with depth limit L, that is nodes at depth L have no successors
![Page 17: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/17.jpg)
Depth-Limited searchDepth-Limited search
Is DF-search with depth limit l.• i.e. nodes at depth l have no successors.• Problem knowledge can be used
Solves the infinite-path problem. If l < d then incompleteness results. If l > d then not optimal. Time complexity: Space complexity:
O(bl )
O(bl)
![Page 18: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/18.jpg)
Depth-Limit SearchDepth-Limit Search
Algorithm
![Page 19: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/19.jpg)
Iterative Deepening SearchIterative Deepening Search
Iterative deepening search• A general strategy to find best depth limit l.
Goals is found at depth d, the depth of the shallowest goal-node.
• Often used in combination with DF-search
Combines benefits of DF- en BF-search
![Page 20: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/20.jpg)
Iterative Deepening SearchIterative Deepening Search
![Page 21: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/21.jpg)
Properties of IDSProperties of IDS
![Page 22: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/22.jpg)
Bidirectional searchBidirectional search
Two simultaneous searches from start an goal.• Motivation:
Check whether the node belongs to the other fringe before expansion. Space complexity is the most significant weakness. Complete and optimal if both searches are BF.
bd / 2 bd / 2 bd
![Page 23: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/23.jpg)
How to search backwards?How to search backwards?
The predecessor of each node should be efficiently computable.• When actions are easily reversible.
![Page 24: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/24.jpg)
Summary of AlgorithmsSummary of Algorithms
Criterion Breadth-First
Uniform-cost
Depth-First Depth-limited
Iterative deepening
Bidirectional search
Complete? YES* YES* NO YES, if l d
YES YES*
Time bd+1 bC*/e bm bl bd bd/2
Space bd+1 bC*/e bm bl bd bd/2
Optimal? YES* YES* NO NO YES YES
![Page 25: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/25.jpg)
Repeated StatesRepeated States
![Page 26: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/26.jpg)
Graph SearchGraph Search
![Page 27: Artificial Intelligence Lecture 5 Uninformed Search](https://reader033.vdocuments.mx/reader033/viewer/2022050809/56649efa5503460f94c0c858/html5/thumbnails/27.jpg)
SummarySummary
Searching for Solutions Uninformed Search
• BFS• UCS• DFS• DLS• IDS