ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.

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
Chapter 5 Plan-Space Planning.
Planning  We have done a sort of planning already  Consider the “search” applied to general problem solving  The sequence of moves with the “Jugs” was.
Planning II: Partial Order Planning
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
Causal-link Planning II José Luis Ambite. 2 CS 541 Causal Link Planning II Planning as Search State SpacePlan Space AlgorithmProgression, Regression POP.
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.
Plan Generation & Causal-Link Planning 1 José Luis Ambite.
Computing & Information Sciences Kansas State University Lecture 20 of 42 CIS 530 / 730 Artificial Intelligence Lecture 20 of 42 Introduction to Classical.
Best-First Search: Agendas
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Planning Search vs. planning STRIPS operators Partial-order planning.
Artificial Intelligence 2005/06
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
CS 460, Session 20 1 Planning Search vs. planning STRIPS operators Partial-order planning.
Artificial Intelligence Chapter 11: Planning
Planning Planning is a special case of reasoning We want to achieve some state of the world Typical example is robotics Many thanks to Robin Burke, University.
CS 561, Session Planning Search vs. planning STRIPS operators Partial-order planning.
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
Lesson 6. Refinement of the Operator Model This page describes formally how we refine Figure 2.5 into a more detailed model so that we can connect it.
1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington.
Planning Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
Classical Planning Chapter 10.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
For Wednesday Read chapter 12, sections 3-5 Program 2 progress due.
Course Overview  What is AI?  What are the Major Challenges?  What are the Main Techniques?  Where are we failing, and why?  Step back and look at.
1 Plan-Space Planning Dr. Héctor Muñoz-Avila Sources: Ch. 5 Appendix A Slides from Dana Nau’s lecture.
April 3, 2006AI: Chapter 11: Planning1 Artificial Intelligence Chapter 11: Planning Michael Scherger Department of Computer Science Kent State University.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 07 : Planning.
Planning, page 1 CSI 4106, Winter 2005 Planning Points Elements of a planning problem Planning as resolution Conditional plans Actions as preconditions.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
CPS 270: Artificial Intelligence Planning Instructor: Vincent Conitzer.
Computing & Information Sciences Kansas State University Lecture 21 of 42 CIS 530 / 730 Artificial Intelligence Lecture 21 of 42 Planning: Graph Planning.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]
For Friday No reading Homework: –Chapter 11, exercise 4.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 17 Wednesday, 01 October.
Planning (Chapter 10)
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Automated Planning and Decision Making Prof. Ronen Brafman Automated Planning and Decision Making Partial Order Planning Based on slides by: Carmel.
Introduction to Planning Dr. Shazzad Hosain Department of EECS North South Universtiy
Partial Order Planning 1 Brian C. Williams J/6.834J Sept 16 th, 2002 Slides with help from: Dan Weld Stuart Russell & Peter Norvig.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Problem Reduction So far we have considered search strategies for OR graph. In OR graph, several arcs indicate a variety of ways in which the original.
Intro to Planning Or, how to represent the planning problem in logic.
Computing & Information Sciences Kansas State University Friday, 20 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 24 of 42 Friday, 20 October.
Planning I: Total Order Planners Sections
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Consider the task get milk, bananas, and a cordless drill.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Causal-link planning 1 Jim Blythe. 2 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning The planning problem Inputs: 1. A description of the world.
CSE573 Autumn /11/98 Planning Administrative –PS3 due 2/23 –Midterm Friday Last time –regression planning algorithm –introduction to plan-space.
Planning (Chapter 10) Slides by Svetlana Lazebnik, 9/2016 with modifications by Mark Hasegawa-Johnson, 9/2017
Planning (Chapter 10)
Planning Search vs. planning STRIPS operators Partial-order planning
Planning (Chapter 10)
Consider the task get milk, bananas, and a cordless drill
Planning Search vs. planning STRIPS operators Partial-order planning
Class #17 – Thursday, October 27
Planning Search vs. planning STRIPS operators Partial-order planning
Planning José Luis Ambite.
Graphplan/ SATPlan Chapter
Class #19 – Monday, November 3
Graphplan/ SATPlan Chapter
Graphplan/ SATPlan Chapter
Presentation transcript:

ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information Technology Institute of Applied Computer Systems Department of Systems Theory and Design PLANNING AGENTS

