# Chapter 8: Planning Representing Actions State-space Representation Feature-based Representation STRIPS

• View
212

• Category

## Documents

Embed Size (px)

### Text of Chapter 8: Planning Representing Actions State-space Representation Feature-based Representation...

• Representing Actions Planning

Chapter 8:

Planning

c©D. Poole, A. Mackworth 2010, W. Menzel 2013 Artificial Intelligence, Lecture 8.1, Page 1

• Representing Actions Planning

Learning Objectives

At the end of the class you should be able to:

state the assumptions of deterministic planning

represent a problem using both STRIPs and the feature-based representation of actions.

specify the search tree for a forward planner

specify the search tree for a regression planner

represent a planning problem as a CSP

c©D. Poole, A. Mackworth 2010, W. Menzel 2013 Artificial Intelligence, Lecture 8.1, Page 2

• Representing Actions Planning

Planning

Planning is deciding what to do based on an agent’s ability, its goals, and the state of the world.

Initial assumptions: I The world is deterministic. I There are no exogenous events outside of the control of

the robot that change the state of the world. I The agent knows what state it is in. I Time progresses discretely from one state to the next. I Goals are predicates of states that need to be achieved

or maintained.

Aim find a sequence of actions to solve a goal.

c©D. Poole, A. Mackworth 2010, W. Menzel 2013 Artificial Intelligence, Lecture 8.1, Page 3

• Representing Actions Planning

Classical Planning

flat or modular or hierarchical

explicit states or features or individuals and relations

static or finite stage or indefinite stage or infinite stage

fully observable or partially observable

deterministic or stochastic dynamics

goals or complex preferences

single agent or multiple agents

knowledge is given or knowledge is learned

perfect rationality or bounded rationality

c©D. Poole, A. Mackworth 2010, W. Menzel 2013 Artificial Intelligence, Lecture 8.1, Page 4

• Representing Actions Planning

State-space Representation Feature-based Representation STRIPS Representation

Outline

Representing Actions State-space Representation Feature-based Representation STRIPS Representation

Planning Forward Planning Regression Planning Planning as a CSP

c©D. Poole, A. Mackworth 2010, W. Menzel 2013 Artificial Intelligence, Lecture 8.1, Page 5

• Representing Actions Planning

State-space Representation Feature-based Representation STRIPS Representation

Actions

A deterministic action is a partial function from states to states.

The preconditions of an action specify when the action can be carried out.

The effect of an action specifies the resulting state.

c©D. Poole, A. Mackworth 2010, W. Menzel 2013 Artificial Intelligence, Lecture 8.1, Page 6

• Representing Actions Planning

State-space Representation Feature-based Representation STRIPS Representation

Delivery Robot Example

Coffee Shop

Mail Room Lab

Sam's Office

Features: RLoc – Rob’s location RHC – Rob has coffee SWC – Sam wants coffee MW – Mail is waiting RHM – Rob has mail

Actions: mc – move clockwise mcc – move counterclockwise puc – pickup coffee dc – deliver coffee pum – pickup mail dm – deliver mail

c©D. Poole, A. Mackworth 2010, W. Menzel 2013 Artificial Intelligence, Lecture 8.1, Page 7

• Representing Actions Planning

State-space Representation Feature-based Representation STRIPS Representation

Explicit State-space Representation

State Action Resulting State〈 lab, rhc , swc ,mw , rhm

〉 mc

〈 mr , rhc , swc ,mw , rhm

〉〈 lab, rhc , swc ,mw , rhm

〉 mcc

〈 off , rhc , swc ,mw , rhm

〉〈 off , rhc , swc ,mw , rhm

〉 dm

〈 off , rhc , swc ,mw , rhm

〉〈 off , rhc , swc ,mw , rhm

〉 mcc

〈 cs, rhc , swc ,mw , rhm

〉〈 off , rhc , swc ,mw , rhm

〉 mc

〈 lab, rhc , swc ,mw , rhm

〉 . . . . . . . . .

c©D. Poole, A. Mackworth 2010, W. Menzel 2013 Artificial Intelligence, Lecture 8.1, Page 8

• Representing Actions Planning

State-space Representation Feature-based Representation STRIPS Representation

Feature-based representation of actions

For each action:

precondition is a proposition that specifies when the action can be carried out.

For each feature:

causal rules that specify when the feature gets a new value and

frame rules that specify when the feature keeps its value.

c©D. Poole, A. Mackworth 2010, W. Menzel 2013 Artificial Intelligence, Lecture 8.1, Page 9

• Representing Actions Planning

State-space Representation Feature-based Representation STRIPS Representation

Example feature-based representation

Precondition of pick-up coffee (puc):

RLoc=cs ∧ rhc Rules for location is cs:

