AI Lecture 17 Planning - PowerPoint PPT Presentation

1 / 34
About This Presentation
Title:

AI Lecture 17 Planning

Description:

AI Lecture 17. 5 /34. An example Blocks world. Blocks on a table ... See it in action at http://www.ai.sri.com/movies/Shakey.ram ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 35
Provided by: Noe90
Category:
Tags: ai | lecture | planning

less

Transcript and Presenter's Notes

Title: AI Lecture 17 Planning


1
AI Lecture 17Planning
  • Noémie Elhadad
  • (substituting for Prof. McKeown)

2
Problem solving so far
  • Need to solve a problem
  • Choose a representation
  • Choose a heuristic
  • Choose a search algorithm
  • Can this scale up to more complex problems?
  • Many irrelevant actions
  • Human must provide the heuristic
  • No knowledge on how to decompose or
    nearly-decompose the problem

3
Planning
  • Combine logic and search
  • General language to represent the problem
  • General algorithm

4
Planning components
  • Expressive Formal Language describes
  • Initial state of world
  • Agents goal
  • Possible actions that can be performed
  • Solver generates a sequence of actions which
    achieve the goal
  • Planning algorithm

5
An example Blocks world
  • Blocks on a table
  • Can be stacked, but only one block on top of
    another
  • A robot arm can pick up a block and movie to
    another position
  • On the table
  • On another block
  • Arm can pick up only one block at a time
  • Cannot pick up a block that has another one on it

6
Representation language
  • STRIPS (Fikes Nilsson, 1971)
  • One of the first planning systems
  • Robotics
  • See it in action at http//www.ai.sri.com/movies/S
    hakey.ram
  • Main contribution is its language description
    formalism
  • Many variants/extensions

7
STRIPS
  • State is a conjunction of positive ground
    literals
  • On(B, Table) ? Clear (A)
  • Goal is a conjunction of positive ground literals
  • Clear(A) ? On(A,B) ? On(B, Table)
  • Action schema
  • Conjunction of positive literals as preconditions
  • Conjunction of positive and negative literals as
    effects

8
More on action schema
  • Example Move (b, x, y)
  • Precondition Block(b) ? Clear(b) ? Clear(y) ?
    On(b,x) ? (b ? x) ? (b ? y) ? (y ? x)
  • Effect Clear(y) ? On(b,x) ? Clear(x) ?
    On(b,y)
  • An action is applicable in any state that
    satisfies its precondition

Add list
Delete list
9
STRIPS assumptions
  • Closed World assumption
  • Unmentioned literals are false (no need to
    explicitly list out)
  • w/an open world assumption unmentioned literals
    are unknown
  • STRIPS assumption
  • Every literal not mentioned in the effect of an
    action schema remains unchanged

10
STRIPS expressiveness
  • Literals are function free Move (Block(x), y, z)
  • Any action scheme can be propositionalized
  • Move(b,x,y) and 3 blocks and table can be
    expressed as 48 purely propositional actions
  • No disjunctive goals On(B, Table) V On(B, C)
  • No conditional effects On(B, Table) if On(A,
    Table)
  • In original STRIPS, no equality x ? y
  • Ramification esp. in more complex domain

11
Planning components
  • Expressive Formal Language describes
  • Initial state of world
  • Agents goal
  • Possible actions that can be performed
  • Solver generates a sequence of actions which
    achieve the goal
  • Planning algorithm

12
Planning algorithms
  • Planning algorithms are search procedures
  • Which state to search?
  • State-space search
  • Each node is a state of the KB
  • Plan path through the states
  • Plan-space search
  • Each node is a set of partially-instantiated
    operators and set of constraints
  • Plan node

13
State search
  • Search the space of situations, which is
    connected by operator instances
  • The sequence of operators instances the plan
  • Since we have both preconditions and effects
    available for each action schema, we can try
    different searches Forward vs. Backward

14
Forward state-space search (1)
  • Progression
  • Initial state initial state of the problem
  • Actions
  • Applied to a state if all the preconditions are
    satisfied
  • Succesor state is built by updating KB with add
    and delete lists
  • Goal test state satisfies the goal of the problem

15
Forward search in the Blocks world


16
Forward state-space search (2)
  • Advantages
  • No functions in the declarations of goals ?
    search state is finite
  • Sound
  • Complete (if algorithm used to do the search is
    complete)
  • Limitations
  • Irrelevant actions ? not efficient
  • Need heuristic or prunning procedure