Simple Planning Agents (1) PLANNING AGENT generates goals to achieve, constructs plan that achieves its goal, executes this plan until it is finished, and then begins again with a new goal

Simple Planning Agents (2) What is the difference between problem-solving agent and planning agent? –Differences are in representations of goals states actions –Differences are in the representation and construction of action sequences (search for solutions)

Simple Planning Agent’s Program > Percept TELL (KB, MAKE PERCEPT SENTENCE (percept)) CURRENT STATE DESCRIPTION (KB) > Goal generation ASK (KB, MAKE GOAL QUERY)  GOAL > Plan construction CALL PLANNING ALGORITHM (CURRENT STATE DESCRIPTION, GOAL, KB)  PLAN > Action First action from the PLAN TELL (KB, MAKE ACTION SENTENCE (action)) Return: action

Basic Elements of a Search- Based Problem-Solver (1) Representation of actions –Actions are described by programs that generate successor state descriptions Representation of states –States are simple data structures. –All state descriptions are complete. (A complete description of initial state is given. Actions are represented by a program that generates complete state descriptions)

Basic Elements of a Search- Based Problem-Solver (2) Representation of goals –Agent has information in the form of goal test and the heuristic function Representation of solutions (plans) –A solution is sequence of actions beginning from the initial state, and ending at a goal state

Basic Elements of Planning Agent Planning algorithms use descriptions in some formal language, usually first-order logic Representation of actions –Logical descriptions of preconditions and effects Representation of states –Set of sentences of first-order logic Representation of goals –Set of sentences of first-order logic Representation of plans –Direct connections between states and actions

Three Key Ideas Behind Planning 1.“Open up” the representation of states, goals and actions 2.The planner is free to add actions to the plan wherever they are needed (instead of growing sequence of actions starting at the initial state) 3.Most parts of the world are independent from the other parts Divide-and-conquer strategy is used, because it is easier to solve several small sub-problems rather than one big problem

Representations for Planning Representations for states and goals Representations for actions Situation Space Plan Space Representations for Plans Solutions

Representations for States and Goals (1) STRIPS language is used in most planners In STRIPS language states are represented by conjunctions of predicates (possibly negated) with constants as their terms Example: At(Shop)  Have(Money)   Have(Computer)

Representations for States and Goals (2) In STRIPS language goals or represented by conjunctions of predicates with constants and variables used as their terms Examples: At(home)  Have(Computer) At(x)  Sells(x, Computer) > Variables are assumed to be existentially quantified Representations of initial states and goals are used as inputs of planning systems

Representations for Actions (1) STRIPS operators consist from three components: –The action description Within the planner it is only the name of a possible action Agent returns it to the environment in order to do something

Representations for Actions (2) –The precondition It is a conjunction of predicates (not negated) that must be true before the operator can be applied –The effect of an operator It is a conjunction of predicates (possibly negated) that describes how the situation changes when the operator is applied

STRIPS Operator (1) Syntax: Operator (ACTION: action’s name, PRECONDITION: p(x)  q(y) ... EFFECT: r(y)  w(x) ...) where p and q denotes any predicates; p and w may be changed to  r and/or  w in EFFECT > An operator with variables is called operator schema > All variables are assumed universally quantified

STRIPS Operator (2) Graphical notation (example): PRECONDITION: At(home), Path(home, shop) ACTION:  Go(shop) EFFECT:At(shop),  At(home)

Situation Space for Planning (1) Situation space is represented by a graph –Nodes represent possible situations in the world –Arcs represent transitions between situations. Transitions occur if operators are applied one at a time A path through the situation space from the initial situation to the goal situation constitutes a plan

Situation Space for Planning (2) Situation space planner searches through the situation space –Progression planner searches forward from the initial situation to the goal situation –Regression planner searches backward from the goal situation to the initial situation

