Download presentation
Presentation is loading. Please wait.
Published byNorman Wilkins Modified over 9 years ago
1
Artificial Intelligence for Games Depth limited search Patrick Olivier p.l.olivier@ncl.ac.uk
2
Recap: Breadth-first search
3
Roadmap of Romania…
4
Class Exercise – Uniform-Cost 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: –Initial state: Arad –Goal state: Bucharest –Do a uniform cost search by hand
5
Recap: Depth-first search
6
Depth-limited search depth-first search with depth limit L nodes at depth L have no successors
7
Iterative deepening search to a depth limit L if no solution research to limit L+1 previous search repeated
8
Iterative deepening search: L = 0
9
Iterative deepening search: L = 1
10
Iterative deepening search: L = 2
11
Iterative deepening search: L = 3
12
Iterative deepening search Number of nodes generated in a depth-limited search to depth d with branching factor b: –N DLS = b 0 + b 1 + b 2 + … + b d-2 + b d-1 + b d Number of nodes generated in an iterative deepening search to depth d with branching factor b: –N IDS = (d+1)b 0 + d.b 1 + (d-1)b 2 + … + 3b d-2 +2b d-1 + 1b d For b=10, d=5: –N DLS = 1 + 10 + 100 + 1,000 + 10,000 + 100,000 = 111,111 –N IDS = 6 + 50 + 400 + 3,000 + 20,000 + 100,000 = 123,456 Overhead = (123,456 - 111,111)/111,111 = 11%
13
Properties of iterative deepening Complete? –Yes Time: –(d+1)b 0 + d b 1 + (d-1)b 2 + … + b d = O(b d ) Space: –O(bd) Optimal? –If the cost is the same per step
14
Summary of uninformed search
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.