Download presentation
Presentation is loading. Please wait.
Published byLeona Underwood Modified over 8 years ago
1
CPSC 322, Lecture 10Slide 1 Finish Search Computer Science cpsc322, Lecture 10 (Textbook Chpt 3.6) Sep, 26, 2010
2
CPSC 322, Lecture 10Slide 2 Lecture Overview Finish MBA* Pruning Cycles and Repeated states Examples Dynamic Programming Search Recap
3
CPSC 322, Lecture 9Slide 3 Memory-bounded A * Iterative deepening A* and B & B use a tiny amount of memory (but have their own problems…) 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 (with …………………………..) ``back them up'' to a common ancestor p pnpn p1p1
4
CPSC 322, Lecture 9Slide 4 MBA*: Compute New h(p) p pnpn p1p1
5
CPSC 322, Lecture 10Slide 5 Lecture Overview Finish MBA* Pruning Cycles and Repeated states Examples Dynamic Programming Search Recap
6
CPSC 322, Lecture 10Slide 6 Cycle Checking You can prune a path that ends in a node already on the path. This pruning cannot remove an optimal solution. The time is ………………… in path length.
7
CPSC 322, Lecture 10Slide 7 Repeated States / Multiple Paths Failure to detect repeated states can turn a linear problem into an exponential one!
8
CPSC 322, Lecture 10Slide 8 Multiple-Path Pruning You can prune a path to node n that you have already found a path to (if the new path is longer – more costly).
9
CPSC 322, Lecture 10Slide 9 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)
10
CPSC 322, Lecture 10Slide 10 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.
11
Pruning Cycles CPSC 322, Lecture 10Slide 11 Repeated States Example
12
CPSC 322, Lecture 10Slide 12 Lecture Overview Finish MBA* Pruning Cycles and Repeated states Examples Dynamic Programming Search Recap
13
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
14
CPSC 322, Lecture 9Slide 14 This can be built backwards from the goal: Dynamic Programming a b c g 2 3 1 3 gbcagbca 2 d 1 2 This can be built backwards from the goal: all the neighbors m
15
CPSC 322, Lecture 9Slide 15 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
16
CPSC 322, Lecture 10Slide 16 Lecture Overview Finish MBA* Pruning Cycles and Repeated states Examples Dynamic Programming Search Recap
17
CPSC 322, Lecture 10Slide 17 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 )
18
CPSC 322, Lecture 10Slide 18 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 )
19
CPSC 322, Lecture 10Slide 19 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 )
20
CPSC 322, Lecture 10Slide 20 Search in Practice (cont’) Many paths to solution, no ∞ paths? Informed? Large branching factor?
21
CPSC 322, Lecture 10Slide 21 (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)
22
CPSC 322, Lecture 2Slide 22 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
23
CPSC 322, Lecture 11Slide 23 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
24
CPSC 322, Lecture 10Slide 24 Next class Start Constraint Satisfaction Problems (CSPs) Textbook 4.1-4.3 I will be away for 2-3 classes Alan Mackworth will sub for me Co-author of your textbook Pioneered work in CSP
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.