17
Backward state-space search (1)
  • Regression
  • Initial state goal state of the problem
  • Actions
  • Choose an action that
  • Is relevant has one of the goal literals in its
    effect set
  • Is consistent does not negate another literal
  • Construct new search state
  • Remove all positive effects of A that appear in
    goal
  • Add all preconditions, unless already appears
  • Goal test state is the initial world state

18
Backward state-space search (2)
  • Possible because of STRIPS-like language
  • Goals are listed
  • Predecessors are listed for each action/state
  • Advantages
  • Consider only relevant actions ? much smaller
    branching factor
  • Ways to reduce even more the branching factors
  • Limitations
  • Still need heuristic to be more efficient

19
Heuristics for state-space search (1)
  • Valid both for forward and backward searches
  • Valid for many planning problems
  • Possible approaches
  • Divide and conquer
  • Derive a relaxed problem
  • Combine both

20
Heuristics for state-space search (2)
  • Divide and conquer
  • Subgoal independence assumption
  • What if there are negative interactions between
    the subgoals of the problems?
  • What if there are redundant actions in the
    subgoals?
  • Derive a relaxed problem
  • Remove all preconditions from the actions
  • Remove all negative effects from the actions
    (empty delete list)

21
Limitation of state-space search
  • Linear planning or Total order planning
  • Example
  • Initial state all the blocks are clear and on
    the table
  • Goal On(A,B) ? On(B,C)
  • If search achieves On(A,B) first, then needs to
    undo it in order to achieve On(B,C)
  • Have to go through all the possible permutations
    of the subgoals

22
Partial order planning (1)
  • Approaches that are not constrained to consider
    only totally ordered sequences of actions.
  • Strategy
  • Decompose goal into subgoals
  • Solve subgoals independently with subplans
  • Combine subplans into plan
  • Flexibility in order of plan construction
  • Least commitment
  • Delay choice during search so can work on
    important subplans before working on less
    important ones

23
Partial order planning (2)
  • Search in Plan space not State space
  • Focus search on the constrained parts of the plan
    first
  • More flexible
  • Graph of actions, not a sequence
  • Strategy
  • Start with empty plan (Start-Finish)
  • Refine the plan until get a complete plan that
    solves the problem
  • Actions are on the plan (not on the world/KB)
  • add step to the plan
  • Impose an ordering constraint between two steps
  • Every linearization of a partial-order solution
    is a total-order solution.

24
Partial order plan example
25
Partial plan
  • A set of steps/actions
  • Start, Finish, A, B
  • A set of ordering constraints
  • A lt B A must be carried out before B, not
    necessarily right before
  • A set of causal links
  • A?pB A achieves p for B
  • p is an effect of A and a precondition of B
  • p must remain true between from A to B
  • Set of open preconditions
  • Preconditions not achieved in the plan
  • A consistent plan has no cycles in the ordering
    constraints and no conflicts in the causal links
  • Solution consistent plan with no open
    preconditions

26
Maintaining consistency
  • Given causal link A?pB
  • C that has an effect p
  • Causes a conflict if there is a possible ordering
    for which C comes after A and before B
  • Say that C is a threat to causal link
  • Take an action to resolve threats by introducing
    additional ordering constraints

27
POP Search
  • Initial plan Start and Finish
  • Start lt Finish
  • no causal links
  • and all preconditions in Finish as open
    preconditions.
  • Successor pick an open precondition p (on action
    B), and look for an action A that achieves p
  • If new, then introduce A to plan, along with
    Start lt A and A lt Finish
  • Add causal link add ordering constraint A lt B
  • Check for conflicts
  • between new causal link and all existing actions
  • between action and all existing causal links
  • Add B lt C or C lt A if necessary to resolve
    threat if no cycles then generate a successor
    state
  • Goal check there are no open preconditions

28
POP in the Blocks world
29
POP in the Blocks world
30
POP in the Blocks world
31
POP in the Blocks world
32
POP
  • Advantages
  • Causal links help prunning since avoids
    irresolvable conflicts
  • Limitations
  • In some cases duplication of efforts
  • Since deal with plans (rather than states of the
    world), it is difficult to estimate how far we
    are from solution

33
Other planning algorithms
  • Planning graph allows for better heuristics
  • SAT translates the planning problem into
    propositional axioms and applies a satisfiability
    algorithm to find the model that corresponds to a
    valid plan.
  • Very active field of AI research!
  • Not one clear winner. Each approach is better
    adapted to a type of problem.

34
One more assumption
  • So far, we looked only at classical planning
    environments.
  • Lots of research on planning in non-classical
    environments
  • Environments where time plays an important role
    (scheduling jobs)
  • Partially observable or stochastic environments
Write a Comment
User Comments (0)
About PowerShow.com