• Save
Huddersfield
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
454
On Slideshare
454
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Flexible Planning Ian Miguel AI Group Department of Computer Science University of York
  • 2. AI Planning
    • Plan : Course of action to achieve pre-specified goals.
    • Components of a planning problem:
      • Plan objects.
      • Initial state.
      • Goal state.
      • Operators.
  • 3. Example – Initial State
    • Goals:
      • Both packages to c 4 .
      • Guard to c 3 .
    • pkg 1 is valuable.
    • pkg 2 is not.
    c 1 c 2 c 4 c 3 r 1 r 2 r 3 m 1 m 2 pkg 1 pkg 2 guard 1
    • c i : Cities.
    • r i : Major roads.
    • m i : Mountainous roads.
  • 4. Example - Operators
    • Load-truck (guard present if pkg valuable).
    • Unload-truck (guard present if pkg valuable).
    • Guard-boards-vehicle .
    • Guard-leaves-vehicle .
    • Drive-truck (main roads only).
    c 1 c 2 c 4 c 3 r 1 r 2 r 3 m 1 m 2 pkg 1 pkg 2 guard 1
  • 5. Example – Solution
    • Drive-truck c 1 to c 2 via r 1 .
    • Load-truck pkg 2 . Guard-boards-vehicle truck .
    c 1 c 2 c 4 c 3 r 1 r 2 r 3 m 1 m 2 pkg 1 pkg 2 guard 1
  • 6. Example - Solution
    • Drive-truck c 1 to c 2 via r 1 .
    • Load-truck pkg 2 .
    c 1 c 2 c 4 c 3 r 1 r 2 r 3 m 1 m 2 pkg 1 pkg 2 guard 1
  • 7. Example - Solution
    • Drive-truck c 1 to c 2 via r 1 .
    • Drive-truck c 2 to c 3 via r 2 .
    • Drive-truck c 3 to c 4 via r 1 .
    • Unload-truck pkg 1 . Unload-truck pkg 2 .
    c 1 c 2 c 4 c 3 r 1 r 2 r 3 m 1 m 2 pkg 1 pkg 2 guard 1
  • 8. Example - Solution
    • Drive-truck c 4 to c 3 via r 3 .
    • Guard-leaves-vehicle truck .
    c 1 c 2 c 4 c 3 r 1 r 2 r 3 m 1 m 2 guard 1 pkg 1 pkg 2
  • 9. Solving Planning Problems
    • Many and varied approaches (see [Weld99]).
    • Focus here on Graphplan [Blum, Furst 97].
      • Sound/complete.
      • Optimal in the number of actions/length of plan.
      • Constructs a planning graph , of which a valid plan is a sub-graph.
      • Easy to translate the search for a consistent sub-graph into a constraint satisfaction problem.
  • 10. The Planning Graph
    • Divided into levels (equivalent to a step).
      • Each contains action and proposition nodes.
      • Level 0 contains propositions that capture the initial problem state.
      • Graph extended by instantiating operators whose preconditions met by propositions in previous level.
    Initial Conditions Actions 1 Propositions 1 . . . . . . . . . Goals
  • 11. Mutual Exclusion Constraints
    • Record that a pair of actions or propositions cannot occur together in this level of a valid plan.
    • Restricts the set of sub-graphs that must be considered.
  • 12. Mutual Exclusion Constraints
    • Exclusive actions :
      • Inconsistent effects:
        • Drive-truck c 1 to c 2 vs. Drive-truck c 2 to c 3 .
        • 1 st action: truck at c 2 . 2 nd action: truck not at c 2 .
      • Interference:
        • Between an effect and a precondition.
        • Drive-truck c 1 to c 2 vs. Load-truck at c 1 .
        • Truck no longer at c 1 after 1 st action.
      • Competing needs:
        • Between preconditions.
        • Drive-truck c 1 to c 3 vs. Guard-boards-truck at c 2 .
        • Truck cannot be at c 1 and c 2 at the same time.
  • 13. Mutual Exclusion Constraints
    • Exclusive propositions :
      • Negation:
        • Truck at c 2 vs. ¬ (Truck at c 2 ).
      • Inconsistent Support.
        • Every way of supporting proposition a is exclusive of every way of supporting proposition b .
    a b
  • 14. Finding a Valid Plan
    • Search for a consistent sub-graph connecting goal propositions and initial conditions.
    • If no such sub-graph, expand planning graph by one level and try again.
    • Approaches:
      • Translate into a propositional satisfiability (SAT) problem, use a specialised SAT solver.
      • Translate into a constraint satisfaction problem
        • Either one large problem, or connected sub-problems.
  • 15. The Constraint Satisfaction Problem
    • Given:
      • A finite set of variables .
      • Each variable has an associated finite domain of potential values.
      • A set of constraints over these variables.
    • Find:
      • A complete assignment of values to variables that satisfies all constraints.
    Specify allowed combinations of assignments of values to variables.
  • 16. The CSP Viewpoint
    • Variables : proposition nodes.
    • Domains : actions who assert these propositions as effects.
    • Each sub-problem is a small CSP.
    • Goals, and their domains form a first sub-problem.
    • Action pre-conditions specify new sub-problems…
    Goal Sub-problem
  • 17. Memoisation
    • Goal: Solve as few sub-problems as possible.
    • Generate memosets from unsolvable sub-problems.
      • New sets of mutually exclusive propositions.
      • If a memoset matches the propositions of a sub-problem, prune the search branch immediately.
    Goal Sub-problem
  • 18. Memoset Propagation
    • Memosets are propagated forwards.
    • If parent sub-problem has no child leading to a solution, propagated information used to create a memoset for it.
    Goal Sub-problem
  • 19. A Weakness of Classical Planning
    • Inability to compromise :
      • All goals must be satisfied.
      • Applicability of an operator in a particular situation is Boolean.
    • Solution:
      • Introduce flexibility into planning.
      • Support compromise .
  • 20. Flexible Planning Problems
    • Incorporate preferences into operators and goals.
    • Describe both as fuzzy relations .
      • Map from precondition combinations onto L , a totally ordered satisfaction scale.
    • Load-truck
      • Truck and (valuable) package in same place: l 1
      • Guard also present: l 2
    • Can relax some preconditions with associated damage to the satisfaction degree of resultant plan.
  • 21. Truth Degree
    • From a scale, K . Endpoints indicate total truth/falsehood.
    • Attached to each proposition.
    • For example, can express how valuable a package is:
      • valuable pkg a k  . Equivalent to ¬ (valuable pkg a ).
      • valuable pkg b k  , valuable pkg b k  …
    • Operators and goals can identify ranges of acceptable truth degrees in their preconditions.
  • 22. Flexible Plan Quality
    • Plan satisfaction degree is combination of all action/goal satisfaction degrees.
      • Via min .
    • Plan quality:
      • Length combined with plan satisfaction degree
      • With same satisfaction, shorter preferred.
    • Trade length of plan against number and severity of compromises made.
  • 23. Flexible Example
    • Flexible goals:
      • Both packages to c 4 .
        • pkg 2 is worth less, don’t deliver: l 1
      • Guard to c 3 .
        • Can also leave guard at c 2 or c 4 : l 2
    c 1 c 2 c 4 c 3 r 1 r 2 r 3 m 1 m 2 pkg 1 pkg 2 guard 1 L={l  , l 1 , l 2 , l T }
  • 24. Flexible Example
    • Operators:
      • Drive-truck .
        • Avoid mountains or: l 1
      • Load/Unload-truck .
        • For valuable package, guard present or: l 2
      • Guard-boards/leaves-truck .
    c 1 c 2 c 4 r 1 r 2 r 3 m 1 m 2 pkg 1 pkg 2 guard 1 L={l  , l 1 , l 2 , l T }
  • 25. Flexible Planning Graph
    • Actions annotated with their satisfaction degrees.
    • CSP variable domains expressed as unary fuzzy constraints.
      • Prefer to assign an element with l  , then l T-1 , …
    Actions 1 Propositions 1 . . . . . . . . . l 2 l 3 l 1
  • 26. Finding Valid Flexible Plans: Flexible Graphplan
    • Same basic process.
    • Sub-problems are now fuzzy CSPs.
    • Overall search is branch and bound :
      • Find a plan with higher satisfaction degree than highest currently known.
    Goal Sub-problem
  • 27. Short Compromise Plan
    • Load-truck pkg 1 truck l 2 .
    • Drive-truck truck c 1 to c 2 via r 1 l T .
    • Drive-truck truck c 2 to c 4 via m 2 l 1 .
    • Unload-truck pkg 1 truck l 2 .
    c 1 c 2 c 4 c 3 r 1 r 2 r 3 m 1 m 2 pkg 1 pkg 2 guard 1 L={l  , l 1 , l 2 , l T } 4-steps ( l 1 )
  • 28. Longer Plan, Fewer Compromises
    • Load-truck pkg 1 truck l 2 .
    • Drive-truck truck c 1 to c 2 via r 1 l T .
    • Load-truck pkg 2 truck l T .
    • Drive-truck truck c 2 to c 3 via r 2 l T .
    • Drive-truck truck c 3 to c 4 via r 3 l T .
    • Unload-truck pkg 1 truck l 2 , pkg 2 truck l T .
    c 1 c 2 c 4 c 3 r 1 r 2 r 3 m 1 m 2 pkg 1 pkg 2 guard 1 L={l  , l 1 , l 2 , l T } 6-steps ( l 2 )
  • 29. Limited Graph Expansion
    • A plan with satisfaction degree l  has been found.
    • Because of min aggregation:
      • A plan with a higher satisfaction degree than l  cannot contain any action with satisfaction degree  l  .
    • When expanding graph do not add actions with satisfaction degrees  l  .
    • Effect:
      • Reduce size of planning graph/sub-problems.
  • 30. Satisfaction Degree Propagation
    • Action2 has single precondition, effect of Action1.
    • Only way to support selection of Action2 at level a+1 is by also selecting Action1 at level a .
    • If known when solving sub-problem at level a+1 , can possibly prune branch earlier.
    • So propagate sat degrees forwards as graph expanded.
    l 1 Action1 Action2 Level a Level a+1
  • 31. Satisfaction Degree Propagation
    • Stage 1:
      • Label proposition nodes with max sat degree of those attached to all actions that assert it as an effect.
    l 1 Action1 Action3 Level a Level a+1 l 2 l 2
  • 32. Satisfaction Degree Propagation
    • Stage 2:
      • Action satisfaction degree = Min(own sat degree, min(sat degrees attached to each precondition)).
    l 1 Action1 Action3 Level a Level a+1 l 2 l 2 l 2
  • 33. Results: FGP vs Boolean Solving
    • Short compromise plans can often be found very quickly.
  • 34. Utility of Limited Graph Expansion/Satisfaction Propagation
    • Limited Graph Expansion, Satisfaction Propagation are Complementary.
  • 35. Flexible Graphplan: Observations
    • It is more expensive to search for a range of plans than for one compromise-free plan.
    • But it is often possible to find short, compromise plans quickly.
      • Supports anytime behaviour.
    • Range of plans trade length versus number and severity of the compromises made.
  • 36. Drowning and Leximin Ordering
    • Low satisfaction degree from one action:
      • Drowns the others because of min aggregation.
    • Leximin ordering:
      • Sort satisfaction degree vector associated with a solution.
      • Compare lexicographically :
      • { l 2 , l 3 , l 3 } > lex { l 2 , l 2 , l 3 }
    • Find compromise plans that min based search misses.
  • 37. Solution (Leximin)
    • Load-truck pkg 1 truck l 2 .
    • Drive-truck truck c 1 to c 2 via r 1 l T .
    • Load-truck pkg 2 truck l T .
    • Drive-truck truck c 2 to c 4 via m 2 l 1 .
    • Unload-truck pkg 1 truck l 2 , pkg 2 truck l T .
    c 1 c 2 c 4 c 3 r 1 r 2 r 3 m 1 m 2 pkg 1 pkg 2 guard 1 L={l  , l 1 , l 2 , l T } 5-steps ( l 1 , l 2 , l 2 , l 2 ) Also finds 2 more plans that FGP misses.
  • 38. Finding Leximin-optimal Plans: Leximin FGP
    • Again, same basic search process.
    • Sub-problems are now leximin fuzzy CSPs.
    • Overall search is branch and bound :
      • Find a plan with higher satisfaction degree vector than highest currently known.
    Goal Sub-problem
  • 39. Enhancements
    • Limited graph expansion works in the same way.
    • Must now propagate satisfaction degree vectors.
    • Stage 1:
      • Label proposition nodes with max sat degree vector of those attached to all actions that assert it as an effect.
    { l 1 , l 2 } Action1 Action3 Level a Level a+1 { l 2 , l 3 } { l 2 , l 3 } { l 1 }
  • 40. Satisfaction Degree Vector Propagation
    • Stage 2:
      • Action satisfaction degree vector combines satisfaction degree of this action, and
      • Satisfaction degree vectors of each precondition proposition.
    { l 1 , l 2 } Action1 Action3 Level a Level a+1 { l 2 , l 3 } { l 2 , l 3 } { l 1 , l 2 , l 3 } Action2
  • 41. Removing Duplicates
    • Not correct: { l 1 , l 1 , l 3 }
      • Only one instance of l 1 is guaranteed by selecting Action2.
    • Solution: make satisfaction degrees unique.
      • Composite objects referring to the action that created them.
      • Simple matter to remove duplicates.
    { l 1 } Action1 Action2 Level a Level a+1 {?, l 3 } { l 1 } { l 1 }
  • 42. Results: BBFGP vs. LFGP
    • More compromise plans found effectively.
  • 43. Results: BBFGP vs. LFGP
    • Effectiveness of satisfaction vector propagation problem-dependent.
  • 44. Results: BBFGP vs. LFGP
    • Larger |L| can mean many possible compromises.
  • 45. Results: Flexible Logistics
    • Explains time difference.
      • LFGP* in particular is solving many more sub-problems.
  • 46. Utility of Satisfaction Degree Vector Propagation
    • Never degrades performance.
      • Overhead of propagation and duplicate removal is compensated for by performance gain.
    • Sometimes hugely improves performance:
      • 17 times is best result so far.
      • Propagation allows branches of search to be pruned much earlier.
  • 47. Leximin FGP: Observations
    • More costly than FGP (efficiency is being improved).
    • But, effectively produces a greater range of compromise solutions.
    • Removes drowning.
    • Not limited by size of L .
      • In min version, can only be one plan of sat degree l 1 , one of sat degree l 2 …
  • 48. Conclusions
    • Flexible planning overcomes the inability to compromise in classical AI planning.
    • Flexible planners produce a range of solutions from a given input problem from which the user can select.
      • Trade length versus compromises made.
    • FGP and LFGP planners effectively solve these problems using hierarchical decomposition of the planning graph.
  • 49. Related Work
    • Conformant Planning:
      • Knowledge about possible initial states, and possible outcomes of each action.
    • Contingent Planning:
      • Sensing actions to detect the state of the world during execution.
    • Numerically weighted constraints:
      • Quantitative means of differentiating plans.
    • Pyrrhus:
      • Replaces goal formulae with utility models.
      • Does not associate utilities with individual actions.
  • 50. Future Work
    • Reasoning about:
      • Time.
      • Resources.
        • Truth degrees go some way towards this.
    • Further efficiency improvements:
      • Improve quality of memoisation.
      • Smaller memosets are better.
  • 51. Acknowledgements
    • Qiang Shen, University of Edinburgh.
    • Peter Jarvis, SRI International.
  • 52. Resources
    • www-users.cs.york.ac.uk/~ianm/FlexiblePlanning.html
      • FGP, LFGP.
      • Example problems.
      • References.