Classical AI Planning: STRIPS Planning

Similar documents
Partial-Order Planning Algorithms

Introduction to Planning

In which we see how an agent can take advantage of the structure of a problem to construct complex plans of action.

PDDL (Planning Domain Definition Language) Jan Hrnčíř A4M33PAH Tutorial

Lecture 13 of 41. More Propositional and Predicate Logic

Logic in general. Inference rules and theorem proving

Plan-Space Search. Searching for a Solution Plan in a Graph of Partial Plans

Outline. Planning. Search vs. Planning. Search vs. Planning Cont d. Search vs. planning. STRIPS operators Partial-order planning.

University of Ostrava. Reasoning in Description Logic with Semantic Tableau Binary Trees

Of Business Process Modeling with BPMN and Situation Calculus

Static Program Transformations for Efficient Software Model Checking

CS510 Software Engineering

History of Artificial Intelligence. Introduction to Intelligent Systems

Version Spaces.

Coverability for Parallel Programs

Ordered Landmarks in Planning

FUNDAMENTALS OF ARTIFICIAL INTELLIGENCE KNOWLEDGE REPRESENTATION AND NETWORKED SCHEMES

Predicate logic Proofs Artificial intelligence. Predicate logic. SET07106 Mathematics for Software Engineering

CHAPTER 7 GENERAL PROOF SYSTEMS

Logical Agents. Explorations in Artificial Intelligence. Knowledge-based Agents. Knowledge-base Agents. Outline. Knowledge bases

COMPUTER SCIENCE TRIPOS

Policy Analysis for Administrative Role Based Access Control without Separate Administration

How To Learn A Set Of Planning Rules For Multiple Tasks

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

Lecture 18 of 42. Lecture 18 of 42

NP-Completeness and Cook s Theorem

Agents: Rationality (2)

AN INTEGRATED LIFE CYCLE FOR WORKFLOW MANAGEMENT BASED ON LEARNING AND PLANNING

196 Chapter 7. Logical Agents

Some Alternative Formulations of the Event Calculus

Data Structures and Algorithms V Otávio Braga

Refining Incomplete Planning Domain Models Through Plan Traces

Boolean Expressions, Conditions, Loops, and Enumerations. Precedence Rules (from highest to lowest priority)

Chapter II. Controlling Cars on a Bridge

Informatique Fondamentale IMA S8

Measuring the Performance of an Agent

DEDUCTIVE & INDUCTIVE REASONING

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

A Propositional Dynamic Logic for CCS Programs

Chapter 2: Intelligent Agents

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile

Automated Theorem Proving - summary of lecture 1

3. Mathematical Induction

Artificial Intelligence

! " # The Logic of Descriptions. Logics for Data and Knowledge Representation. Terminology. Overview. Three Basic Features. Some History on DLs

Course: Programming II - Abstract Data Types. The ADT Stack. A stack. The ADT Stack and Recursion Slide Number 1

Automata-based Verification - I

each college c i C has a capacity q i - the maximum number of students it will admit

Course Outline Department of Computing Science Faculty of Science. COMP Applied Artificial Intelligence (3,1,0) Fall 2015

Foundational Proof Certificates

A Semantical Perspective on Verification of Knowledge

Algorithms and Data Structures

Decision Trees and Networks

High Integrity Software Conference, Albuquerque, New Mexico, October 1997.

AUTOMATED TEST GENERATION FOR SOFTWARE COMPONENTS

Model Checking: An Introduction

2. The Language of First-order Logic

First-order logic. Chapter 8. Chapter 8 1

Full and Complete Binary Trees

Software Engineering Techniques

Project Planning and Scheduling

The Basics of Graphical Models

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, School of Informatics University of Edinburgh als@inf.ed.ac.

Scheduling. Anne Banks Pidduck Adapted from John Musser

SEARCHING AND KNOWLEDGE REPRESENTATION. Angel Garrido

