Pl Plann annin ing g Computer ter Sc Science ce cpsc3 c322 - - PowerPoint PPT Presentation

pl plann annin ing
SMART_READER_LITE
LIVE PREVIEW

Pl Plann annin ing g Computer ter Sc Science ce cpsc3 c322 - - PowerPoint PPT Presentation

Plan anni ning ng: : He Heur urist stics cs an and C d CSP Pl Plann annin ing g Computer ter Sc Science ce cpsc3 c322 22, , Lectur ture e 18 (Te Text xtbo book ok Chpt 8) 8) Oct, ct, 17, 2012 CPSC 322, Lecture 18


slide-1
SLIDE 1

CPSC 322, Lecture 18 Slide 1

Plan anni ning ng: : He Heur urist stics cs an and C d CSP Pl Plann annin ing g

Computer ter Sc Science ce cpsc3 c322 22, , Lectur ture e 18 (Te Text xtbo book

  • k Chpt

8) 8)

Oct, ct, 17, 2012

slide-2
SLIDE 2

CPSC 322, Lecture 18 Slide 2

Lecture cture Ov Overview view

  • Rec

ecap ap: : Pla lann nnin ing g Rep epres esen entation tation an and d For

  • rward

ard al algo gorit ithm hm

  • Heuristics
  • CSP Planning
slide-3
SLIDE 3

CPSC 322, Lecture 11 Slide 3

Sta tandard ndard Search rch vs. . Specific cific R&R system tems

Constraint Satisfaction (Problems):

  • State: assignments of values to a subset of the variables
  • Successor function: assign values to a “free” variable
  • Goal test: set of constraints
  • Solution: possible world that satisfies the constraints
  • Heuristic function: none (all solutions at the same distance from start)

Planning :

  • State
  • Successor function
  • Goal test
  • Solution
  • Heuristic function

Inference

  • State
  • Successor function
  • Goal test
  • Solution
  • Heuristic function
slide-4
SLIDE 4

CPSC 322, Lecture 2 Slide 4

Modules dules we'l 'll l cover er in th this course: se: R&Rsys sys

En Enviro ronm nmen ent Problem

Query Planning Deterministic Stochastic Search Arc Consistency Search Search Value Iteration

  • Var. Elimination

Constraint Satisfaction Logics STRIPS Belief Nets Vars + Constraints Decision Nets Markov Processes

  • Var. Elimination

Static Sequential Representation Reasoning Technique SLS

slide-5
SLIDE 5

CPSC 322, Lecture 18 Slide 5

Lecture cture Ov Overview view

  • Rec

ecap ap: : Pla lann nnin ing g Rep epres esen entation tation an and d For

  • rward

ard al algo gorit ithm hm

  • Heuristics for forward planning
  • CSP Planning
slide-6
SLIDE 6

CPSC 322, Lecture 18 Slide 6

Heuristics uristics fo for Fo Forward ard Pl Planning nning

Heuris istic tic funct ctio ion: n: estimate of the distance form a state to the goal In planning this is the………………. Tw Two simplific ificatio ations ns in the representation:

  • All features are binary: T / F
  • Goals and preconditions can only be assignments to T

An And a De

  • Def. a subgoal is a particular assignment in the

goal e.g., if the goal is <A=T, B=T, C=T> then….

slide-7
SLIDE 7

CPSC 322, Lecture 18 Slide 7

Heuristics uristics fo for Fo Forward ard Planning: nning: An Any y ideas? as?

slide-8
SLIDE 8

CPSC 322, Lecture 18 Slide 8

Heuristics for Forward Planning (cont’)

What kind of simplifi lifica catio tions ns of the actions

  • ns wo

would justify tify our propos

  • sal

al for h?

a) We have removed all ……………. b) We have removed all ……………. c) We assume no action can achieve…………………..

slide-9
SLIDE 9

CPSC 322, Lecture 18 Slide 9

Heuristics uristics fo for Fo Forward ard Planning: nning: empty pty-delet elete-list list

  • We only relax the problem according to (…….)

