Presentation is loading. Please wait.

Presentation is loading. Please wait.

Slide 1 Finish Search Jim Little UBC CS 322 – Search 7 September 24, 2014 Textbook §3.6.

Similar presentations


Presentation on theme: "Slide 1 Finish Search Jim Little UBC CS 322 – Search 7 September 24, 2014 Textbook §3.6."— Presentation transcript:

1 Slide 1 Finish Search Jim Little UBC CS 322 – Search 7 September 24, 2014 Textbook §3.6

2 Slide 2 Lecture Overview Finish MBA* Pruning Cycles and Repeated states Examples Dynamic Programming Search Recap

3 Slide 3 Heuristic value by look ahead

4 Slide 4 Memory-bounded A * Iterative deepening A* and B & B use a tiny amount of memory what if we've got more memory to use? keep as much of the fringe in memory as we can if we have to delete something: delete the worst paths ( ) ``back them up'' to a common ancestor p pnpn p1p1 highest f

5 Slide 5 MBA*: Compute New h(p)

6 Slide 6 Lecture Overview Finish MBA* Interlude: State Space/Search Graphs Pruning Cycles and Repeated states Examples Dynamic Programming Search Recap

7 Clarification: state space graph vs search tree 7 kc b z h a kb kc kbz d f kbzakbzd kch k State space graph. If there are no cycles, the two look the same Search tree. Nodes in this tree correspond to paths in the state space graph kchf y 45 6 7 8

8 Clarification: state space graph vs search tree 8 kc b z h a kb kc kbz d f kbzakbzd kch k State space graph. Search tree. kchf 45 6 7 8 8 The numbers in the search tree’s nodes mean? Node’s name Order in which a search algo. (here: BFS) expands nodes

9 Clarification: state space graph vs search tree 9 kc b z h a kb kc kbkkbz d f kbkbkbkc kbzakbzd kch kchf kckb kckc kck k State space graph. Search tree. (only first 3 levels, of BFS) If there are cycles, the two look very different

10 Clarification: state space graph vs search tree 10 kc b z h a kb kc kbkkbz d f kbkbkbkc kbzakbzd kch kchf kckb kckc kck k State space graph. Search tree. (only first 3 levels, of BFS)

11 Clarification: state space graph vs search tree 11 kc b z h a kb kc kbkkbz d f kbkbkbkc kbzakbzd kch kchf kckb kckc kck k State space graph. Search tree. (only first 3 levels, of BFS)

12 Clarification: state space graph vs search tree 12 kc b z h a kb kc kbkkbz d z kbkbkbkc kbzakbzd kch kchz kckb kckc kck k State space graph. May contain cycles! Search tree. Nodes in this tree correspond to paths in the state space graph (if multiple start nodes: forest) Cannot contain cycles!

13 Clarification: state space graph vs search tree 13 kc b z h a kb kc kbkkbz d z kbkbkbkc kbzakbzd kch kchz kckb kckc kck k State space graph. Why don’t we just eliminate cycles? Sometimes (but not always) we want multiple solution paths Search tree. Nodes in this tree correspond to paths in the state space graph

14 Slide 14 Lecture Overview Finish MBA* Pruning Cycles and Repeated states Examples Dynamic Programming Search Recap

15 Slide 15 Multiple-Path Pruning & Optimal Solutions Problem: what if a subsequent path to n is shorter than the first path to n ? You can remove all paths from the frontier that use the longer path. (as these can’t be optimal)

16 Slide 16 Multiple-Path Pruning & Optimal Solutions Problem: what if a subsequent path to n is shorter than the first path to n ? You can change the initial segment of the paths on the frontier to use the shorter path.

17 Pruning Cycles Slide 17 Repeated States Example

18 Slide 18 Lecture Overview Finish MBA* Pruning Cycles and Repeated states Examples Dynamic Programming Search Recap