Plan Space for Search (1) Space of Plans –Search starts with partial plan (incomplete plan) –Partial plan is expanded until a complete plan that solves the problem –The final plan is the solution, and the path taken to reach it is irrelevant

Plan Space for Search (2) Operators on plans Operators are: adding a step, ordering steps, binding variables, etc. –Refinement operators add constraints to a partial plan If partial plans are representations for complete, fully constrained plans, then refinement operators eliminate some plans from this set Refinement operators never add new plans to this set –Modification operators are anything that is not a refinement operator

Types of Plans (1) Partially ordered plans Some steps are ordered (before or after) with respect to each other and other steps are unordered Totally ordered plans Plans consist of a simple list of steps

Types of Plans (2) Linearization of a plan P is a totally ordered plan derived from P by adding ordering constraints Fully instantiated plans Plans in which every variable is bound to a constant

Formal Definition of a Plan (1) A plan is a data structure consisting of four components: –A set of plan steps. Each step is one of the operators for the problem –A set of step ordering constraints. notation: S i  S j (step S i must occur sometimes before S j )

Formal Definition of a Plan (2) –A set of variable binding constraints Variable may be substituted by another variable or a constant –A set of causal links Notation: S i  S j (the purpose of S i for S j )

Representations of Plans (1) The initial plan –Describes the unsolved problem –Consists from two steps START and FINISH –Ordering constraint START  FINISH –The START step has no preconditions. –The START step’s effect is to add all the propositions that are true in the initial state

Representations of Plans (2) –The START step has null actions associated with it –The FINISH step has the goal state as its precondition –The FINISH step has no effects –The FINISH step has null actions associated with it The planner starts with the initial plan and manipulate it until a plan that is a solution is constructed

Solution (1) (a Complete, Consistent Plan) A complete plan –A plan in which every precondition of every step is achieved by some other step –A step achieves a condition if the condition is one of the effects of the step, and if no other step can possibly cancel out the condition

Solution (2) (a Complete, Consistent Plan) A consistent plan –A plan in which there are no contradiction in the ordering or binding constraints –A contradiction occurs when both S i  S j and S j  S i hold, or both v = A and v = B hold (v is variable, and A, B are constants). Both  and = are transitive

Solution (3) (a Complete, Consistent Plan) A solution is a plan that an agent can execute A solution guarantees achievement of the goal

A Partial-Ordered Planning Example (1) A partial-order regression planner searches through plan space The planner starts with an initial plan representing the start and finish steps Start Finish At(Home), Sells(Record shop, CD), Sells(Baker’s shop, Bread) Have(CD), Have(Bread), At(home)

A Partial-Ordered Planning Example (2) The planner adds one more step on each iteration To keep the search focused, the planner only considers adding steps that allow to achieve a precondition that has not yet been achieved (causal links keep track on it) If the search leads to an inconsistent plan, it backtracks and searches another branch

