收藏 分享(赏)

人工智能原理人工智能原理 (14).pdf

上传人:职教中心 文档编号:13709794 上传时间:2022-10-11 格式:PDF 页数:6 大小:453.17KB
下载 相关 举报
人工智能原理人工智能原理 (14).pdf_第1页
第1页 / 共6页
人工智能原理人工智能原理 (14).pdf_第2页
第2页 / 共6页
人工智能原理人工智能原理 (14).pdf_第3页
第3页 / 共6页
亲,该文档总共6页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

1、Principles of Artificial Intelligence 1Uninformed Search StrategiesArtificial Intelligence : Searching : Search 2 Search Strategy 搜索策略Expand lowest-cost unexpanded node.扩展最低代价的 未扩展 节点。 Implementation 实现方法Queue ordered by path cost, lowest first.队列 ,按 路径 代价 排序 , 最低优先 。Uniform-cost Search 一致代价搜索3.4.2.

2、 Uniform-cost SearchArtificial Intelligence : Searching : Search 3Uniform-cost Search Algorithm 一致代价搜索 算法3.4.2. Uniform-cost Searchfunction UNIFORM-FIRST-SEARCH(problem) returns a solution, or failurenode a node with STATE = problem.INITIAL-STATE, PATH-TEST = 0frontier a priority queue ordered by PA

3、TH-COST, with node as the only elementexplored an empty setloop doif EMPTY ? (frontier) then return failurenode POP(frontier) /* chooses the lowest-cost node in frontier */if problem.GOAL-TEST(node.STATE) then return SOLUTION(node)add node.STATE to exploredfor each action in problem.ACTIONS(node.STA

4、TE) dochild CHILD-NODE(problem, node, action)if child.STATE is not in explored or frontier thenfrontier INSERT(child, frontier)else if child.STATE is in frontier with higher PATH-COST thenreplace that frontier node with childArtificial Intelligence : Searching : Search 4 From Sibiu to Bucharest, lea

5、st-cost node, Rimnicu Vilcea, is expanded, next, adding Pitesti with cost 80 + 97 = 177.从 Sibiu到 Bucharest,扩展最低代价节点 Rimnicu Vilcea,然后加上 Pitesti的代价 The least-cost node is now Fagaras, and adding goal node Bucharest with cost 99 + 211 = 310.现在最低代价节点为 Fagaras,加上目标节点 Bucharest的代价Example: From Sibiu to B

6、ucharest 举例: 从 Sibiu到 Bucharest3.4.2. Uniform-cost Search Choosing Pitesti and adding a second path to Bucharest with cost 177 + 101 = 278.选择 Pitesti并 加上第二条路径到 Bucharest的代价 This new path is better, so lowest path cost is 278.这条新路径较好,故最低路径代价为 278.Artificial Intelligence : Searching : Search 5 Time complexity时间复杂性 Space complexity空间复杂性where b - the branching factor分支 因子 C* - the cost of the optimal solution最优解 的代价 - every action costs at least至少 每个动作的代价Properties of Uniform-cost Search 一致 代价搜索的特性3.4.2. Uniform-cost SearchO(b1 + C*/) O(b1 + C*/)

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高等教育 > 大学课件

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报