Handout #1: Mathematical Reasoning

DELAWARE MATHEMATICS CONTENT STANDARDS GRADES PAGE(S) WHERE TAUGHT (If submission is not a book, cite appropriate location(s))

Stacks. Linear data structures

Contents Intelligent Agents

Institut für Parallele und Verteilte Systeme. Abteilung Anwendersoftware. Universität Stuttgart Universitätsstraße 38 D Stuttgart

Decision Making under Uncertainty

Component Approach to Software Development for Distributed Multi-Database System

Data Structures Using C++ 2E. Chapter 5 Linked Lists

Factoring General Games

KS3 Computing Group 1 Programme of Study hours per week

Introduction. Real World Planning. Planning with Time. Time 15/11/2012. COMP219: Artificial Intelligence. COMP219: Artificial Intelligence

Extending the Role of Causality in Probabilistic Modeling

AN AI PLANNING APPROACH FOR GENERATING BIG DATA WORKFLOWS

Analysis of Micromouse Maze Solving Algorithms

Course Syllabus For Operations Management. Management Information Systems

POLYNOMIAL FUNCTIONS

Answers G53KRR

CGT 581 G Procedural Methods L systems

6.3 Conditional Probability and Independence

15-780: Graduate AI Lecture 3. FOL proofs. Geoff Gordon (this lecture) Tuomas Sandholm TAs Erik Zawadzki, Abe Othman

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Intelligent Agents. Based on An Introduction to MultiAgent Systems and slides by Michael Wooldridge

Verifying Specifications with Proof Scores in CafeOBJ

Automated Program Behavior Analysis

Organization of Programming Languages CS320/520N. Lecture 05. Razvan C. Bunescu School of Electrical Engineering and Computer Science

Questions? Assignment. Techniques for Gathering Requirements. Gathering and Analysing Requirements

Cosmological Arguments for the Existence of God S. Clarke

FROM SAFETY TO SECURITY SOFTWARE ASSESSMENTS AND GUARANTEES FLORENT KIRCHNER (LIST)

Scalable Automated Symbolic Analysis of Administrative Role-Based Access Control Policies by SMT solving

An Intuitive Graphical Query Interface for Protégé Knowledge Bases

2) Write in detail the issues in the design of code generator.

Optimizing Description Logic Subsumption

DISCRETE MATH: LECTURE 3

Basic Proof Techniques

Optimizations. Optimization Safety. Optimization Safety. Control Flow Graphs. Code transformations to improve program

Transcription:

Classical AI Planning: STRIPS Planning Jane Hsu Copyright (C) 2003 Jane Hsu 1 Remember: Problem-Solving Agent tion Note: This is offline problem-solving. Online problem-solving involves acting w/o complete knowledge of the problem and environment Copyright (C) 2003 Jane Hsu 2 STRIPS Planning 1

The Planning Problem To find an executable sequence of actions that achieves a given goal when performed starting in a given state. START Initial State Operator Instances PLAN Goal State FINISH Copyright (C) 2003 Jane Hsu 3 Roots of Planning problem solving state-space search EXAMPLE: Shakey the Robot (SRI) a robot that roamed the halls of SRI in the early 1970 s actions were based on STRIPS plans Copyright (C) 2003 Jane Hsu 4 STRIPS Planning 2