RLoc ′=cs ← RLoc=off ∧ Act=mcc RLoc ′=cs ← RLoc=mr ∧ Act=mc RLoc ′=cs ← RLoc=cs ∧ Act 6= mcc ∧ Act 6= mc

Rules for “robot has coffee”

rhc ′ ← rhc ∧ Act 6= dc rhc ′ ← Act=puc

c©D. Poole, A. Mackworth 2010, W. Menzel 2013 Artificial Intelligence, Lecture 8.1, Page 10

• Representing Actions Planning

State-space Representation Feature-based Representation STRIPS Representation

STRIPS Representation

Divide the features into:

primitive features

derived features. There are rules specifying how derived can be derived from primitive features.

For each action:

precondition that specifies when the action can be carried out.

effect a set of assignments of values to primitive features that are made true by this action.

STRIPS assumption: every primitive feature not mentioned in the effects is unaffected by the action.

c©D. Poole, A. Mackworth 2010, W. Menzel 2013 Artificial Intelligence, Lecture 8.1, Page 11

• Representing Actions Planning

State-space Representation Feature-based Representation STRIPS Representation

Example STRIPS representation

Pick-up coffee (puc):

precondition: [cs, rhc]

effect: [rhc]

Deliver coffee (dc):

precondition: [off , rhc]

effect: [rhc , swc]

c©D. Poole, A. Mackworth 2010, W. Menzel 2013 Artificial Intelligence, Lecture 8.1, Page 12

• Representing Actions Planning

Forward Planning Regression Planning Planning as a CSP

Outline

Representing Actions State-space Representation Feature-based Representation STRIPS Representation

Planning Forward Planning Regression Planning Planning as a CSP

c©D. Poole, A. Mackworth 2010, W. Menzel 2013 Artificial Intelligence, Lecture 8.1, Page 13

• Representing Actions Planning

Forward Planning Regression Planning Planning as a CSP

Planning

Given:

A description of the effects and preconditions of the actions

A description of the initial state

A goal to achieve

find a sequence of actions that is possible and will result in a state satisfying the goal.

c©D. Poole, A. Mackworth 2010, W. Menzel 2013 Artificial Intelligence, Lecture 8.1, Page 14

• Representing Actions Planning

Forward Planning Regression Planning Planning as a CSP

Forward Planning

Idea: search in the state-space graph.

The nodes represent the states

The arcs correspond to the actions: The arcs from a state s represent all of the actions that are legal in state s.

A plan is a path from the state representing the initial state to a state that satisfies the goal.

c©D. Poole, A. Mackworth 2010, W. Menzel 2013 Artificial Intelligence, Lecture 8.1, Page 15

• Representing Actions Planning

Forward Planning Regression Planning Planning as a CSP

Example state-space graph

mac

Actions mc: move clockwise mac: move anticlockwise nm: no move puc: pick up coffee dc: deliver coffee pum: pick up mail dm: deliver mail

mc

mac

mac

mac

mac

mc

mc mc

puc

〈cs,rhc,swc,mw,rhm〉

〈cs,rhc,swc,mw,rhm〉 〈off,rhc,swc,mw,rhm〉 〈mr,rhc,swc,mw,rhm〉

〈off,rhc,swc,mw,rhm〉

〈mr,rhc,swc,mw,rhm〉

〈lab,rhc,swc,mw,rhm〉 〈cs,rhc,swc,mw,rhm〉

dc

〈off,rhc,swc,mw,rhm〉

〈lab,rhc,swc,mw,rhm〉

〈mr,rhc,swc,mw,rhm〉

Locations: cs: coffee shop off: office lab: laboratory mr: mail room

Feature values rhc: robot has coffee swc: Sam wants coffee mw: mail waiting rhm: robot has mail

c©D. Poole, A. Mackworth 2010, W. Menzel 2013 Artificial Intelligence, Lecture 8.1, Page 16

• Representing Actions Planning

Forward Planning Regression Planning Planning as a CSP

What are the errors?

puc

Actions mc: move clockwise mac: move anticlockwise nm: no move puc: pick up coffee dc: deliver coffee pum: pick up mail dm: deliver mail

mc

mc

mac

puc

puc

mc

mcmac

pum

〈mr,rhc,swc,mw,rhm〉

〈mr,rhc,swc,mw,rhm〉 〈cs,rhc,swc,mw,rhm〉 〈mr,rhc,swc,mw,rhm〉

〈lab,rhc,swc,mw,rhm〉

〈cs,rhc,swc,mw,rhm〉

〈off,rhc,swc,mw,rhm〉 〈cs,rhc,swc,mw,rhm〉

〈mr,rhc,swc,mw,rhm〉

〈off,rhc,swc,mw,rhm〉

Locations:

Recommended

Documents
Documents
Documents
Documents
Documents
Documents
Documents
Documents
Documents
Documents
Documents
Documents