Pl Plann annin ing: g: He Heur uris isti tics cs and and CS - - PowerPoint PPT Presentation

pl plann annin ing g he heur uris isti tics cs and and cs
SMART_READER_LITE
LIVE PREVIEW

Pl Plann annin ing: g: He Heur uris isti tics cs and and CS - - PowerPoint PPT Presentation

Pl Plann annin ing: g: He Heur uris isti tics cs and and CS CSP P Plan anni ning ng Co Computer ter Sc Science ce cpsc3 c322, 22, Lectur ture e 18 (Te Text xtbo book ok Chpt 8) 8) Febru ruary, ary, 12, 2010 CPSC


slide-1
SLIDE 1

CPSC 322, Lecture 18 Slide 1

Pl Plann annin ing: g: He Heur uris isti tics cs and and CS CSP P Plan anni ning ng

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

  • k Chpt 8)

8)

Febru ruary, ary, 12, 2010

slide-2
SLIDE 2

CPSC 322, Lecture 18 Slide 2

Lecture cture Ov Overview view

  • Rec

ecap ap: : Pl Plan anni ning ng 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: : Pl Plan anni ning ng 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 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 simplifi ifica catio ions ns in the representation:

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

An And a 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 simplif lific icati ation

  • ns

s of the action

  • ns

s 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

dele lete-lis list heuris istic tics s with forward rd plannin ing g is currently considered a very successful strategy

slide-10
SLIDE 10

Empty ty-delete delete in practice ctice

CPSC 322, Lecture 18 Slide 10

slide-11
SLIDE 11

CPSC 322, Lecture 18 Slide 11

Lecture cture Ov Overview view

  • Recap: Planning Representation and

Forward algorithm

  • Heuristics for forward planning
  • CSP

SP Pl Plan anni ning ng

slide-12
SLIDE 12

CPSC 322, Lecture 18 Slide 12

Planning anning as a CSP

  • 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-13
SLIDE 13

CPSC 322, Lecture 18 Slide 13

Planning anning as a CSP: : Variabl iables es

  • 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-14
SLIDE 14

CPSC 322, Lecture 18 Slide 14

CSP Planning: nning: Robot

  • t Exampl

mple

Variables for actions ….

action (non) occurring at that step

slide-15
SLIDE 15

CPSC 322, Lecture 18 Slide 15

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-16
SLIDE 16

CPSC 322, Lecture 18 Slide 16

CSP Planning: nning: Prec. . Constraint straints s

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-17
SLIDE 17

CPSC 322, Lecture 18 Slide 17

CSP Planning: nning: Eff ffect t 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-18
SLIDE 18

CPSC 322, Lecture 18 Slide 18

CSP 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-19
SLIDE 19

CPSC 322, Lecture 18 Slide 19

CSP 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-20
SLIDE 20

CPSC 322, Lecture 18 Slide 20

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-21
SLIDE 21

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

CPSC 322, Lecture 18 Slide 21

slide-22
SLIDE 22

CPSC 322, Lecture 18 Slide 22

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-23
SLIDE 23

STR TRIPS IPS to to CSP applet let

CPSC 322, Lecture 18 Slide 23

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 will be posted next week (maybe a couple )

slide-24
SLIDE 24

CPSC 322, Lecture 4 Slide 24

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-25
SLIDE 25

CPSC 322, Lecture 2 Slide 25

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

slide-26
SLIDE 26

CPSC 322, Lecture 18 Slide 26

Logics gics

  • Mostly

tly only proposit sition ional al…. 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-27
SLIDE 27

CPSC 322, Lecture 18 Slide 27

Coming ming up course se element ments

As Assign gn-1 returned…… Offic fice e hours s during g break: k: Giuseppe (Wed17 ….. )

  • Sunjeet

et; ; will be available on vista chat during his hours

  • Ha

Hammad ad: : not available, but will be monitoring b-board

  • Scott

tt : regular time

  • Ken:

: next week regular hour, following week WedFeb. 24 3-4pm. Pl Please e send email il if if you pla lan to attend nd a particul icular ar offi fice ce hour

Wed, March 3: As Assign-2 2 due

  • Tw

Two program ammin ing g exerci cise ses.

  • s. St

Start t asap asap. . Work in

  • pairs. If stuck, …..

Wed, March 10 Midterm rm exam (1 hour, , regula lar r room)