Classical Planning Chapter 10 Mausam / Andrey Kolobov (Based on slides of Dan Weld, Marie desJardins)

Slides:



Advertisements
Similar presentations
REVIEW : Planning To make your thinking more concrete, use a real problem to ground your discussion. –Develop a plan for a person who is getting out of.
Advertisements

Language for planning problems
CSE391 – 2005 NLP 1 Planning The Planning problem Planning with State-space search.
1 Planning Chapter CMSC 471 Adapted from slides by Tim Finin and Marie desJardins. Some material adopted from notes by Andreas Geyer-Schulz,
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
CLASSICAL PLANNING What is planning ?  Planning is an AI approach to control  It is deliberation about actions  Key ideas  We have a model of the.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
1 Graphplan José Luis Ambite * [* based in part on slides by Jim Blythe and Dan Weld]
Plan Generation & Causal-Link Planning 1 José Luis Ambite.
Planning with Constraints Graphplan & SATplan Yongmei Shi.
Graph-based Planning Brian C. Williams Sept. 25 th & 30 th, J/6.834J.
For Monday Finish chapter 12 Homework: –Chapter 13, exercises 8 and 15.
Planning CSE 473 Chapters 10.3 and 11. © D. Weld, D. Fox 2 Planning Given a logical description of the initial situation, a logical description of the.
1 Classical STRIPS Planning Alan Fern * * Based in part on slides by Daniel Weld.
Artificial Intelligence 2005/06
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
Artificial Intelligence Chapter 11: Planning
Planning: Part 3 Planning Graphs COMP151 April 4, 2007.
Planning CSE 473. © Daniel S. Weld Topics Agency Problem Spaces Search Knowledge Representation Reinforcement Learning InferencePlanning Supervised.
1 Approaches to Agent Control zAgent senses world, acts to affect world zReactive Control ySet of situation-action rules yE.g. x1) if dog-is-behind-me.
Planning II CSE 473. © Daniel S. Weld 2 Logistics Tournament! PS3 – later today Non programming exercises Programming component: (mini project) SPAM detection.
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
1 Logistics z1 Handout yCopies of my slides zReading yRecent Advances in AI Planning, sections 1-2.
1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington.
Classical Planning via State-space search COMP3431 Malcolm Ryan.
AI Principles, Lecture on Planning Planning Jeremy Wyatt.
Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today.
An Introduction to Artificial Intelligence CE Chapter 11 – Planning Ramin Halavati In which we see how an agent can take.
Classical Planning Chapter 10.
GraphPlan Alan Fern * * Based in part on slides by Daniel Weld and José Luis Ambite.
For Wednesday Read chapter 12, sections 3-5 Program 2 progress due.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Feng Zhiyong Tianjin University Fall planning.
April 3, 2006AI: Chapter 11: Planning1 Artificial Intelligence Chapter 11: Planning Michael Scherger Department of Computer Science Kent State University.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
CSE 473 Automated Planning Dan Weld (With slides by UW AI faculty & Dana Nau I have a plan - a plan that cannot possibly fail. - Inspector Clousseau.
Planning (Chapter 10)
For Monday Read chapter 12, sections 1-2 Homework: –Chapter 10, exercise 3.
Automated Planning Dr. Héctor Muñoz-Avila. What is Planning? Classical Definition Domain Independent: symbolic descriptions of the problems and the domain.
Introduction to Planning Dr. Shazzad Hosain Department of EECS North South Universtiy
CSE 473 Automated Planning Dan Weld (With slides by UW AI faculty & Dana Nau I have a plan - a plan that cannot possibly fail. - Inspector Clousseau.
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
CSE 573: Artificial Intelligence Autumn2012 Heuristics & Pattern Databases for Search With many slides from Dan Klein, Richard Korf, Stuart Russell, Andrew.
Intro to Planning Or, how to represent the planning problem in logic.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Graphplan.
© Daniel S. Weld 1 Logistics Travel Wed class led by Mausam Week’s reading R&N ch17 Project meetings.
Planning I: Total Order Planners Sections
Automated Planning and Decision Making Prof. Ronen Brafman Automated Planning and Decision Making Graphplan Based on slides by: Ambite, Blyth and.
Graphplan CSE 574 April 4, 2003 Dan Weld. Schedule BASICS Intro Graphplan SATplan State-space Refinement SPEEDUP EBL & DDB Heuristic Gen TEMPORAL Partial-O.
Consider the task get milk, bananas, and a cordless drill.
Causal-link planning 1 Jim Blythe. 2 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning The planning problem Inputs: 1. A description of the world.
Heuristic Search Planners. 2 USC INFORMATION SCIENCES INSTITUTE Planning as heuristic search Use standard search techniques, e.g. A*, best-first, hill-climbing.
1 Chapter 6 Planning-Graph Techniques. 2 Motivation A big source of inefficiency in search algorithms is the branching factor  the number of children.
Consider the task get milk, bananas, and a cordless drill
Class #17 – Thursday, October 27
Graph-based Planning Slides based on material from: Prof. Maria Fox
Graphplan/ SATPlan Chapter
Planning CSE 473 AIMA, 10.3 and 11.
Planning CSE 573 A handful of GENERAL SEARCH TECHNIQUES lie at the heart of practically all work in AI We will encounter the SAME PRINCIPLES again and.
Planning Problems On(C, A)‏ On(A, Table)‏ On(B, Table)‏ Clear(C)‏
Class #19 – Monday, November 3
Chapter 6 Planning-Graph Techniques
Graphplan/ SATPlan Chapter
Graphplan/ SATPlan Chapter
GraphPlan Jim Blythe.
Graph-based Planning Slides based on material from: Prof. Maria Fox
[* based in part on slides by Jim Blythe and Dan Weld]
Presentation transcript:

Classical Planning Chapter 10 Mausam / Andrey Kolobov (Based on slides of Dan Weld, Marie desJardins)

Planning Given – a logical description of the world states, – a logical description of a set of possible actions, – a logical description of the initial situation, and – a logical description of the goal conditions, Find – a sequence of actions (a plan of actions) that brings us from the initial situation to a situation in which the goal conditions hold. © D. Weld, D. Fox2

Example: BlocksWorld © Daniel S. Weld3 A C B C B A ?

Planning Input: State Variables/Propositions (on-table a) (on-table b) (on-table c) (clear a) (clear b) (clear c) (arm-empty) (holding a) (holding b) (holding c) (on a b) (on a c) (on b a) (on b c) (on c a) (on c b) Typed constants: block a, b, c Typed predicates: (on-table ?b); (clear ?b) (arm-empty); (holding ?b) (on ?b1 ?b2) © D. Weld, D. Fox4 No. of state variables =16 No. of states = 2 16 No. of reachable states = ?

Planning Input: Actions pickup a b, pickup a c, … place a b, place a c, … pickup-table a, pickup-table b, … place-table a, place-table b, … © D. Weld, D. Fox5 pickup ?b1 ?b2 place ?b1 ?b2 pickup-table ?b place-table ?b Total: = 18 “ground” actions Total: 4 action schemata

Planning Input: Actions (contd) :action pickup ?b1 ?b2 :precondition (on ?b1 ?b2) (clear ?b1) (arm-empty) :effect (holding ?b1) (not (on ?b1 ?b2)) (clear ?b2) (not (arm-empty)) © D. Weld, D. Fox6 :action pickup-table ?b :precondition (on-table ?b) (clear ?b) (arm-empty) :effect (holding ?b) (not (on-table ?b)) (not (arm-empty))

Planning Input: Initial State (on-table a) (on-table b) (arm-empty) (clear c) (clear b) (on c a) All other propositions false not mentioned  false © D. Weld, D. Fox7 A C B

Planning Input: Goal (on-table c) AND (on b c) AND (on a b) Is this a state? In planning a goal is a set of states © D. Weld, D. Fox8 C B A

Planning Input Representation Description of world states Description of initial state of world – Set of propositions Description of goal: i.e. set of worlds – E.g., Logical conjunction – Any world satisfying conjunction is a goal Description of available actions © D. Weld, D. Fox9

Classical Planning Simplifying assumptions – Atomic time – Agent is omniscient (no sensing necessary). – Agent is sole cause of change – Actions have deterministic effects STRIPS representation – World = set of true propositions (conjunction) – Actions: Precondition: (conjunction of positive literals, no functions) Effects (conjunction of literals, no functions) – Goal = conjunction of positive literals (e.g., Rich ^ Famous) © D. Weld, D. Fox10

Planning vs. General Search © D. Weld, D. Fox11 Basic difference: Explicit, logic-based representation States/Situations: descriptions of the world by logical formulae  agent can explicitly reason about and communicate with the world. Operators/Actions: Axioms or transformation on formulae in a logical form  agent can gain information about the effects of actions by inspecting the operators. Goal conditions as logical formulae vs. goal test (black box)  agent can reflect on its goals.

Planning as Search Forward Search in ? Space – World State Space – start from start state; look for a state with goal property dfs/bfs A* Backward Search in ? Space – Subgoal Space – start from goal conjunction; look for subgoal that holds in initial state dfs/bfs/A* Local Search in ? Space – Plan Space © D. Weld, D. Fox12

Forward World-Space Search © Daniel S. Weld13 A C B C B A Initial State Goal State A C BA C B

Forward State-Space Search Initial state: set of positive ground literals (CWA: literals not appearing are false) Actions: – applicable if preconditions satisfied – add positive effect literals – remove negative effect literals Goal test: checks whether state satisfies goal Step cost: typically 1 © D. Weld, D. Fox14

Heuristics for State-Space Search Count number of false goal propositions in current state Admissible? NO Subgoal independence assumption: – Cost of solving conjunction is sum of cost of solving each subgoal independently – Optimistic: ignores negative interactions – Pessimistic: ignores redundancy – Admissible? No © D. Weld, D. Fox15

Heuristics for State Space Search (contd) Delete all preconditions from actions, solve easy relaxed problem, use length Admissible? YES Delete negative effects from actions, solve easier relaxed problem, use length Admissible? YES (if Goal has only positive literals, true in STRIPS) CSE

Backward Subgoal-Space Search Regression planning Problem: Need to find predecessors of state Problem: Many possible goal states are equally acceptable. From which one does one search? © D. Weld, D. Fox17 D C B A E D C B A E D C B A E * * * A C B Initial State is completely defined D E

Regression Regressing a goal, G, thru an action, A yields the weakest precondition G’ – Such that: if G’ is true before A is executed – G is guaranteed to be true afterwards © D. Weld, D. Fox18 A G precond effect G’ Represents a set of world states

Regression Example © D. Weld, D. Fox19 :action pickup-table ?b :precondition (on-table ?b) (clear ?b) (arm-empty) :effect (holding ?b) (not (on-table ?b)) (not (arm-empty)) A G precond effect G’ (and (holding C) (on A B)) (and (clear C) (on-table C) (arm-empty) (on A B)) Remove positive effects Add preconditions for A A C B A C B

Complexity of Planning Size of Search Space – Forward: size of world state space – Backward: size of subsets of partial state space! Size of World state space – exponential in problem representation What to do? – Informative heuristic that can be computed in polynomial time! © D. Weld, D. Fox20

Planning Graph: Basic idea Construct a planning graph: encodes constraints on possible plans Use this planning graph to compute an informative heuristic (Forward A*) Planning graph can be built for each problem in polynomial time © D. Weld, D. Fox21

The Planning Graph © D. Weld, D. Fox22 … … … level P0level P1level P2level P3 level A1level A2level A3 propositions actions propositions actions Note: a few noops missing for clarity

Graph Expansion © D. Weld, D. Fox23 Proposition level 0 initial conditions Action level i no-op for each proposition at level i-1 action for each operator instance whose preconditions exist at level i-1 Proposition level i effects of each no-op and action at level i … … … … i-1ii+10

Mutual Exclusion © D. Weld, D. Fox24 Two actions are mutex if one clobbers the other’s effects or preconditions they have mutex preconditions Two proposition are mutex if one is the negation of the other all ways of achieving them are mutex p pp p pp p pp

Dinner Date © D. Weld, D. Fox25 Initial Conditions: (:and (cleanHands) (quiet)) Goal: (:and (noGarbage) (dinner) (present)) Actions: (:operator carry :precondition :effect (:and (noGarbage) (:not (cleanHands))) (:operator dolly :precondition :effect (:and (noGarbage) (:not (quiet))) (:operator cook :precondition (cleanHands) :effect (dinner)) (:operator wrap :precondition (quiet) :effect (present))

Planning Graph © D. Weld, D. Fox26 noGarb cleanH quiet dinner present carry dolly cook wrap cleanH quiet 0 Prop 1 Action 2 Prop 3 Action 4 Prop

Are there any exclusions? © D. Weld, D. Fox27 noGarb cleanH quiet dinner present carry dolly cook wrap cleanH quiet 0 Prop 1 Action 2 Prop 3 Action 4 Prop ¬cleanH ¬quiet

Observation 1 © D. Weld, D. Fox28 Propositions monotonically increase (always carried forward by no-ops) p ¬q ¬r p q ¬q ¬r p q ¬q r ¬r p q ¬q r ¬r A A B A B

Observation 2 © D. Weld, D. Fox29 Actions monotonically increase p ¬q ¬r p q ¬q ¬r p q ¬q r ¬r p q ¬q r ¬r A A B A B

Observation 3 © D. Weld, D. Fox30 Proposition mutex relationships monotonically decrease pqr…pqr… A pqr…pqr… pqr…pqr…

Observation 4 © D. Weld, D. Fox31 Action mutex relationships monotonically decrease pq…pq… B pqrs…pqrs… pqrs…pqrs… A C B C A pqrs…pqrs… B C A

Observation 5 Planning Graph ‘levels off’. After some time k all levels are identical Because it’s a finite space, the set of literals never decreases and mutexes don’t reappear. © D. Weld, D. Fox32

Properties of Planning Graph If goal is absent from last level – Goal cannot be achieved! If there exists a path to goal – Goal is present in the last level If goal is present in last level – There may not exist any path still © D. Weld, D. Fox33

Heuristics based on Planning Graph Construct planning graph starting from s h(s) = level at which goal appears non-mutex – Admissible? – YES Relaxed Planning Graph Heuristic – Remove negative preconditions build plan. graph – Use heuristic as above – Admissible? YES – More informative? NO – Speed: FASTER © D. Weld, D. Fox34

FF Topmost classical planner until 2009 State space local search – Guided by relaxed planning graph – Full bfs to escape plateaus – enforced hill climbing – A few other bells and whistles… © Mausam35

SATPlan: Planning as SAT Formulate the planning problem as a CSP Assume that the plan has k actions Create a binary variable for each possible action a: – Action(a,i) (TRUE if action a is used at step i) Create variables for each proposition that can hold at different points in time: – Proposition(p,i) (TRUE if proposition p holds at step i) 36

Constraints XOR: Only one action can be executed at each time step At least one action must be executed at each time step Constraints describing effects of actions – Action(a,i)  prec(a,i-1); Action(a,i)  eff(a,i) Maintain action: if an action does not change a prop p, then maintain action for proposition p is true – Action(maint_p,i)  Action(a1,i) v Action(a2,i)… [for all a i that don’t effect p] A proposition is true at step i only if some action (possibly a maintain action) made it true Constraints for initial state and goal state © Mausam37

Application: Mars Rover © Mausam 38

Application: Network Security Analysis © Mausam 39

Planning Summary  Problem solving algorithms that operate on explicit propositional representations of states and actions.  Make use of specific heuristics.  STRIPS: restrictive propositional language  State-space search: forward (progression) / backward (regression) search  Local search FF; using compilation into SAT  Partial order planners search space of plans from goal to start, adding actions to achieve goals (did not cover) © D. Weld, D. Fox40