19 Dynamic Programming Idea: for statically stored graphs, build a table of dist(n): The actual distance of the shortest path from node n to a goal g This is the perfect dist(g) = 0 dist(z) = 1 dist(c) = 3 dist(b) = 4 dist(k) = ? dist(h) = ? How could we implement that? kc b h g z 2 3 1 2 4 1 7  6 7  6 heuristic cost f function Slide 19

20 Slide 20 This can be built backwards from the goal: Dynamic Programming a b c g 2 3 1 3 gbcagbca 2 d 1 2 0 m

21 Slide 21 But there are at least two main problems: You need enough space to store the graph. The dist function needs to be recomputed for each goal Dynamic Programming This can be used locally to determine what to do. From each node n go to its neighbor which minimizes a b c g 2 3 4 3 d 3 2 1 3 2 1 2

22 Slide 22 Lecture Overview Finish MBA* Pruning Cycles and Repeated states Examples Dynamic Programming Search Recap

23 Slide 23 Recap Search SelectionCompleteOptimalTimeSpace DFS LIFO NNO(b m )O(mb) BFS FIFO YYO(b m ) IDS(C) LIFO YYO(b m )O(mb) LCFS min cost YYO(b m ) BFS min h NNO(b m ) A* min f YYO(b m ) B&B LIFO + pruning NYO(b m )O(mb) IDA* LIFO YYO(b m )O(mb) MBA* min f NYO(b m )

24 Slide 24 Recap Search (some qualifications) CompleteOptimalTimeSpace DFSNNO(b m )O(mb) BFSYYO(b m ) IDS(C)YYO(b m )O(mb) LCFSYY ?O(b m ) BFSNNO(b m ) A*YY ?O(b m ) B&BNY ?O(b m )O(mb) IDA*YYO(b m )O(mb) MBA*NYO(b m ) C>0 h admiss. no inf path

25 Slide 25 Search in Practice CompleteOptimalTimeSpace DFSNNO(b m )O(mb) BFSYYO(b m ) IDS(C)YYO(b m )O(mb) LCFSYYO(b m ) BFSNNO(b m ) A*YYO(b m ) B&BNYO(b m )O(mb) IDA*YYO(b m )O(mb) MBA*NYO(b m ) BDSYYO(b m/2 )

26 Slide 26 Search in Practice (cont’) Many paths to solution, no ∞ paths? Informed? Large branching factor? F T approve robuddies-seminars.admin \ subscribe robuddies-seminars \ Justin Hart T approve robuddies-seminars.admin \ subscribe robuddies-seminars \ Justin Hart T F F IDS B&B MBA* IDA*

27 Slide 27 (Adversarial) Search: Chess Deep Blue’s Results in the second tournament: second tournament: won 3 games, lost 2, tied 1 30 CPUs + 480 chess processors Searched 126.000.000 nodes per sec Generated 30 billion positions per move reaching depth 14 routinely Iterative Deepening with evaluation function (similar to a heuristic) based on 8000 features (e.g., sum of worth of pieces: pawn 1, rook 5, queen 10)

28 Slide 28 Modules we'll cover in this course: R&Rsys Environment Problem Query Planning Deterministic Stochastic Search Arc Consistency Search Value Iteration Var. Elimination Constraint Satisfaction Logics STRIPS Belief Nets Vars + Constraints Decision Nets Markov Processes Var. Elimination Static Sequential Representation Reasoning Technique

29 Slide 29 Standard Search vs. Specific R&R systems Constraint Satisfaction (Problems): State Successor function Goal test Solution Heuristic function Planning : State Successor function Goal test Solution Heuristic function Inference State Successor function Goal test Solution Heuristic function

30 Slide 30 Next class Start Constraint Satisfaction Problems (CSPs) Textbook 4.1-4.3


Download ppt "Slide 1 Finish Search Jim Little UBC CS 322 – Search 7 September 24, 2014 Textbook §3.6."

Similar presentations


Ads by Google