pl plann annin ing g he heur uris isti tics cs and and cs
play

Pl Plann annin ing: g: He Heur uris isti tics cs and and CS - PowerPoint PPT Presentation

Pl Plann annin ing: g: He Heur uris isti tics cs and and CS CSP P Plan anni ning ng Co Computer ter Sc Science ce cpsc3 c322, 22, Lectur ture e 18 (Te Text xtbo book ok Chpt 8) 8) Febru ruary, ary, 12, 2010 CPSC


  1. Pl Plann annin ing: g: He Heur uris isti tics cs and and CS CSP P Plan anni ning ng Co Computer ter Sc Science ce cpsc3 c322, 22, Lectur ture e 18 (Te Text xtbo book ok Chpt 8) 8) Febru ruary, ary, 12, 2010 CPSC 322, Lecture 18 Slide 1

  2. Lecture cture Ov Overview view • Rec ecap ap: : Pl Plan anni ning ng Rep epres esen entation tation an and d For orward ard al algo gorit ithm hm • Heuristics • CSP Planning CPSC 322, Lecture 18 Slide 2

  3. Sta tandard ndard Search rch vs. . Specific cific R&R system tems Constraint Satisfaction (Problems): • State: assignments of values to a subset of the variables • Successor function: assign values to a “free” variable • Goal test: set of constraints • Solution: possible world that satisfies the constraints • Heuristic function: none (all solutions at the same distance from start) Planning : • State • Successor function • Goal test • Solution • Heuristic function Inference • State • Successor function • Goal test • Solution CPSC 322, Lecture 11 Slide 3 • Heuristic function

  4. Modules dules we'l 'll l cover er in th this course: se: R&Rsys sys Enviro En ronm nmen ent Stochastic Deterministic Problem Arc Consistency Search Constraint Vars + Satisfaction Constraints SLS Static Belief Nets Logics Query Var. Elimination Search Decision Nets Sequential STRIPS Var. Elimination Planning Markov Processes Search Representation Value Iteration Reasoning CPSC 322, Lecture 2 Slide 4 Technique

  5. Lecture cture Ov Overview view • Rec ecap ap: : Pl Plan anni ning ng Rep epres esen entation tation an and d For orward ard al algo gorit ithm hm • Heuristics for forward planning • CSP Planning CPSC 322, Lecture 18 Slide 5

  6. Heuristics uristics fo for Fo Forward ard Planning nning Heuris istic tic funct ctio ion: n: estimate of the distance form a state to the goal In planning this is the………………. Tw Two simplifi ifica catio ions ns in the representation: • All features are binary: T / F • Goals and preconditions can only be assignments to T An And a Def. a subgoal is a particular assignment in the goal e.g., if the goal is <A=T, B=T, C=T> then…. CPSC 322, Lecture 18 Slide 6

  7. Heuristics uristics fo for Fo Forward ard Planning: nning: An Any y ideas? as? CPSC 322, Lecture 18 Slide 7

  8. Heuristics for Forward Planning (cont’) What kind of simplif lific icati ation ons s of the action ons s would justify tify our propos osal al for h? a) We have removed all ……………. b) We have removed all ……………. c) We assume no action can achieve………………….. CPSC 322, Lecture 18 Slide 8

  9. Heuristics uristics fo for Fo Forward ard Planning: nning: empty pty-delet elete-list list • We only relax the problem according to (…….) i.e., we remove all the effects that make a variable F Ac Action on a effects cts (B= B= F , C= T ) • Bu But then how do we compute te the heuristic? stic? …………………………………………. This is often fast enough to be worthwhile • empty-de dele lete-lis list heuris istic tics s with forward rd plannin ing g is currently considered a very successful strategy CPSC 322, Lecture 18 Slide 9

  10. Empty ty-delete delete in practice ctice CPSC 322, Lecture 18 Slide 10

  11. Lecture cture Ov Overview view • Recap: Planning Representation and Forward algorithm • Heuristics for forward planning • CSP SP Pl Plan anni ning ng CPSC 322, Lecture 18 Slide 11

  12. Planning anning as a CSP • An alternative approach to planning is to set up a planning problem as a CSP! • We simply reformulate a STRIPS model as a set of variables and constraints • Once this is done we can even express additional aspects of our problem (as additional constraints) e.g., see Practice Exercise UBC commuting “ careAboutEnvironment ” constraint CPSC 322, Lecture 18 Slide 12

  13. Planning anning as a CSP: : Variabl iables es • We need to “unroll the plan” for a fixed number of steps: this is called the horizon • To do this with a horizon of k: • construct a CSP variable for each STRIPS variable at each time step from 0 to k • construct a boolean CSP variable for each STRIPS action at each time step from 0 to k - 1. CPSC 322, Lecture 18 Slide 13

  14. CSP Planning: nning: Robot ot Exampl mple Variables for actions …. action (non) occurring at that step CPSC 322, Lecture 18 Slide 14

  15. CSP SP Pl Planning: nning: In Initia tial l and Go Goal l Constrai straints nts • initial state constraints constrain the state variables at time 0 • goal constraints constrain the state variables at time k CPSC 322, Lecture 18 Slide 15

  16. CSP Planning: nning: Prec. . Constraint straints s As usual, we have to express the precond nditions itions and effects ects of actions: • precondition constraints • hold between state variables at time t and action variables at time t • specify when actions may be taken RLoc 0 RHC 0 PUC 0 cs T F cs F T PUC 0 cs F F mr * F lab * F off * F CPSC 322, Lecture 18 Slide 16

  17. CSP Planning: nning: Eff ffect t Constraints straints • effect constraints • between state variables at time t , action variables at time t and state variables at time t + 1 • explain how a state variable at time t + 1 is affected by the action(s) taken at time t and by its own value at time t RHC i DelC i PUC i RHC i+1 T T T T T T F F T F T T … … … … … … … … CPSC 322, Lecture 18 Slide 17

  18. CSP Planning: nning: Constraints straints Contd. td. Other constraints we may want are action constraints: • specify which actions cannot occur simultaneously • these are sometimes called mutual exclusion (mutex) constraints E.g., in the Robot domain DelM i DelC i DelM and DelC can occur in any sequence (or simultaneously) But we could change that… CPSC 322, Lecture 18 Slide 18

  19. CSP Planning: nning: Constraints straints Contd. td. Other constraints we may want are state constraints • hold between variables at the same time step • they can capture physical constraints of the system (robot cannot hold coffee and mail) • they can encode maintenance goals RHC i RHM i CPSC 322, Lecture 18 Slide 19

  20. CSP Planning: nning: Solving ving th the problem blem Map STRIPS Representation for horizon: Run arc consis istenc ncy, search ch, stoch chas astic ic local l searc rch! Pl Plan: : all actions with assignment T In order to find a plan, we expand our constraint network one layer at the time, until a solution is found CPSC 322, Lecture 18 Slide 20

  21. Solve lve planning nning as s CSP: : pse seudo udo co code CPSC 322, Lecture 18 Slide 21

  22. Sta tate te of th f the art t planner nner A similar process is implemented (more efficiently) in the Graphpl plan an planner CPSC 322, Lecture 18 Slide 22

  23. STR TRIPS IPS to to CSP applet let Allows you: • to specify a planning problem in STRIPS • to map it into a CSP for a given horizon • the CSP translation is automatically loaded into the CSP applet where it can be solved Practice exercise using STRIPS to CSP will be posted next week (maybe a couple  ) CPSC 322, Lecture 18 Slide 23

  24. Learning Goals for today’s class You ou can an: • Construct and justify a he heur uris istic tic fu func ncti tion on for forward planning. • Translate a planning problem represented in STRIPS into a corresponding CSP problem (and vice versa) • Solve a planning problem with CPS by expanding the horizon (new one) CPSC 322, Lecture 4 Slide 24

  25. Wh What t is coming ing next t ? Enviro En ronm nmen ent Stochastic Deterministic Problem Arc Consistency Search Constraint Vars + Satisfaction Constraints SLS Static Belief Nets Logics Inference Var. Elimination Search Decision Nets Sequential STRIPS Var. Elimination Planning Markov Processes Search Representation Value Iteration Reasoning CPSC 322, Lecture 2 Slide 25 Technique

  26. Logics gics • Mostly tly only proposit sition ional al …. This is the starting point for more complex ones …. • Natura ral to express knowledg dge about the world • What is true (boolean variables) • How it works (logical formulas) • Well understood formal properties • Boolean nature can be exploited for efficiency • …… CPSC 322, Lecture 18 Slide 26

  27. Coming ming up course se element ments As Assign gn- 1 returned…… Offic fice e hours s during g break: k: Giuseppe (Wed17 ….. ) • Sunjeet et; ; will be available on vista chat during his hours • Ha Hammad ad: : not available, but will be monitoring b-board • Scott tt : regular time • Ken: : next week regular hour, following week WedFeb. 24 3-4pm. Please Pl e send email il if if you pla lan to attend nd a particul icular ar offi fice ce hour Wed, March 3: As Assign-2 2 due • Tw Two program ammin ing g exerci cise ses. s. St Start t asap asap. . Work in pairs. If stuck, ….. Wed, March 10 Midterm rm exam (1 hour, , regula lar r room) CPSC 322, Lecture 18 Slide 27

Recommend


More recommend