人工智能的游戏运用 Artificial Intelligence for Games

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
– NDLS = b0 + b1 + b2 + … + bd-2 + bd-1 + bd
• Number of nodes generated in an iterative deepening search to depth d with branching factor b:
– NIDS = (d+1)b0 + d.b1 + (d-1)b2 + … + 3bd-2 +2bd-1 + 1bd
– Initial state: Arad – Goal state: Bucharest – Do a uniform cost search by hand
Recap: Depth-first search
Depth-limited search
• depth-first search with depth limit L • nodes at depth L have no successors
Iterative deepening
• search to a depth limit L • if no solution research to limit L+1 • previous search repeated
Iterative deepening search: L = 0
Iterative deepening search: L = 1
Iterative deepening search: L = 2
Iterative deepening search: L = 3
Iterative deepening search
• Number of nodes generated in a depth-limited search to depth d with branching factor b:
• Uniform-cost search
– Cost to get to a node g(n) – Expand the least-cost unexpanded node – Implement with fringe ordered by path cost
• Romanian holiday:
Artificial Intelligence for Games
Depth limited search
Patrick Olivier p.l.olivier@ncl.ac.uk
Recap: Breadth-first search
Roadmap of Romania…
Class Exercise – Uniform-Cost
• For b=10, d=5:
– NDLS = 1 + 10 + 100 + 1,000 + 10,000 + 100,000 = 111,111 – NIDS = 6 + 50 + 400 + 3,000 + 20,000 + 100,000 = 123,456
• Overhead = (123,456 - 111,111)/111,111 = 11%
Summary of uninformed search
Properties of iterative deepening
• Complete?
– Yes
• Time:
– (d+1)b0 + d b1 + (d-1)b2 + … + bd = O(bd)
来自百度文库
• Space:
– O(bd)
• Optimal?
– If the cost is the same per step
相关文档
最新文档