高级人工智能

摘要

国立台湾大学于天立教授的视频笔记

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 ∞ \infty )

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 O ( b d ) O(b^d) O(bd) O ( b d ) O(b^d) O(bd)
Uniform-cost search

an special example of BFS

expand the unexpanded node with the lowest path cost

Priority queue orderd by g ( n ) g(n) g(n)

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 O ( b 1 + ⌊ C ∗ ϵ ⌋ ) O(b^{1+\lfloor \frac{C^*}{\epsilon}\rfloor}) O(b1+ϵC) O ( b 1 + ⌊ C ∗ ϵ ⌋ ) O(b^{1+\lfloor \frac{C^*}{\epsilon}\rfloor}) O(b1+ϵC)
Depth-first search(DFS)

1,expand the deepest unexpand node

2,stack

Completeness Optimality Time complexity Space complexity
No No O ( b m ) O(b^m) O(bm) O ( m ) O(m) O(m) !!! 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 O ( b d ) O(b^d) O(bd) O ( b d ) O(bd) O(bd)
Bidirectional Search
Summay

a:if b is finite

b:if b is finite and step cost >= ϵ \epsilon ϵ

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 Y a Y^a Y
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值