Automated Planning and Decision Making Prof. Ronen Brafman Automated Planning and Decision Making 20071 Introduction.

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

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.
1 Model checking. 2 And now... the system How do we model a reactive system with an automaton ? It is convenient to model systems with Transition systems.
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:
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Hoare’s Correctness Triplets Dijkstra’s Predicate Transformers
Plan Generation & Causal-Link Planning 1 José Luis Ambite.
INTRODUCTION TO MODELING
Planning Graphs * Based on slides by Alan Fern, Berthe Choueiry and Sungwook Yoon.
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.
Artificial Intelligence II S. Russell and P. Norvig Artificial Intelligence: A Modern Approach Chapter 11: Planning.
1 Classical STRIPS Planning Alan Fern * * Based in part on slides by Daniel Weld.
Multi-agent Planning Amin Atrash. Papers Dynamic Planning for Multiple Mobile Robots –Barry L. Brummit, Anthony Stentz OBDD-based Universal Planning:
CPSC 322, Lecture 19Slide 1 Propositional Logic Intro, Syntax Computer Science cpsc322, Lecture 19 (Textbook Chpt ) February, 23, 2009.
CPSC 322, Lecture 18Slide 1 Planning: Heuristics and CSP Planning Computer Science cpsc322, Lecture 18 (Textbook Chpt 8) February, 12, 2010.
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
Artificial Intelligence Chapter 11: Planning
Planning Russell and Norvig: Chapter 11. Planning Agent environment agent ? sensors actuators A1A2A3.
1 Lecture 12 example (from slides prepared by Prof. J. Rosenchein)
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
Chapter 11: Limitations of Algorithmic Power
Intro to AI Fall 2002 © L. Joskowicz 1 Introduction to Artificial Intelligence LECTURE 12: Planning Motivation Search, theorem proving, and planning Situation.
Automated Planning and HTNs Planning – A brief intro Planning – A brief intro Classical Planning – The STRIPS Language Classical Planning – The STRIPS.
Dynamic Bayesian Networks CSE 473. © Daniel S. Weld Topics Agency Problem Spaces Search Knowledge Representation Reinforcement Learning InferencePlanningLearning.
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.
PLANNING Partial order regression planning Temporal representation 1 Deductive planning in Logic Temporal representation 2.
PLANNING Partial order regression planning Temporal representation 1 Deductive planning in Logic Temporal representation 2.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
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:
April 3, 2006AI: Chapter 11: Planning1 Artificial Intelligence Chapter 11: Planning Michael Scherger Department of Computer Science Kent State University.
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
Planning, page 1 CSI 4106, Winter 2005 Planning Points Elements of a planning problem Planning as resolution Conditional plans Actions as preconditions.
Planning (Chapter 10)
Automated Planning and Decision Making Prof. Ronen Brafman Automated Planning and Decision Making Introduction.
CPS 270: Artificial Intelligence Planning Instructor: Vincent Conitzer.
1 Search vs. planning Situation calculus STRIPS operators Search vs. planning Situation calculus STRIPS operators.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
AI Automated Planning In A Nutshell Vitaly Mirkis March 4, 2013 Netanya Academic College Acknowledgments: Some slides are based slides of Prof. Carmel.
CPS 570: Artificial Intelligence Planning Instructor: Vincent Conitzer.
Automated Planning and Decision Making Prof. Ronen Brafman Automated Planning and Decision Making Partial Order Planning Based on slides by: Carmel.
1 Chapter 16 Planning Methods. 2 Chapter 16 Contents (1) l STRIPS l STRIPS Implementation l Partial Order Planning l The Principle of Least Commitment.
Automated Planning Dr. Héctor Muñoz-Avila. What is Planning? Classical Definition Domain Independent: symbolic descriptions of the problems and the domain.
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
Introduction to Artificial Intelligence Class 1 Planning & Search Henry Kautz Winter 2007.
1/16 Planning Chapter 11- Part1 Author: Vali Derhami.
Intro to Planning Or, how to represent the planning problem in logic.
Classical Planning Chapter 10 Mausam / Andrey Kolobov (Based on slides of Dan Weld, Marie desJardins)
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.
Planning in FOL Systems sequences of actions to achieve goals.
From Natural Language to LTL: Difficulties Capturing Natural Language Specification in Formal Languages for Automatic Analysis Elsa L Gunter NJIT.
Artificial Intelligence 2004 Planning: Situation Calculus Review STRIPS POP Hierarchical Planning Situation Calculus (John McCarthy) situations.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
Consider the task get milk, bananas, and a cordless drill.
R. Brafman and M. Tennenholtz Presented by Daniel Rasmussen.
Causal-link planning 1 Jim Blythe. 2 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning The planning problem Inputs: 1. A description of the world.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
L9. Planning Agents L7_exAnswer and explanation Review
Introduction Contents Sungwook Yoon, Postdoctoral Research Associate
Consider the task get milk, bananas, and a cordless drill
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.
L11. Planning Agents and STRIPS
Decision Theory: Single Stage Decisions
Russell and Norvig: Chapter 11 CS121 – Winter 2003
Prof. Pushpak Bhattacharyya, IIT Bombay
Presentation transcript:

Automated Planning and Decision Making Prof. Ronen Brafman Automated Planning and Decision Making Introduction

Automated Planning and Decision Making2 General Information  Instructor: Prof. Ronen Brafman ○Office:209, building 37 ○Office Hours: Monday (may change) ○  Site:

Automated Planning and Decision Making3 Course Goals Understand models and algorithms developed, mostly in AI, for building autonomous systems, and automating and supporting decision making processes.

4 Applications  System that can figure out how to achieve a goal ○Autonomous systems (robots, game-playing agents, agents on web ○Automated composition of web-services (e.g., planning a vacation ○Solve complicated planning problems (e.g., logistics, construction  Decision-support systems and decision analysis ○Making decisions under uncertainty and complex objectives: ○Strategic decisions such as whether to invest in some technology, where to build a new plant, etc.  Probabilistic expert systems (diagnosis of illness, machine problems, business problems)  Preference elicitation, especially for e-commerce ○Helping users choose among a set of complex alternatives (camera, pc, vacation package)

5 NASA’s Experience  Galileo Jupiter or Cassini Saturn missions: ○$1G budget ○Ground crew of  Mars micro-rover Sojourne ○$100M budget ○Much smaller ground team ○Sojourne was designed to operate for two month, but lasted much longer ○Its level of autonomy is still low compared to what we can achieve

6 NASA’s Experience  Space exploration systems should be: ○Low cost/rapid development: use off-the-shelf algorithms/systems as much as possible ○Low cost control: autonomous operations for long period of times ○Autonomous operations should guarantee success given tight deadlines and resource constraints 6

7 AUV for Environmental Monitoring and Maintenance  Monitoring environments is important for economic, environmental, and security  Sending ships and divers to monitor fish habitat regions or gas pipelines is very expensive  An alternative: autonomous underwater vehicles that operate autonomously for long period of time  Can communicate with base-station and get new goals and adjust their plans  Current area of research!

Automated Planning and Decision Making4 Workload and Grade  Assignments (45% total) ○3 written assignments ○3 programming assignments ○Individual assignment weight varies with difficulty  2 Quizzes (25% each).  Quizzes mandatory (except for usual cases)  Online quizzes (5%)  Attendance: mandatory (miss at most 4)

Automated Planning and Decision Making5 Syllabus  Classical AI planning: How to figure out what to do to achieve a goal in a deterministic system  Planning under uncertainty: How to act well in a stochastic environment or when we have only partial information  Bayesian networks and influence diagrams: How to represent and reason about uncertain events  Preference models: How to obtain, represent, and reason with information about preferences  Reinforcement learning: How to improve your performance in an unknown environment

10 Classical Planning in Two Slides  Our world is like an automaton  Our actions change the world = letters in our alphabet  A plan takes us from the current state to a goal state  Current state = initial state  Goal states = accepting states  Plan = a word in the language of this automaton ○= a word that takes us from the initial state to the goal state ○Solution: trivial -- find shortest path from initial state to a goal state using Dijkstra’s algorithm ○Complexity O(|v| log |v| + |E|) ○Good bye, and see you at the exam!?

11

12

13

14 Classical Planning in Two Slides  Problem: world is too big and complicated ○Too many states! ○Can’t really write down the whole automaton  Solution: ○Need a compact (implicit) specification Called a planning domain description language More natural to use than an explicit model ○find efficient algorithms that operate on this specification Called planning algorithms Generate a plan (= word) Efficient as a function of the input, not the automaton

Automated Planning and Decision Making6 Key Concepts  Model: Describes those aspects of the world we want to capture. ○Should be intuitive ○Can be very large and difficult to work with directly ○In classical planning -- an automaton where letter = action  Language: Tool for describing a model implicitly ○Should make it easy(ier) to describe common/useful models  Interpretation: Maps between expressions in the language and the model ○Something that tells us how to build the automation from a planning domain description  Queries: Questions about the model we wish to answer ○Classical planning: find a plan (=word) from the initial state to a goal state  Algorithms: Compute answer to the queries

Automated Planning and Decision Making9 Classical Planning Problem  Given a system with a set of deterministic operators/actions, an initial system state and a goal condition, find a sequence of actions that transform the system from its initial state to a state satisfying the goal ○Deterministic actions = actions whose effect is a deterministic function of the current system state ○In Automata terms: find a word in the language of an automata whose states are the states of the world, letters are actions, goal states are accepting states

Automated Planning and Decision Making10 Example Applications  Planning a sequence of operations to transform raw material to an end product ○Metal bending machines use this  Finding a sequence of actions for the robot that will results in a sample from an interesting rock ○NASA’s Mars Rovers use such technology  Find a sequence of actions to repair the current state ○Xerox copiers use this  Program a system for simulating smart opponent ○Elbit uses this  Penetration testing -- find a sequence of actions that a malicious user could use to access your system

Automated Planning and Decision Making11 Back to Blocks’ World B A C B AC Initial StateGoal State

Automated Planning and Decision Making12 Model & Language  Model: Describes the problem domain. ○S - Set of possible states of the world/system Possible block configurations ○A - Set of deterministic actions. A: S→S Take the form Move(X,Y,Z) Move(B,C,Table): etc.  Language: Describes a model. ○How to represent a state? ○How to represent an action? B AC B AC B AC

Automated Planning and Decision Making13 The STRIPS Language  Stanford Research Institute Problem Solver – an automated planner. (Fikes & Nilsson 1975)  The name was later used to refer to a formal language for describing its inputs.  This language is the basis for most of the languages for expressing automated planning problems.

Automated Planning and Decision Making14 STRIPS - States  State – An assignment of truth values (true/false) to a set of state variables. ○On(X,Y), where X,Y are blocks or the Table ○Clear(X), where X is a block  State representation in STRIPS: list of all variables whose truth value is true ○On(A,Table),On(B,C),On(C,Table),Clear(A),Clear(B) ○Recall from logic: on(A,Table) is a (propositional) variable A literal is a variable or its negation (on(A,B),-on(A,B),…) B AC

Automated Planning and Decision Making15 STRIPS - Actions  Operators - described by a schema of variables composed of 3 lists: ○Preconditions. ○Delete-list. ○Add-list.  Actions obtained by replacing operator variables by state variables (called grounding)  Move(X,Y,Z) as STRIPS Action: ○Precondition: On(X,Y), Clear(X), Clear(Z) ○Add-List: On(X,Z), Clear(Y) ○Delete-List: On(X,Y), Clear(Z)

Automated Planning and Decision Making15 STRIPS - Actions (alternative)  Operators - described by a schema of variables composed of 2 lists: ○Preconditions. ○Effects  Actions obtained by replacing operator variables by state variables (called grounding)  Move(X,Y,Z) as STRIPS Action: ○Precondition: On(X,Y), Clear(X), Clear(Z) ○Effects: On(X,Z), Clear(Y), -On(X,Y), -Clear(Z)

Automated Planning and Decision Making16  If a State does not satisfy Preconditions, Action is not defined.  Else, the result of the Action is obtained as follows: New-State=(State/Delete-List) U Add-List  Note: Apply delete operation first, because it is possible that: Add-List ∩ Delete-List ≠ {} STRIPS – Action Semantics

Automated Planning and Decision Making17 Example: Apply Move(B,C,A)  Move(B,C,A) as STRIPS Action: ○Precondition: On(B,C), Clear(B), Clear(A) ○Add-List: On(B,A), Clear(C) ○Delete-List: On(B,C), Clear(A) B AC

Automated Planning and Decision Making18 Example:  What if we try to apply the same action in our new state?  In what other states can we apply this action?

Automated Planning and Decision Making19 Goal Representation  Goals are represented by a conjunction (AND) of positive literals  For example On(A,B) & On(B,C)  A goal state is any state that satisfies this conjunction  More than one state could be a goal state

28 The Planning Problem  P =  V - set of variables (not necessarily Boolean) ○State space size: |maximal domain size| |V| ○STRIPS: boolean variables (propositions)  A - set of (deterministic) actions ○STRIPS is just one way to describe actions ○Many alternatives and extensions  I - initial state ○STRIPS: list of propositions assigned true  G - goal condition ○STRIPS: a conjunction of propositions ○Could be an arbitrary formula over V

29 The Planning Problem  P =  V - set of variables (not necessarily Boolean) ○State space size: |maximal domain size| |V| ○STRIPS: boolean variables (propositions)  A - set of (deterministic) actions ○STRIPS is just one way to describe actions ○Many alternatives and extensions  I - initial state ○STRIPS: list of propositions assigned true  G - goal condition ○STRIPS: a conjunction of propositions ○Could be an arbitrary formula over V  c: A R ○The cost of each action

30 Richer Languages: Example -- Transport Domain (define (domain transport) (:requirements :typing :action-costs) (:types location target locatable - object vehicle package - locatable capacity-number - object ) (:predicates (road ?l1 ?l2 - location) (at ?x - locatable ?v - location) (in ?x - package ?v - vehicle) (capacity ?v - vehicle ?s1 - capacity-number) (capacity-predecessor ?s1 ?s2 - capacity-number)) (:functions (road-length ?l1 ?l2 - location) - number (total-cost) - number ) 30

31 (:action drive :parameters (?v - vehicle ?l1 ?l2 - location) :precondition (and (at ?v ?l1) (road ?l1 ?l2)) :effect (and (not (at ?v ?l1)) (at ?v ?l2) (increase (total-cost) (road-length ?l1 ?l2)) )) (:action pick-up :parameters (?v - vehicle ?l - location ?p - package ?s1 ?s2 - capacity-number) :precondition (and (at ?v ?l) (at ?p ?l) (capacity-predecessor ?s1 ?s2) (capacity ?v ?s2)) :effect (and (not (at ?p ?l)) (in ?p ?v) (capacity ?v ?s1) (not (capacity ?v ?s2)) (increase (total-cost) 1))) (:action drop :parameters (?v - vehicle ?l - location ?p - package ?s1 ?s2 - capacity-number) :precondition (and (at ?v ?l) (in ?p ?v) (capacity-predecessor ?s1 ?s2) (capacity ?v ?s1)) :effect (and (not (in ?p ?v)) (at ?p ?l) (capacity ?v ?s2) (not (capacity ?v ?s1)) (increase (total-cost) 1))))

32 (define (problem transport-city) (:domain transport) (:objects city-loc-1 - location city-loc-2 - location city-loc-3 - location truck-1 - vehicle truck-2 - vehicle package-1 - package package-2 - package capacity-0 - capacity-number capacity-1 - capacity-number capacity-2 - capacity-number capacity-3 - capacity-number capacity-4 - capacity-number ) (:init (= (total-cost) 0) (capacity-predecessor capacity-0 capacity-1) (capacity-predecessor capacity-1 capacity-2) (capacity-predecessor capacity-2 capacity-3) (capacity-predecessor capacity-3 capacity-4) (road city-loc-3 city-loc-1) (= (road-length city-loc-3 city-loc-1) 22) (road city-loc-1 city-loc-3) (= (road-length city-loc-1 city-loc-3) 22) (road city-loc-3 city-loc-2) (= (road-length city-loc-3 city-loc-2) 50) (road city-loc-2 city-loc-3) (= (road-length city-loc-2 city-loc-3) 50) (at package-1 city-loc-3) (at package-2 city-loc-3) (at truck-1 city-loc-3) (capacity truck-1 capacity-4) (at truck-2 city-loc-1) (capacity truck-2 capacity-3) ) (:goal (and (at package-1 city-loc-2) (at package-2 city-loc-2) )) (:metric minimize (total-cost)) ) 32

33  Examples state:  Example action:  New state:

34 Questions We Can Ask  Is there a plan?  Find a plan?  Find an optimal plan? ○Optimal can mean different thing Fewest actions Fewest time-steps with parallel actions Minimal sum of action cost

Automated Planning and Decision Making21 Our Focus: Plan Generation  Find a sequence of actions that will get us from the initial state to a goal state  Complexity: PSPACE-Complete  Find a short (bounded) sequence of actions (if one exists) that...  Complexity: NP-complete

Automated Planning and Decision Making22 Original STRIPS Algorithm  Maintain two data structures: ○Current state. ○Stack with sub-goals (i.e, state variables to achieve)  Initialization: ○Push all goal variables to the stack in some order. ○Current state ← Initial state.

Automated Planning and Decision Making23 STRIPS Algorithm While ( stack is not empty ) { X ← pop ( stack ); Case: X is an action: Apply X to the current state; update state; record action X is a literal not satisfied in the current state: { Push an action that has X in its add list Push the preconditions of this action in some random order } Output the list of executed actions

Automated Planning and Decision Making24 Problem Example  Recall the Blocks World: ○Initial state: Goal state:  In STRIPS: ○Initial state: on(C,T), on(B,A), on(A,T), Clear(B), Clear(C) ○Goal state: on(A,B), on(B,C), on(C,T) B AC B A C

Automated Planning and Decision Making25 STRIPS Algorithm Example  Initial state: Goal state: On(A,B) On(B,C) On(C,T) B AC B A C Goal state variables Clear(A) Clear(B) On(A,T) Move(A,T,B) On(B,C) On(C,T) We pop On(A,B), add the action Move(A,T,B), which has On(A,B) in its add-list, and push it’s pre conditions to the stack. We pop Clear(A), add the action Move(B,A,C), which has Clear(A) in its add-list, and push it’s pre conditions to the stack. Clear(C) Clear(B) On(B,A) Move(B,A,C) Clear(B) On(A,T) Move(A,T,B) On(B,C) On(C,T)

Automated Planning and Decision Making STRIPS Algorithm Example Clear(C) Clear(B) On(B,A) Move(B,A,C) Clear(B) On(A,T) Move(A,T,B) On(B,C) On(C,T) We pop these variables and because they are true no action follows We activate these operations on the current state 26

41 Example: A Problem STRIPS Will not Solve: ○ Initial state: Goal state: 41 BA C B A C

Automated Planning and Decision Making27 STRIPS Algorithm  Observations: ○The algorithm can get stuck when there is a precondition that no action can generate Does this mean that there is no plan? ○The algorithm is not sound or complete Sound = returns only valid plans Complete = always returns a plan when one exists Terminating = the algorithm always terminates in finite time

Automated Planning and Decision Making28 Improved STRIPS Algorithm  Given a goal or a list of preconditions ○We push the entire (conjunctive) goal or precondition on the stack  When we pop a conjunctive precondition we push it back on stack, and above it we push the literals in it in some random order  The new algorithm: ○Initialization: Goal is pushed to the stack in conjunctive form. ○Current state ← Initial state.

Automated Planning and Decision Making29 Improved STRIPS Algorithm While ( stack is not empty ) { X ← pop ( stack ); Case: X is an action:{ Apply X to the current state and update the state; Record the action } X is a conjunction of literals not satisfied in the current state: { Push X back; Push elements of X in some random order; } X is a literal not satisfied in the current state: { Push an action that has X in its add list Push the preconditions of this action } Output the list of execution actions

Automated Planning and Decision Making30 Algorithm Properties Improved algorithm is:  Sound  Incomplete  May not terminate