1 / 24

Planning in FOL Systems

Planning in FOL Systems. sequences of actions to achieve goals. Planning Example: Blocks world. objects: blocks on a table actions: move blocks ‘on’ one object to ‘on’ another object goals: configurations of blocks plan: sequence of actions to achieve goals. D. A. B. C. T.

kasi
Download Presentation

Planning in FOL Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Planning in FOL Systems sequences of actions to achieve goals

  2. Planning Example: Blocks world • objects: blocks on a table • actions: move blocks ‘on’ one object to ‘on’ another object • goals: configurations of blocks • plan: sequence of actions to achieve goals D A B C T D Goforth - COSC 4117, fall 2006

  3. Classical Planning - STRIPS • STanford Research Institute Problem Solver • Closed world assumption • facts not in KB are assumed false • Predicates in KB must refer to specific objects (no variables, no functions) • Goal – conjunction of positive literals • No ‘situation calculus’ – current state only D Goforth - COSC 4117, fall 2006

  4. Classical Planning - STRIPS • actions: • preconditions – predicates that must be in KB • effect – some predicates added to KB and some predicates removed (‘negated’) • plan – sequence of actions to get goal predicates into KB D Goforth - COSC 4117, fall 2006

  5. Blocks world • objects: A, B, C, D, T • KB: On(A,T)^On(B,T)^On(C,T)^On(D,C) ^Block(A)^Block(B)^Block(C)^Block(D) ^Clear(A) ^Clear(B )^Clear(D) ^Clear(T)* • Goal: On(A,B)^On(B,C) D A B C T * Clear(x) means “there is space on x for a block”

  6. Blocks world • actions: Move(b,x,y) // move b from x to y PRE:On(b,x)^Clear(b)^Clear(y)^Block(b)^Block(y) EFFECT:On(b,x)^Clear(y)^Clear(x)^On(b,y) MoveToTable(b,x) // move b from x to table PRE:On(b,x)^Clear(b) ^Block(b) ^Block(x) EFFECT:On(b,x)^Clear(x)^On(b,T) // remove from KB;add to KB D A B C T

  7. STRIPS requirements • need ‘Clear’ because Clear cannot be inferred from the ‘On’ predicates • need two Move actions to manage the ‘clear table’ problem unsolved problem: can’t avoid ‘repeated literal’ problem Move(B,C,C) D Goforth - COSC 4117, fall 2006

  8. Planning – state space search • current KB is current state • applying an action is an edge • revised KB is next state • from current KB, search for path of actions to state containing goal D Goforth - COSC 4117, fall 2006

  9. Blocks world KB: On(A,T)^On(B,T)^On(C,T)^On(D,C) ^Block(A)^Block(B)^Block(C)^Block(D) ^Clear(A)^Clear(B) ^Clear(D) ^Clear(T) D A B C T Move(A,T,D) KB: On(A,D)^On(B,T)^On(C,T)^On(D,C) ^Block(A)^Block(B)^Block(C)^Block(D) ^Clear(A) ^Clear(B) ^Clear(T) A D B C T

  10. Forward search • irrelevant action problem: actions that are possible lead to large branching • needs good heuristic to be efficient (breaks FOL domain independence) D Goforth - COSC 4117, fall 2006

  11. Backward search • actions with goal state as ‘effect’ are ‘regressed’ • focus on ‘relevant’ actions • avoid actions that undo goal state predicates add preconditions previous state predicates goal state predicates undo action effects D Goforth - COSC 4117, fall 2006

  12. Blocks world – preconditions match Goal: On(A,B)^On(B,C) D A C B T Move(A,x,B) {T/x} Preconditions for Move(A,T,B) On(A,T)^On(B,T)^On(C,T)^On(D,C) ^Block(A)^Block(B)^Block(C)^Block(D) ^Clear(A) ^Clear(B) ^Clear(T) D A B C T

  13. Blocks world – preconditions not match B Goal: On(A,B)^On(B,C) Move(B,x,C) {T/x} A C D T On(B,T)^ Block(B)^Block(C)^ Clear(C) ^Clear(B) A B C D T MoveToTable(y,C) {D/y} On(A,T)^On(B,T)^On(C,T)^On(D,C) ^Block(A)^Block(B)^Block(C)^Block(D) ^Clear(A) ^Clear(B)^Clear(D)^Clear(T) D A B C T

  14. State space search algorithms • heuristics: • admissible (don’t overestimate path cost) • generic heuristics not domain dependent • relaxed problem – reduce preconditions, remove negative effects • independent subgoals – achieve goal predicates one at a time: assume one goal does not help or prevent another D Goforth - COSC 4117, fall 2006

  15. Blocks world - heuristics Move(b,x,y) PRE:On(b,x)^Clear(b)^Clear(y)^Block(b)^Block(y) EFFECT:On(b,x)^Clear(y)^Clear(x)^On(b,y) MoveToTable(b,x) PRE:On(b,x)^Clear(b)^Block(b) EFFECT:On(b,x)^Clear(x)^On(b,T) For example goalOn(A,B)  On(B,C): Heuristic “independent subgoals” On(A,B) and On(B,C) simplifies because On(A,B) interferes with On(B,C) Heuristic “relaxed problem” remove preconditions, negatives D A B C T

  16. Partial Order Planning • since GPS (General Problem Solver), understood • getting the major steps in place first improves planning • e.g. car trip including a ferry crossing  plans built in mixed order, not just forward or backward D Goforth - COSC 4117, fall 2006

  17. Partial Order Planning • in many plans, order of some steps does not matter • if parts of goal are independent, does not matter which goal is achieved first Goal: On(A,B)^On(C,D) A B C D T D Goforth - COSC 4117, fall 2006

  18. Partial Order Planning • planning takes place in ‘plan space’ of partial plans • a partial plan contains: • actions, A, B, C, ...,Start, Finish • ordering constraint between some actions: A must be done before B: A B • causal links: A produces a precondition for B: • set of unachieved preconditions (empty in final plan) D Goforth - COSC 4117, fall 2006

  19. The empty plan (root of plan search space tree) On(A,B)On(B,T)On(D,C)On(C,T) Action: StartPRE: noneEFFECT: start state of space A D B C T Start Finish Action: FinishPRE: goal predicatesEFFECT: none A B On(A,B)On(B,C)On(C,D) C D open{On(B,C),On(C,D)} D Goforth - COSC 4117, fall 2006 NOTE: some predicates not shown – Clear in KB

  20. A partial plan Action: StartPRE: noneEFFECT: On(A,B),On(B,T),On(D,C),On(C,T) A D B C T Start M Action: M(B,T,C)PRE: Clear(B),Clear(C)EFFECT: On(B,C) causal On(B,C) Action: FinishPRE: On(A,B),On(B,C),On(C,D) EFFECT: none A B C open{On(C,D)} D

  21. A partial plan Action: StartPRE: noneEFFECT: On(A,B),On(B,T),On(D,C),On(C,T) A D B C T Action: MT(A,B)PRE: Clear(A)EFFECT: On(A,T),Clear(B) Action: M(B,T,C)PRE: Clear(B),Clear(C)EFFECT: On(B,C) Action: FinishPRE: On(A,B),On(B,C),On(C,D) EFFECT: none A B C open{On(A,B),On(C,D)} D

  22. The complete partially ordered plan On(A,B)On(B,T)On(D,C)On(C,T) A D Action: Start B C Action: MT(A,B) Action: MT(D,C) Action: M(C,T,D) Action: M(B,T,C) Action: M(A,T,B) A Action: FinishPRE: goal B On(A,B)On(B,C)On(C,D) open{} C D

  23. The total order plans Action: Start Action: Start Action: MT(A,B) Action: MT(D,C) Action: MT(D,C) Action: MT(A,B) Action: M(C,T,D) Action: M(C,T,D) Action: M(B,T,C) Action: M(B,T,C) Action: M(A,T,B) Action: M(A,T,B) Action: FinishPRE: goal Action: FinishPRE: goal

  24. Heuristics for partial order plans • size of open precondition set • number of unachieved goal predicates • overestimates remaining actions if some actions achieve multiple goals • underestimates remaining actions if some actions will undo preconditions (e.g. taking A off B) D Goforth - COSC 4117, fall 2006

More Related