i.e., we remove all the effects that make a variable F Ac Action

  • n a effects

cts (B= B=F, C=T)

  • Bu

But then how do we compute te the heuristic? stic? …………………………………………. This is often fast enough to be worthwhile

  • empty-de

delete lete-lis list heurist istics ics with forwa ward rd planning ing is currently considered a very successful strategy

slide-10
SLIDE 10

Em Empty ty-delete delete in practice ctice

CPSC 322, Lecture 18 Slide 10

slide-11
SLIDE 11

Fi Final nal Comment ment

  • You should view Forward Planning as one of the basic

planning techniques (we’ll see another one after the break)

  • By itself, it cannot go far, but it can work very well in

combination with other techniques, for specific domains

  • See, for instance, descriptions of competing planners in the

presentation of results for the 2008 planning competition (posted in the class schedule)

slide-12
SLIDE 12

CPSC 322, Lecture 18 Slide 12

Lecture cture Ov Overview view

  • Recap: Planning Representation and

Forward algorithm

  • Heuristics for forward planning
  • CSP Pla

lann nnin ing

slide-13
SLIDE 13

CPSC 322, Lecture 18 Slide 13

Pl Planning anning as s a CSP SP

  • An alternative approach to planning is to set up a

planning problem as a CSP!

  • We simply reformulate a STRIPS model as a set
  • f variables and constraints
  • Once this is done we can even express

additional aspects of our problem (as additional constraints) e.g., see Practice Exercise UBC commuting “careAboutEnvironment” constraint

slide-14
SLIDE 14

CPSC 322, Lecture 18 Slide 14

Pl Planning anning as s a CSP SP: : Va Variables iables

  • We need to “unroll the plan” for a fixed number of

steps: this is called the horizon

  • To do this with a horizon of k:
  • construct a CSP variable for each STRIPS

variable at each time step from 0 to k

  • construct a boolean CSP variable for each

STRIPS action at each time step from 0 to k - 1.

slide-15
SLIDE 15

CPSC 322, Lecture 18 Slide 15

CSP SP Pl Planning: nning: Robot

  • t Ex

Example mple

Variables for actions ….

action (non) occurring at that step

slide-16
SLIDE 16

CPSC 322, Lecture 18 Slide 16

CSP SP Pl Planning: nning: In Initia tial l and Go Goal l Constrai straints nts

  • initial state constraints constrain the state

variables at time 0

  • goal constraints constrain the state variables at

time k

slide-17
SLIDE 17

CPSC 322, Lecture 18 Slide 17

CSP SP Pl Planning: nning: Pr Prec.

  • c. Constrai

straints nts

As usual, we have to express the precond nditions itions and effects ects of actions:

  • precondition constraints
  • hold between state variables at time t and action

variables at time t

  • specify when actions may be taken

PUC0

RLoc0 RHC0 PUC0 cs T F cs F T cs F F mr * F lab * F

  • ff

* F

slide-18
SLIDE 18

CPSC 322, Lecture 18 Slide 18

CSP SP Pl Planning: nning: Ef Effe fect ct Constraints straints

  • effect constraints
  • between state variables at time t, action variables at

time t and state variables at time t + 1

  • explain how a state variable at time t + 1 is affected by

the action(s) taken at time t and by its own value at time t

RHCi DelCi PUCi RHCi+1 T T T T T T F F T F T T … … … … … … … …

slide-19
SLIDE 19

CPSC 322, Lecture 18 Slide 19

CSP SP Pl Planning: nning: Constraints straints Contd. td.

Other constraints we may want are action constraints:

  • specify which actions cannot occur simultaneously
  • these are sometimes called mutual exclusion

(mutex) constraints

DelMi DelCi

E.g., in the Robot domain DelM and DelC can occur in any sequence (or simultaneously) But we could change that…

slide-20
SLIDE 20

CPSC 322, Lecture 18 Slide 20

CSP SP Pl Planning: nning: Constraints straints Contd. td.