A Partial-Ordered Planning Example (3) Definition of the initial state –Operator (ACTION: Start, EFFECT: At(Home), Sells(Record shop, CD), Sells(Baker’s shop, Bread) Definition of the final state –Operator (ACTION: Finish, PRECONDITION: Have(CD), Have(Bread), At(Home))

A Partial-Ordered Planning Example (4) Definition of the actions –Operator (ACTION: Go(shop), PRECONDITION: At(Home), EFFECT: (At(shop)   At(Home)) –Operator (ACTION: Buy(x), PRECONDITION: At(shop)  Sells(shop, x), EFFECT: Have(x))

A Partial-Ordered Planning Example (5) The first step: a partial plan that achieves two preconditions of Finish state Start Finish Buy(CD)Buy(Bread) At(shop), Sells(shop, CD)At(shop), Sells(shop, Bread) Have(CD)Have(Bread)At(Home) Ordering constraint Causal links Ordering constraints Ordering constraint

A Partial-Ordered Planning Example (6) Remark: Just to simplify the graphical representation, in the following Figures ordering constraints are supposed to be depicted underneath of the causal links

A Partial-Ordered Planning Example (7) The second step: a partial plan that achieves two preconditions of Finish state Finish Buy(CD)Buy(Bread) At(Record shop), Sells(Record shop, CD) At(Baker’s shop), Sells(Baker’s shop, Bread) Have(CD)Have(Bread)At(Home) Start

A Partial-Ordered Planning Example (8) The third step: extension of the plan by choosing two Go actions Start Finish Buy(CD)Buy(Bread) At(Record shop), Sells(Record shop, CD) At(Baker’s shop), Sells(Baker’s shop, Bread) Have(CD)Have(Bread)At(Home) Go(Record shop) At(x) Go(Baker’s shop) At(x)

A Partial-Ordered Planning Example (9) The fourth step: a dead end Start Finish Buy(CD)Buy(Bread) At(Record shop), Sells(Record shop, CD) At(Baker’s shop), Sells(Baker’s shop, Bread) Have(CD)Have(Bread)At(Home) Go(Record shop) At(Home) Go(Baker’s shop) At(Home)

A Partial-Ordered Planning Example (10) Remark: The step Go(Record shop) adds the condition At(Record shop), but it also deletes the condition At(Home), that is, now agent can not go from home to the baker’s shop (whichever Go step comes first will delete the At(Home) precondition on the other step)

A Partial-Ordered Planning Example (11) The fifth step: back up to try a different choice at some earlier point in the planning process Start Finish Buy(CD)Buy(Bread) At(Record shop), Sells(Record shop, CD) At(Baker’s shop), Sells(Baker’s shop, Bread) Have(CD)Have(Bread)At(Home) Go(Record shop) At(Home) Go(Baker’s shop) At(Record Shop)

A Partial-Ordered Planning Example (12) Remark: Go(Baker’s shop) step threatens the At(Record shop) precondition of the Buy(CD) step. Constraining Go(Baker’s shop) step to come after Buy(CD) step will not allow the agent to go from the record shop to the baker’s shop without first buying the CD

A Partial-Ordered Planning Example (13) The sixth step: adding a Go(Home) step Start Finish Buy(CD)Buy(Bread) At(Record shop), Sells(Record shop, CD) At(Baker’s shop), Sells(Baker’s shop, Bread) Have(CD)Have(Bread)At(Home) Go(Record shop) At(Home) Go(Baker’s shop) At(Record Shop) Go(Home) At(Baker’s shop)

A Partial-Ordered Planning Example (14) Remark: Notice that Go(Home) step is ordered to be after Buy(Bread) step

A Partial-Ordered Planning Example (15) A complete solution plan (totally ordered) Start At(Home) Go(Record shop) Buy(CD) Go(Baker’s shop) Buy(Bread) Go(Home) Finish At(Record shop), Sells(Record shop, CD) At(Record shop) At(Baker’s shop, Sells(Baker’s shop, Bread) At(Baker’s shop) Have(CD), At(Home), Have(Bread)

A Partial-Ordered Planning (1) Backtrack for trying another choice when dead end is reached –Causal links in a partial plan are protected links Definition: A causal link is protected by ensuring that threats, that is, steps that might delete the protected condition, are ordered to come before or after the protected link

A Partial-Ordered Planning (2) Example PRECONDITION Step 1  PRECONDITION Step 2 Step 3 A causal link Step1  Step2 is threatened by Step 3 because one effect of Step 3 is to delete condition

A Partial-Ordered Planning (3) Threat resolving by addition of ordering constraints Step 3  precondition Step 1 precondition Step 2 > Demotion Step 1  precondition Step 2 precondition Step 3 > Promotion

A Partial-Order Planning Algorithm (1) POP algorithm –Starts with minimal partial plan (starts with goals that must be achieved) –Extends the plan by achieving a precondition of a needed step (find operators) (Some operator that achieves the precondition is chosen either from the existing steps of the plan or from the set of operators)

A Partial-Order Planning Algorithm (2) –Records the causal link for the newly achieved precondition –If the new step threatens an existing causal link or an existing step threatens the new causal link the threat resolving is applied –If at any point the algorithm fails to find a relevant operator or resolve a threat, it backtracks to a previous choice point –If all the preconditions of all the steps are achieved, it is a solution

A Partial-Order Planning Algorithm (3) POP is a regression planner. It is sound and complete