lectur ture e 8
play

Lectur ture e 8 In Intr tro to to CSP SP CSP as as Sear - PowerPoint PPT Presentation

Computer Science CPSC 322 Lectur ture e 8 In Intr tro to to CSP SP CSP as as Sear earch ch 1 Announ nouncem emen ents Assignment 1 due today @ 11:59pm solution posted 2 days after, to accommodate for late days


  1. Computer Science CPSC 322 Lectur ture e 8 In Intr tro to to CSP SP CSP as as Sear earch ch 1

  2. Announ nouncem emen ents • Assignment 1 due today @ 11:59pm • solution posted 2 days after, to accommodate for late days • Assignment 2 out Friday (watch for the announcement) • Due Th. Oct 19, 11:59pm

  3. Announ nouncem emen ents Midterm Tuesday Oct 24 (see course schedule) • Posted in Connect (“midterm material” folder): • Learning goals for the material covered • • Short questions on material for the whole course.  Both midterm and final will have questions very similar, or even verbatim, from this set ( about 40-60% of overall mark)  You can answer these questions by studying the slides and textbook – Cover questions as we proceed through the material, come to see us if you have doubts on how to answer – BUT DO STUDY THE REVELANT MATERIAL FIRST!  Do not wait until just before the midterm to review the questions, if you start now it will be much easier to cover all the relevant ones before the exam • For obvious reasons we will not be able to give you explicit help on finding the answers to these questions  But if you come to office hours with ideas, we will be happy to discuss them with you

  4. Lect cture re O Overvi rview • Recap of previous lecture • Intro to CSP • CSP algorithms using Search - Generate and test - Graph search Intro to Arc Consistency (time permitting) •

  5. Rec ecap (Mus (Must K Kno now H How ow to o Fill Thi his) Sel elec ection Com ompl plete Opti Op timal Tim ime Spac pace O(b m ) DFS LIFO N N O(mb) O(b m ) O(b m ) BFS FIFO Y Y O(b m ) IDS LIFO Y Y O(mb) O(b m ) O(b m ) LCFS min cost Y ** Y ** O(b m ) O(b m ) Best min h N N First O(b m ) O(b m ) A* min f Y** Y** O(b m ) B&B LIFO + pruning Y** Y** O(mb) O(b m ) IDA* LIFO Y** Y** O(mb) O(b m ) O(b m ) MBA* min f Y** Y** ** Needs conditions: you need to know what they are 5

  6. Alg lgorit ithms Ofte Often Used i in n Prac ractice Sel elec ection Com ompl plete Op Opti timal Tim ime Spac pace O(b m ) DFS LIFO N N O(mb) O(b m ) O(b m ) BFS FIFO Y Y O(b m ) IDS LIFO Y Y O(mb) O(b m ) O(b m ) LCFS min cost Y ** Y ** O(b m ) O(b m ) Best min h N N First O(b m ) O(b m ) A* min f Y** Y** O(b m ) B&B LIFO + pruning Y** Y** O(mb) O(b m ) IDA* LIFO Y Y O(mb) O(b m ) O(b m ) MBA* min f Y** Y** ** Needs conditions: you need to know what they are 6

  7. Sear earch i in n Prac actice IDS NO B&B Informed? Y Y IDA* Many paths to solution, no ∞ paths? NO Y Large branching factor? NO MBA* These are indeed general guidelines, specific problems might yield different choices

  8. Course rse O Overvi rview Representation Environm nment ent Reasoning Stochastic Deterministic Technique Problem Type Arc Consistency Constraint Vars + Search Satisfaction Constraints Static Belief Nets Logics Query Variable Search Elimination Decision Nets Sequential STRIPS Variable Planning Elimination Search First Part of Markov Processes Value the Course 8 Iteration

  9. Stand ndar ard v d vs Spec ecial alized S ed Sear arch We studied general state space search in isolation • • Standard search problem: search in a state space • State is a “black box” - any arbitrary data structure that supports three problem-specific routines: • goal test: goal(state) • finding successor nodes: neighbors(state) • if applicable, heuristic evaluation function: h(state) • We will see more specialized versions of search for various problems 9

  10. Course rse O Overvi rview Representation Environm nment ent Reasoning Stochastic Deterministic Technique Problem Type Arc Consistency Constraint Vars + Search Satisfaction Constraints Static Belief Nets Logics Query Variable Search Elimination Decision Nets Sequential STRIPS Variable Planning Elimination Search Markov Processes Value 10 Iteration

  11. We e will l look ook at at Sear earch i ch in n Spec pecific c R&R S Syst stems • Constraint Satisfaction Problems (CPS): • State • Successor function • Goal test • Solution • Heuristic function • Query : • State • Successor function • Goal test • Solution • Heuristic function • Planning • State • Successor function • Goal test • Solution • Heuristic function 11

  12. Course rse O Overvi rview Representation Environm nment ent Reasoning Stochastic Deterministic Technique Problem Type Arc We’ll start Consistency Constraint Vars + from CPS Search Satisfaction Constraints Static Belief Nets Logics Query Variable Search Elimination Decision Nets Sequential STRIPS Variable Planning Elimination Search Markov Processes Value 12 Iteration

  13. We e will l look ook at at Sear earch f ch for or C CSP • Constraint Satisfaction Problems (CPS): • State • Successor function • Goal test • Solution • Heuristic function • Query : • State • Successor function • Goal test • Solution • Heuristic function • Planning • State • Successor function • Goal test • Solution • Heuristic function 13

  14. CSPs: s: C Crossw ssword rd P Puzzl zzles s - Prove verb rb Source: Michael Littman 14

  15. Constraint Satisfaction Problems (CSP) • In a CSP – state is defined by a set of variables V i with values from domain D i – goal test is a set of constraints specifying 1. allowable combinations of values for subsets of variables ( hard constraints ) 2. preferences over values of variables ( soft constraints ) 15

  16. Dimensions of Representational Complexity (from lecture 2) • Reasoning tasks (Constraint Satisfaction / Logic&Probabilistic Inference / Planning) • Deterministic versus stochastic domains Some other important dimensions of complexity: • Explicit state or features or relations Explic licit sta tate te or features ures or rel relat ations • • Flat or hierarchical representation • Knowledge given versus knowledge learned from experience • Goals versus complex preferences • Single-agent vs. multi-agent

  17. Variabl ables es/Fea eatur ures es a and P d Possibl ble W e Worlds ds • Variable: a synonym for feature • We denote variables using capital letters • Each variable V has a domain dom(V) of possible values • Variables can be of several main kinds:  Boolean: |dom(V)| = 2  Finite: |dom(V)| is finite  Infinite but discrete: the domain is countably infinite  Continuous: e.g., real numbers between 0 and 1 Possible world: • • Complete assignment of values to each variable • This is equivalent to a state as we have defined it so far  Soon, however, we will give a broader definition of state, so it is best to start distinguishing the two concepts . 17

  18. Exam ample (l (lec ecture 2) 2) Mars Explorer Example {S, C} Weather Temperature [-40, 40] Longitude [0, 359] Latitude [0, 179] {S, -30, 320, 210} One possible world (state) Number of possible (mutually exclusive) worlds (states) 2 x 81 x 360 x 180 Product of cardinality of … always exponential in the each domain number of variables 18

  19. Lect cture re O Overvi rview • Recap of previous lecture • CSP: possible worlds, constraints and models • CSP algorithms using Search - Generate and test - Graph search Intro to Arc Consistency (time permitting) •

  20. How ow many many pos possible w wor orlds? • Crossword Puzzle 1: • variables are words that have to be filled in • domains are English words of correct length • possible worlds: all ways of assigning words • Number of English words? Let’s say 150,000 • Of the right length? Assume for simplicity: 15,000 for each length • Number of words to be filled in? 63 • How many possible worlds? (assume any combination is ok) 20

  21. How ow many many pos possible w wor orlds? Crossword Puzzle 1: • variables are words that have to be filled in • domains are English words of correct length • possible worlds: all ways of assigning words • Number of English words? Let’s say 150,000 • Of the right length? Assume for simplicity: 15,000 for each length • Number of words to be filled in? 63 • How many possible worlds? (assume any combination is ok) C D. A. B. 21 63 15,000 1,563 63 15,000 63 15,000*63

  22. How ow many many pos possible w wor orlds? • Crossword Puzzle: • variables are words that have to be filled in • domains are English words of correct length • possible worlds: all ways of assigning words • Number of English words? Let’s say 150,000 • Of the right length? Assume for simplicity: 15,000 for each word • Number of words to be filled in? 63 • How many possible worlds? (assume any combination is ok) 15000 63 22

  23. How ow many many pos possible w wor orlds? • Crossword 2: • variables are cells (individual squares) • domains are letters of the alphabet • possible worlds: all ways of assigning letters to cells • Number of empty cells? 15*15 – 32 = 193 • Number of letters in the alphabet? 26 • How many possible worlds? (assume any combination is ok) 23

Recommend


More recommend