A Simple Planning Agent function SIMPLE-PLANNING-AGENT(percept) returns an action static: KB, a knowledge base (includes action descriptions) p, a plan (initially, NoPlan) t, a time counter (initially 0) local variables:g, a goal current, a current state description TELL(KB, MAKE-PERCEPT-SENTENCE(percept, t)) current STATE-DESCRIPTION(KB, t) if p = NoPlan then G ASK(KB, MAKE-GOAL-QUERY(t)) p IDEAL-PLANNER(current, G, KB) if p = NoPlan or p is empty then action NoOp else action FIRST(p) p REST(p) TELL(KB, MAKE-ACTION-SENTENCE(action, t)) t t+1 return action Copyright (C) 2003 Jane Hsu 5 Algorithm: A Simple Planning Agent 1. Generate a goal to achieve 2. Construct a plan to achieve goal from the current state 3. Execute plan until finished 4. Begin again with new goal Use percepts to build a model of the current world state IDEAL-PLANNER: Given a goal, algorithm generates a plan of actions STATE-DESCRIPTION: given percept, return initial state description in format required by planner MAKE-GOAL-QUERY: used to ask KB what the next goal should be Copyright (C) 2003 Jane Hsu 6 STRIPS Planning 3

Search vs. planning Copyright (C) 2003 Jane Hsu 7 Search vs. planning Copyright (C) 2003 Jane Hsu 8 STRIPS Planning 4

Basic Representation for Planning Most widely used approach: uses STRIPS language states: conjunctions of function-free ground literals (I.e., predicates applied to constant symbols, possibly negated); e.g., At(Home) Have(Milk) Have(Bananas) Have(Drill) goals: also conjunctions of literals; e.g., At(Home) Have(Milk) Have(Bananas) Have(Drill) but can also contain variables (implicitly universally quant.); e.g., At(x) Sells(x, Milk) Copyright (C) 2003 Jane Hsu 9 Planning in Situation Calculus Copyright (C) 2003 Jane Hsu 10 STRIPS Planning 5