Other constraints we may want are state constraints

  • hold between variables at the same time step
  • they can capture physical constraints of the system

(robot cannot hold coffee and mail)

  • they can encode maintenance goals

RHCi RHMi

slide-21
SLIDE 21

CS CSP Pl P Plan anni ning: ng: So Solving ing the he pr prob

  • blem

em

21

Map STRIPS Representation for horizon 1, 2, 3, …, until solution found Run arc consistency and search or stochastic local search! k = 0 Is State0 a goal? If yes, DONE! If no,

slide-22
SLIDE 22

CS CSP Pl P Plan anni ning: ng: So Solving ing the he pr prob

  • blem

em

22

Map STRIPS Representation for horizon k =1 Run arc consistency and search or stochastic local search! k = 1 Is State1 a goal If yes, DONE! If no,

slide-23
SLIDE 23

CS CSP Pl P Plan anni ning: ng: So Solving ing the he pr prob

  • blem

em

23

Map STRIPS Representation for horizon k = 2 Run arc consistency, search, stochastic local search! k = 2: Is State2 a goal If yes, DONE! If no….continue

slide-24
SLIDE 24

CPSC 322, Lecture 18 Slide 24

CSP Planning: nning: Solving ving th the problem blem

Map STRIPS Representation for horizon: Run arc consis istenc ncy, search ch, stoch chas astic ic local l searc rch! In order to find a plan, we expand our constraint network one layer at the time, until a solution is found Pl Plan: : all actions with assignment T

slide-25
SLIDE 25

Solve lve planning nning as s CSP: : pse seudo udo co code

CPSC 322, Lecture 18 Slide 25

slide-26
SLIDE 26

CPSC 322, Lecture 18 Slide 26

Sta tate te of th f the art t planner nner

A similar process is implemented (more efficiently) in the Graphpl plan an planner

slide-27
SLIDE 27

STR TRIPS IPS to to CSP applet let

CPSC 322, Lecture 6 Slide 27

Allows you:

  • to specify a planning problem in STRIPS
  • to map it into a CSP for a given horizon
  • the CSP translation is automatically loaded

into the CSP applet where it can be solved Practice exercise using STRIPS to CSP is available on AIspace

slide-28
SLIDE 28

CPSC 322, Lecture 4 Slide 28

Learning Goals for today’s class

You

  • u can

an:

  • Construct and justify a he

heur uris istic tic fu func ncti tion

  • n for

forward planning.

  • Translate a planning problem represented in

STRIPS into a corresponding CSP problem (and vice versa)

  • Solve a planning problem with CPS by

expanding the horizon (new one)

slide-29
SLIDE 29

CPSC 322, Lecture 2 Slide 29

Wh What t is coming ing next t ?

En Enviro ronm nmen ent Problem

Inference Planning Deterministic Stochastic Search Arc Consistency Search Search Value Iteration

  • Var. Elimination

Constraint Satisfaction Logics STRIPS Belief Nets Vars + Constraints Decision Nets Markov Processes

  • Var. Elimination

Static Sequential Representation Reasoning Technique SLS Textboo tbook k Ch Chpt 5.1- 5.1.1 1 – 5.2

slide-30
SLIDE 30

CPSC 322, Lecture 18 Slide 30

Logics gics

  • Mostly

tly only proposi sitio tiona nal…. This is the starting point for more complex ones ….

  • Natura

ral to express knowledg dge about the world

  • What is true (boolean variables)
  • How it works (logical formulas)
  • Well understood formal properties
  • Boolean nature can be exploited for efficiency
  • ……
slide-31
SLIDE 31

CPSC 322, Lecture 18 Slide 31

Th Thxs fo for th the honest nest Fe Feedback: dback: Most t menti tioned

  • ned issues

ues

  • Confusion about what is the right answer to

questions (including card ones) – see inked slides for unambiguous answer. Typically one slides has the question the next one has the

  • answer. Please let me know if any is missing
  • Flash cards vs. iClickers (private)
  • Samples for midterm