高级人工智能
摘要
国立*大学于天立教授的视频笔记
Search
For example:
Inital state :No queen on the board
Actions : Add a queen on the board where the square is empty
Transition model : return the board with a queen added to the spacified squere
Goal test : 8 queens are on the board ,none attacked
Path cost : numbers of trials
Different States space will be have different Solution space
b:maximum branching factor of the search tree
d:depth of the least-cost solution
m:maximum depth of the state space (may be )
Uniformed Search 无信息搜索
Uniformed strategies use only the information available in the problem definition
Breadth-first search(BFS)
1,Expand the shallowest unexpanded node
2,FIFO queue
Completeness | Optimality | Time complexity | Space complexity |
---|---|---|---|
yes(if b is finite) | yes |
Uniform-cost search
an special example of BFS
expand the unexpanded node with the lowest path cost
Priority queue orderd by
equivalent to BFS if step costs all equal
For TREE-SEARCH , priority queue gives the cheapest path first
For GRAPH_SEARCH , if the node is already in the frontier , need to find the minimum cost , and call DECREASEKEY as needed
Completeness | Optimality | Time complexity | Space complexity |
---|---|---|---|
yes | yes |
Depth-first search(DFS)
1,expand the deepest unexpand node
2,stack
Completeness | Optimality | Time complexity | Space complexity |
---|---|---|---|
No | No | !!! linear |
Depth-limited search
Iterative deepening search(IDS)
Call DLS iteratively with increasing depth limit
Seems to be wasteful , but actually not
Combine the benefits of BFS and DFS
for depth = 0 to $\infty$
result = DLS(problem,depth)
if result != cutoff
return result
Completeness | Optimality | Time complexity | Space complexity |
---|---|---|---|
Yes | Yes only if step cost = 1 |
Bidirectional Search
Summay
a:if b is finite
b:if b is finite and step cost >=
c:unless >= d
d:if b is finite and both direction use complete search like BFS
e:if all steps cost are identical
Criterion | Breadth-first search | Uniform-Cost | Depth-first search(DFS) | Depth-limited search | Iterative deepening search(IDS) | Bi-Directional |
---|---|---|---|---|---|---|
Completeness | ||||||
Optimality | ||||||
Time Complexity | ||||||
Space Complexity |
Graph search can be exponentially more efficient than tree search
Informed Search 有信息搜索(启发式搜索)
Best-First Search
use an evaluation function() for each node to estimate the desirability
estimates the cost from node n to the closest goal
(1),Greedy search
(2), search
:the total cost
:
:
:
idea:Avoid expanding paths that are already expensive
(3),Optimality of
Optimality of search in tree search:
admissable:可容纳性:
Optimality of search in graph search:
consistent:一致性,三角不等式
Memory Bounded Search
(1),Ilerative deepending
(2),Recursive best-first search
(3),Simplified
Heuristic
(1),
(2),
上一篇: 人工智能:近邻算法