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

Slides:



Advertisements
Similar presentations
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) Sept, 14, 2012.
Advertisements

CPSC 322, Lecture 4Slide 1 Search: Intro Computer Science cpsc322, Lecture 4 (Textbook Chpt ) Sept, 11, 2013.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.4) January, 14, 2009.
Touring problems Start from Arad, visit each city at least once. What is the state-space formulation? Start from Arad, visit each city exactly once. What.
Artificial Intelligence (CS 461D)
Uninformed Search Jim Little UBC CS 322 – Search 2 September 12, 2014
Slide 1 Planning: Representation and Forward Search Jim Little UBC CS 322 October 10, 2014 Textbook §8.1 (Skip )- 8.2)
CPSC 322, Lecture 10Slide 1 Finish Search Computer Science cpsc322, Lecture 10 (Textbook Chpt 3.6) January, 28, 2008.
Search: Representation and General Search Procedure Jim Little UBC CS 322 – Search 1 September 10, 2014 Textbook § 3.0 –
Slide 1 Heuristic Search: BestFS and A * Jim Little UBC CS 322 – Search 5 September 19, 2014 Textbook § 3.6.
Slide 1 Search: Advanced Topics Jim Little UBC CS 322 – Search 5 September 22, 2014 Textbook § 3.6.
CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 23, 2009.
CPSC 322, Lecture 23Slide 1 Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from.
CPSC 322, Lecture 4Slide 1 Search: Intro Computer Science cpsc322, Lecture 4 (Textbook Chpt ) January, 12, 2009.
CPSC 322, Lecture 18Slide 1 Planning: Heuristics and CSP Planning Computer Science cpsc322, Lecture 18 (Textbook Chpt 8) February, 12, 2010.
CPSC 322, Lecture 10Slide 1 Finish Search Computer Science cpsc322, Lecture 10 (Textbook Chpt 3.6) January, 25, 2010.
CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 22, 2010.
CPSC 322, Lecture 11Slide 1 Constraint Satisfaction Problems (CSPs) Introduction Computer Science cpsc322, Lecture 11 (Textbook Chpt 4.0 – 4.2) January,
CPSC 322, Lecture 23Slide 1 Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from.
CPSC 322, Lecture 12Slide 1 CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12 (Textbook Chpt ) January, 29, 2010.
CPSC 322, Lecture 17Slide 1 Planning: Representation and Forward Search Computer Science cpsc322, Lecture 17 (Textbook Chpt 8.1 (Skip )- 8.2) February,
CPSC 322, Lecture 17Slide 1 Planning: Representation and Forward Search Computer Science cpsc322, Lecture 17 (Textbook Chpt 8.1 (Skip )- 8.2) February,
CPSC 322, Lecture 8Slide 1 Heuristic Search: BestFS and A * Computer Science cpsc322, Lecture 8 (Textbook Chpt 3.5) January, 21, 2009.
CPSC 322, Lecture 22Slide 1 Logic: Domain Modeling /Proofs + Top-Down Proofs Computer Science cpsc322, Lecture 22 (Textbook Chpt 5.2) March, 8, 2010.
CS 188: Artificial Intelligence Spring 2006 Lecture 2: Queue-Based Search 8/31/2006 Dan Klein – UC Berkeley Many slides over the course adapted from either.
CS121 Heuristic Search Planning CSPs Adversarial Search Probabilistic Reasoning Probabilistic Belief Learning.
Uninformed Search (cont.)
Multiple Path Pruning, Iterative Deepening CPSC 322 – Search 7 Textbook § January 26, 2011.
Slide 1 Logic: Domain Modeling /Proofs + Top-Down Proofs Jim Little UBC CS 322 – CSP October 22, 2014.
Computer Science CPSC 322 Lecture 3 AI Applications 1.
Slide 1 Constraint Satisfaction Problems (CSPs) Introduction Jim Little UBC CS 322 – CSP 1 September 27, 2014 Textbook §
Computer Science CPSC 322 Lecture 4 Search: Intro (textbook Ch: ) 1.
CPSC 322, Lecture 22Slide 1 Logic: Domain Modeling /Proofs + Top-Down Proofs Computer Science cpsc322, Lecture 22 (Textbook Chpt 5.2) Oct, 26, 2010.
Computer Science CPSC 322 Lecture Heuristic Search (Ch: 3.6, 3.6.1) Slide 1.
Computer Science CPSC 322 Lecture A* and Search Refinements (Ch 3.6.1, 3.7.1, 3.7.2) Slide 1.
Lecture 2 Search (textbook Ch: 3)
Branch & Bound, CSP: Intro CPSC 322 – CSP 1 Textbook § & January 28, 2011.
Computer Science CPSC 322 Lecture 9 (Ch , 3.7.6) Slide 1.
Search with Costs and Heuristic Search 1 CPSC 322 – Search 3 January 17, 2011 Textbook §3.5.3, Taught by: Mike Chiang.
Lecture 3: Uninformed Search
Computer Science CPSC 322 Lecture 6 Iterative Deepening and Search with Costs (Ch: 3.7.3, 3.5.3)
Arc Consistency CPSC 322 – CSP 3 Textbook § 4.5 February 2, 2011.
CPSC 322, Lecture 6Slide 1 Uniformed Search (cont.) Computer Science cpsc322, Lecture 6 (Textbook finish 3.5) Sept, 17, 2012.
CPSC 322, Lecture 4Slide 1 Search: Intro Computer Science cpsc322, Lecture 4 (Textbook Chpt ) Sept, 12, 2012.
A* optimality proof, cycle checking CPSC 322 – Search 5 Textbook § 3.6 and January 21, 2011 Taught by Mike Chiang.
CPSC 322, Lecture 2Slide 1 Representational Dimensions Computer Science cpsc322, Lecture 2 (Textbook Chpt1) Sept, 7, 2012.
Domain Splitting, Local Search CPSC 322 – CSP 4 Textbook §4.6, §4.8 February 4, 2011.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) Sept, 13, 2013.
Solving problems by searching Uninformed search algorithms Discussion Class CS 171 Friday, October, 2nd (Please read lecture topic material before and.
CPSC 322, Lecture 10Slide 1 Finish Search Computer Science cpsc322, Lecture 10 (Textbook Chpt 3.6) Sep, 26, 2010.
Computer Science CPSC 322 Lecture 7 Search Wrap Up, Intro to Constraint Satisfaction Problems 1.
Computer Science CPSC 322 Lecture 6 Analysis of A*, Search Refinements (Ch ) Slide 1.
Uniformed Search (cont.) Computer Science cpsc322, Lecture 6
Search: Advanced Topics Computer Science cpsc322, Lecture 9
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Branch & Bound, Summary of Advanced Topics
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Planning: Representation and Forward Search
Search: Advanced Topics Computer Science cpsc322, Lecture 9
Uniformed Search (cont.) Computer Science cpsc322, Lecture 6
Planning: Heuristics and CSP Planning
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Planning: Representation and Forward Search
Computer Science cpsc322, Lecture 10
Search: Advanced Topics Computer Science cpsc322, Lecture 9
Iterative Deepening CPSC 322 – Search 6 Textbook § 3.7.3
Iterative Deepening and Branch & Bound
Search.
Search.
Planning: Representation and Forward Search
Presentation transcript:

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

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

Slide 3 Heuristic value by look ahead

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

Slide 5 MBA*: Compute New h(p)

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

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

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 The numbers in the search tree’s nodes mean? Node’s name Order in which a search algo. (here: BFS) expands nodes

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

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)

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)

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!

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

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

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)

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.

Pruning Cycles Slide 17 Repeated States Example

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

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  6 7  6 heuristic cost f function Slide 19

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

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 d

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

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 )

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

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 )

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*

Slide 27 (Adversarial) Search: Chess Deep Blue’s Results in the second tournament: second tournament: won 3 games, lost 2, tied 1 30 CPUs chess processors Searched 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)

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

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

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