Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)"— Presentation transcript:

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

2 AI Lecture 172/34 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 AI Lecture 173/34 Planning Combine logic and search General language to represent the problem General algorithm

4 AI Lecture 174/34 Planning components Expressive Formal Language describes –Initial state of world –Agent’s goal –Possible actions that can be performed Solver generates a sequence of actions which achieve the goal –Planning algorithm

5 AI Lecture 175/34 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 AI Lecture 176/34 Representation language STRIPS (Fikes & Nilsson, 1971) –One of the first planning systems –Robotics –See it in action at http://www.ai.sri.com/movies/Shakey.ram Main contribution is its language description formalism Many variants/extensions

7 AI Lecture 177/34 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 AI Lecture 178/34 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 Delete list Add list

9 AI Lecture 179/34 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 AI Lecture 1710/34 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 AI Lecture 1711/34 Planning components Expressive Formal Language describes –Initial state of world –Agent’s goal –Possible actions that can be performed Solver generates a sequence of actions which achieve the goal –Planning algorithm

12 AI Lecture 1712/34 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 AI Lecture 1713/34 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 AI Lecture 1714/34 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 AI Lecture 1715/34 Forward search in the Blocks world … …

16 AI Lecture 1716/34 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 AI Lecture 1717/34 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 AI Lecture 1718/34 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 AI Lecture 1719/34 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 AI Lecture 1720/34 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 AI Lecture 1721/34 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 AI Lecture 1722/34 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 AI Lecture 1723/34 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 AI Lecture 1724/34 Partial order plan example

25 AI Lecture 1725/34 Partial plan A set of steps/actions –Start, Finish, A, B A set of ordering constraints –A < B: A must be carried out before B, not necessarily right before A set of causal links –A→ p B: 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 AI Lecture 1726/34 Maintaining consistency Given causal link A→ p B –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 AI Lecture 1727/34 POP Search Initial plan: Start and Finish –Start < 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 < A and A < Finish –Add causal link; add ordering constraint A < B –Check for conflicts between new causal link and all existing actions; between action and all existing causal links –Add B < C or C < A if necessary to “resolve threat”; if no cycles then generate a successor state Goal: check there are no open preconditions

28 AI Lecture 1728/34 POP in the Blocks world

29 AI Lecture 1729/34 POP in the Blocks world

30 AI Lecture 1730/34 POP in the Blocks world

31 AI Lecture 1731/34 POP in the Blocks world

32 AI Lecture 1732/34 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 AI Lecture 1733/34 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 AI Lecture 1734/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 –…


Download ppt "AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)"

Similar presentations


Ads by Google