Planner vs. Theorem Prover Planner: ask for sequence of actions that makes goal true if executed Theorem prover: ask whether query sentence is true given KB Copyright (C) 2003 Jane Hsu 11 The Frame Problem Assumption: actions have local effects We need frame axioms for each action and each fluent that does not change as a result of the action example: frame axioms for move: If a block is on another block and move is not relevant, it will stay the same. Positive: [ On( x, y, s) ( x u)] On( x, y, do( move( u, v, z), s)) Negative ( On ( x, y, s) [( x u) ( y z)]) On( x, y, do( move( u, v, z), s) Copyright (C) 2003 Jane Hsu 12 STRIPS Planning 6

Other Problems in Planning The qualification problem: qualifying the antecedents for all possible exception. Needs (but impossible!) to enumerate all exceptions ~heavy and ~glued and ~armbroken can-move ~bird and ~cast-in-concrete and ~dead flies Solutions: default logics, nonmonotonic logics The ramification problem: If a robot carries a package, the package will be where the robot is. But what about the frame axiom, when can we infer about the effects of the actions and when we cannot. Not everything true can be inferred On(C,F1) remains true but cannot be inferred Copyright (C) 2003 Jane Hsu 13 Assumptions in Classical Planning Percepts Perfect perception Complete knowledge agent is omniscient Actions Instantaneous actions Atomic time No concurrent actions allowed Deterministic actions (effects are completely specified) Environment Static environment Completely observable environment Agent is the sole cause of change in the world Copyright (C) 2003 Jane Hsu 14 STRIPS Planning 7

Assumptions Closed World Assumption If ground terms cannot be proved to be true, they can be assumed to be false. Domain Closure Assumption All objects in the domain are explicitly named. Unique Names Assumption If ground terms cannot be proved to be equal, they can be assumed to be unequal. Copyright (C) 2003 Jane Hsu 15 STRIPS Representation STRIPS is the simplest and the second oldest representation of operators in AI. When that the initial state is represented by a database of positive facts, STRIPS can be viewed as being simply a way of specifying an update to this database. Copyright (C) 2003 Jane Hsu 16 STRIPS Planning 8

Example: The Blocks World Domain: set of cubic blocks sitting on a table Actions: blocks can be stacked can pick up a block and move it to another position can only pick up one block at a time Goal: to build a specified stack of blocks A C B INITIAL STATE A C B GOAL STATE Copyright (C) 2003 Jane Hsu 17 Representing States & Goals STRIPS: describes states & operators in a restricted language States: a conjunction of facts (ground literals that do not contain variable symbols) Goals: a conjunction of positive literals Copyright (C) 2003 Jane Hsu 18 STRIPS Planning 9

Representing States & Goals Initial State: ontable(a) Λ ontable(b) Λ on(c, B) Λ clear(a) Λ clear(c) Λ handempty Goal: ontable(b) Λ on(c,b) Λ on(a,c) Λ clear(a) Λ handempty C A B INITIAL STATE GOAL STATE A C B Copyright (C) 2003 Jane Hsu 19 Graphical Representation: Initial State On(C, A) Clear(Fl) On(A, Fl) Clear(B) On(B, Fl) Clear(C) Start T Copyright (C) 2003 Jane Hsu 20 STRIPS Planning 10

Graphical Representation: Goal State Nil finish On(A, B) On(B, C) On(C, Fl) Clear(A) Clear(Fl) Copyright (C) 2003 Jane Hsu 21 Representing Actions 1. Action description Name: pickup(x) 2. Precondition Preconditions: ontable(x), clear(x), handempty 3. Effect Effect: holding(x), ~ontable(x), ~clear(x), ~handempty Copyright (C) 2003 Jane Hsu 22 STRIPS Planning 11

Actions in Blocks World pickup(x) picks up block x from table putdown(x) if holding block x, puts it down on table stack(x,y) if holding block x, puts it on top of block y unstack(x,y) picks up block x that is currently on block y An operator is APPLICABLE if all preconditions are satisfied. Copyright (C) 2003 Jane Hsu 23 Blocks World - Operator Move(x, y, z) Move block x that is above y to above z PC: On(x,y), Clear(x), Clear(z) D: Clear(z), On(x, y) A: On(x,z), Clear(y), Clear(Fl) Copyright (C) 2003 Jane Hsu 24 STRIPS Planning 12

Graphical Representation: Operator A Clear(y) On(x, z) Clear(Fl) Operator Move(x, y, z) PC On(x, y) Clear(x) Clear(z) Copyright (C) 2003 Jane Hsu 25 Progression Situation-Space Algorithm: 1. Start from initial state 2. Find all operators whose preconditions are true in the initial state 3. Compute effects of operators to generate successor states 4. Repeat steps 2-3, until a new state satisfies the goal conditions A C B INITIAL STATE A C B GOAL STATE Copyright (C) 2003 Jane Hsu 26 STRIPS Planning 13

Regression Situation-Space Algorithm: 1. Start with goal node corresponding to goal to be achieved 2. Choose an operator that will add one of the goals 3. Replace that goal with the operator s preconditions 4. Repeat steps 2-3 until you have reached the initial state B C A INITIAL STATE A C B Arm GOAL STATE Copyright (C) 2003 Jane Hsu 27 STRIPS: Goal-Stack Planning Given a goal stack: 1. Initialize: Push the goal to the stack. 2. If the top of the stack is satisfied in the current state, pop. 3. Otherwise, if the top is a conjunction, push the individual conjuncts to the stack. 4. Otherwise, check if the add-list of any operator can be unified with the top, push the operator and its preconditions to the stack. 5. If the top is an action, pop and execute it. 6. Loop 2-5 till stack is empty. Copyright (C) 2003 Jane Hsu 28 STRIPS Planning 14

STRIPS in Action Copyright (C) 2003 Jane Hsu 29 STRIPS in Action (Continued) Copyright (C) 2003 Jane Hsu 30 STRIPS Planning 15

Copyright (C) 2003 Jane Hsu 31 Copyright (C) 2003 Jane Hsu 32 STRIPS Planning 16

Copyright (C) 2003 Jane Hsu 33 Copyright (C) 2003 Jane Hsu 34 STRIPS Planning 17

Copyright (C) 2003 Jane Hsu 35 Copyright (C) 2003 Jane Hsu 36 STRIPS Planning 18