CSC2542 Representations for Classical Planning

Similar documents
CSC2542 State-Space Planning

Chapter 4 State-Space Planning

Situation Calculus. Situation Calculus Building Blocks. Sheila McIlraith, CSC384, University of Toronto, Winter Situations Fluents Actions

Lecture 6: Coding theory

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

Now we must transform the original model so we can use the new parameters. = S max. Recruits

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

2.4 Theoretical Foundations

CS 573 Automata Theory and Formal Languages

Compression of Palindromes and Regularity.

Algebra 2 Semester 1 Practice Final

Unit 4. Combinational Circuits

Nondeterminism and Nodeterministic Automata

CS 491G Combinatorial Optimization Lecture Notes

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Automatic Synthesis of New Behaviors from a Library of Available Behaviors

Linear Inequalities. Work Sheet 1

Lecture 11 Binary Decision Diagrams (BDDs)

Lecture 2: Cayley Graphs

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of:

Coalgebra, Lecture 15: Equations for Deterministic Automata

Finite State Automata and Determinisation

Eigenvectors and Eigenvalues

Factorising FACTORISING.

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

Propositional models. Historical models of computation. Application: binary addition. Boolean functions. Implementation using switches.

System Validation (IN4387) November 2, 2012, 14:00-17:00

where the box contains a finite number of gates from the given collection. Examples of gates that are commonly used are the following: a b

1 Nondeterministic Finite Automata

Solutions to Problem Set #1

Implication Graphs and Logic Testing

Nondeterministic Automata vs Deterministic Automata

Logic, Set Theory and Computability [M. Coppenbarger]

Convert the NFA into DFA

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS

CIT 596 Theory of Computation 1. Graphs and Digraphs

Minimal DFA. minimal DFA for L starting from any other

The Regulated and Riemann Integrals

Analysis of Temporal Interactions with Link Streams and Stream Graphs

Logic Synthesis and Verification

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

Necessary and sucient conditions for some two. Abstract. Further we show that the necessary conditions for the existence of an OD(44 s 1 s 2 )

BİL 354 Veritabanı Sistemleri. Relational Algebra (İlişkisel Cebir)

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

Homework 3 Solutions

NON-DETERMINISTIC FSA

Lecture 2 : Propositions DRAFT

CS 360 Exam 2 Fall 2014 Name

18.06 Problem Set 4 Due Wednesday, Oct. 11, 2006 at 4:00 p.m. in 2-106

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

Hardware Verification 2IMF20

Bisimulation, Games & Hennessy Milner logic

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

Graph Theory. Simple Graph G = (V, E). V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)}

Linear Algebra Introduction

The Evaluation Theorem

Nondeterministic Finite Automata

Alpha Algorithm: Limitations

Review of Gaussian Quadrature method

Chapter 5 Plan-Space Planning

QUADRATIC EQUATION. Contents

Bases for Vector Spaces

Lecture 3: Equivalence Relations

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations.

Tutorial Worksheet. 1. Find all solutions to the linear system by following the given steps. x + 2y + 3z = 2 2x + 3y + z = 4.

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS

CS 330 Formal Methods and Models

p-adic Egyptian Fractions

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Lecture 8: Abstract Algebra

Improper Integrals, and Differential Equations

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Let s divide up the interval [ ab, ] into n subintervals with the same length, so we have

For a, b, c, d positive if a b and. ac bd. Reciprocal relations for a and b positive. If a > b then a ab > b. then

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point

Chapter 2 Finite Automata

Abstraction of Nondeterministic Automata Rong Su

for all x in [a,b], then the area of the region bounded by the graphs of f and g and the vertical lines x = a and x = b is b [ ( ) ( )] A= f x g x dx

Lecture 9: LTL and Büchi Automata

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

Part 4. Integration (with Proofs)

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

Vidyalankar S.E. Sem. III [CMPN] Discrete Structures Prelim Question Paper Solution

First Midterm Examination

CARLETON UNIVERSITY. 1.0 Problems and Most Solutions, Sect B, 2005

Finite-State Automata: Recap

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths

Behavior Composition in the Presence of Failure

MCH T 111 Handout Triangle Review Page 1 of 3

CSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4

Total score: /100 points

6.5 Improper integrals

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

Model Reduction of Finite State Machines by Contraction

Polynomials. Polynomials. Curriculum Ready ACMNA:

Chapter Five - Eigenvalues, Eigenfunctions, and All That

Transcription:

1 Aknowlegements CSC2542 Representtions for Clssil Plnning Sheil MIlrith Deprtment of Computer Siene University of Toronto Winter 2009 Some the slies use in this ourse re moifitions of Dn Nu s leture slies for the textook Automte Plnning, liense uner the Cretive Commons Attriution-NonCommeril-ShreAlike Liense: http://retiveommons.org/lienses/y-n-s/2.0/ Other slies re moifitions of slies evelope y Mlte Helmert, Bernhr Neel, n Jussi Rintnen. I hve lso use some mteril prepre y P@trik Hslum n Ro Kmhmpti. I woul like to grtefully knowlege the ontriutions of these reserhers, n thnk them for generously permitting me to use spets of their presenttion mteril. 2 Quik Review of Clssil Plnning 8 restritive ssumptions req : A0: Finite A1: Fully oservle A2: Deterministi A3: Stti A4: Attinment gols A5: Sequentil plns A6: Impliit time A7: Offline plnning lotion 1 lotion 2 move2 lotion 1 lotion 2 unlo move1 lo s 1 s 3 s 4 put tke put tke move2 move1 lotion 1 lotion 2 move2 move1 lotion 1 lotion 2 lotion 1 lotion 2 lotion 1 lotion 2 s 0 s 2 s 5 4 Representtion: Motivtion for Approh Defult view: represent stte expliitly represent tions s trnsition system (e.g., s n iniene mtrix) Prolem: expliit grph orresponing to trnsition system is huge iret mnipultion of trnsition system is umersome Solution: Provie ompt representtion of trnsition system & inue grph 1. Explite the struture of the sttes e.g., sttes speifie in terms of stte vriles 2. Represent tions not s trnsition system/iniene mtries ut s funtions (e.g., opertors) speifie in terms of the stte vriles An tion is pplile to stte when some stte vriles hve ertin vlues. When pplile, it will hnge the vlues of ertin (other) stte vriles 3. To pln, Just give the initil stte 6 Use the opertors to generte the other sttes s neee Why is this more ompt? Why is this more ompt thn n expliit trnsition system? In n expliit trnsition system, tions re represente s stte-tostte trnsitions. Eh tion will e represente y n iniene mtrix of size S x S In the propose moel, tions re represente only in terms of stte vriles whose vlues they re out, n whose vlue they ffet. (It exploits the struture of the prolem!) Consier stte spe of 1024 sttes. It n e represente y log 2 1024=10 stte vriles. If n tion nees vrile v1 to e true n mkes v7 to e flse, it n e represente y just 2 its (inste of 1024x1024 mtrix) Of ourse, if the tion hs omplite mpping from sttes to sttes, in the worst se the tion rep will e just s lrge The ssumption eing me here is tht the tions will hve effets on smll numer of stte vriles. 8 Outline Representtion shemes 1. Clssil representtion 2. Set-theoreti representtion 3. Stte-vrile representtion Exmples: DWR n the Bloks Worl Comprisons 9

10 1. Clssil Representtion Strt with funtion-free first-orer lnguge Finitely mny preite symols n onstnt symols, ut no funtion symols Exmple: the DWR omin Lotions: l1, l2, Continers: 1, 2, Piles: p1, p2, Root rts: r1, r2, Crnes: k1, k2, Clssil Representtion Atom: preite symol n rgs Use these to represent oth fixe n ynmi ( fluent ) reltions jent(l,l ) tthe(p,l) elong(k,l) oupie(l) t(r,l) loe(r,) unloe(r) holing(k,) empty(k) in(,p) on(, ) top(,p) top(pllet,p) Groun expression: ontins no vrile symols - e.g., in(1,p3) Ungroun expression: t lest one vrile symol - e.g., in(1,x) Sustitution: θ = {x 1 v 1, x 2 v 2,, x n v n } Eh x i is vrile symol; eh v i is term Instne of e: result of pplying sustitution θ to e Reple vriles of e simultneously, not sequentilly 11 Sttes Stte: set s of groun toms The toms represent the things tht re true in one of Σ s sttes Only finitely mny groun toms, so only finitely mny possile sttes Opertors Opertor: triple o=(nme(o), preon(o), effets(o)) nme(o) is syntti expression of the form n(x 1,,x k ) n: opertor symol - must e unique for eh opertor x 1,,x k : vrile symols (prmeters) must inlue every vrile symol in o preon(o): preonitions literls tht must e true in orer to use the opertor effets(o): effets literls the opertor will mke true 12 13 Ations Ation: groun instne (vi sustitution) of n opertor Nottion Let e n opertor or tion. Then E.g., preon + () = {toms tht pper positively in s preonitions} preon () = {toms tht pper negtively in s preonitions} effets + () = {toms tht pper positively in s effets} effets () = {toms tht pper negtively in s effets} effets + (tke(k,l,,,p) = {holing(k,), top(,p)} effets (tke(k,l,,,p) = {empty(k), in(,p), top(,p), on(,)} 14 15

16 Appliility An tion is pplile to stte s if s stisfies preon(), i.e., if preon + () s n preon () s = Here re n tion n stte tht it s pplile to: Result of Performing n Ation If is pplile to s, the result of performing it is γ(s,) = (s effets ()) effets + () Delete negtive effets, n positive ones 17 Opertors for the DWR Domin Plnning omin: lnguge & opertors Opertors orrespons to set of stte-trnsition systems Plnning Prolems Given plnning omin (lnguge L, opertors O) Sttement of plnning prolem: triple P=(O,s 0,g) O is the olletion of opertors s 0 is stte (the initil stte) g is set of literls (the gol formul) The tul plnning prolem: P = (Σ,s 0, g) s 0 n g re s ove Σ = (S,A,γ) is stte-trnsition system S = {ll sets of groun toms in L} A = {ll groun instnes of opertors in O} γ = stte-trnsition funtion etermine y the opertors 18 19 Plns n Solutions Pln: ny sequene of tions σ = 1, 2,, n suh tht eh i is groun instne of n opertor in O The pln is solution for P=(O,s 0,g) if it is exeutle n hieves g i.e., if there re sttes s 0, s 1,, s n suh tht γ (s 0, 1 ) = s 1 γ (s 1, 2 ) = s 2 γ (s n 1, n ) = s n s n stisfies g Exmple Let P 1 = (O, s 1, g 1 ), where O is the set of opertors given erlier g 1 ={loe(r1,3), t(r1,lo2)} 20 21

22 Exmple (ont.) Exmple (ont.) Here re three solutions for P 1 : tke(rne1,lo1,3,1,p1), move(r1,lo2,lo1), move(r1,lo1,lo2), move(r1,lo2,lo1), lo(rne1,lo1,3,r1), move(r1,lo1,lo2) tke(rne1,lo1,3,1,p1), move(r1,lo2,lo1), lo(rne1,lo1,3,r1), move(r1,lo1,lo2) move(r1,lo2,lo1), tke(rne1,lo1,3,1,p1), lo(rne1,lo1,3,r1), move(r1,lo1,lo2) Eh of them proues the stte shown here: First is reunnt: n remove tions n still hve solution tke(rne1,lo1,3,1,p1), move(r1,lo2,lo1), move(r1,lo1,lo2), move(r1,lo2,lo1), lo(rne1,lo1,3,r1), move(r1,lo1,lo2) tke(rne1,lo1,3,1,p1), move(r1,lo2,lo1), lo(rne1,lo1,3,r1), move(r1,lo1,lo2) move(r1,lo2,lo1), tke(rne1,lo1,3,1,p1), lo(rne1,lo1,3,r1), move(r1,lo1,lo2) The 2n n 3r re irreunnt n shortest 23 2. Set-Theoreti Representtion Inste of opertors like this one, Like lssil representtion, ut restrite to propositionl logi Sttes: Inste of olletion of groun toms {on(1,pllet), on(1,r1), on(1,2),, t(r1,l1), t(r1,l2), } use olletion of propositions (oolen vriles): {on-1-pllet, on-1-r1, on-1-2,, t-r1-l1, t-r1-l2, } tke ll of the opertor instnes, e.g., this one, n rewrite groun toms s propositions tke-rne1-lo1-3-1-p1 preon: elong-rne1-lo1, tthe-p1-lo1, empty-rne1, top-3-p1, on-3-1 elete: empty-rne1, in-3-p1, top-3-p1, on-3-p1 : holing-rne1-3, top-1-p1 24 25 Comprison A set-theoreti representtion is equivlent to lssil representtion in whih ll of the toms re groun Prolem: Exponentil lowup If lssil opertor ontins n toms n eh tom hs rity k, then it orrespons to nk tions where = {onstnt symols} 3. Stte-Vrile Representtion Non-fluents (properties tht on t hnge) re groun reltions: e.g., jent(lo1,lo2) Fluents re funtions: i.e., for properties tht n hnge, ssign vlues to stte vriles Clssil n stte-vrile rep ns tke similr mounts of spe eh n e trnslte into the other in low-orer polynomil time {top(p1)=3, pos(3)=1, pos(1)=pllet, holing(rne1)=nil, rlo(r1)=lo2, loe(r1)=nil, } 26 27

28 Exmple: The Bloks Worl Infinitely wie tle, finite numer of hilren s loks Ignore where lok is lote on the tle A lok n sit on the tle or on nother lok Wnt to move loks from one onfigurtion to nother e.g., initil stte e gol Clssil, set-theoreti, n stte-vrile formultions for the se of FIVE BLOCKS follow. 1. Exmple Clssil Representtion Constnt symols: The loks:,,,, e Preites: ontle(x) - lok x is on the tle on(x,y) - lok x is on lok y ler(x) - lok x hs nothing on it holing(x) - the root hn is holing lok x hnempty- the root hn isn t holing nything e 29 Clssil Opertors unstk(x,y) Preon: on(x,y), ler(x), hnempty Effets: ~on(x,y), ~ler(x), ~hnempty, holing(x), ler(y) stk(x,y) Preon: holing(x), ler(y) Effets: ~holing(x), ~ler(y), on(x,y), ler(x), hnempty pikup(x) Preon: ontle(x), ler(x), hnempty Effets: ~ontle(x), ~ler(x), ~hnempty, holing(x) putown(x) Preon: holing(x) Effets: ~holing(x), ontle(x), ler(x), hnempty 30 2. Exmple Set-Theoreti Representtion For five loks, 36 propositions, 50 tions E.g., ontle- - lok is on the tle on-- - lok is on lok ler- - lok hs nothing on it holing- - the root hn is holing lok hnempty - the root hn isn t holing nything (31 more) e 31 Set-Theoreti Ations E.g., unstk-- Pre: on-,, ler-, hnempty Del: on-,, ler-, hnempty A: holing-, ler- stk-- Pre: holing-, ler- Del: holing-, ler- A: on--, ler-, hnempty pikup- Pre: ontle-, ler-, hnempty Del: ontle-, ler-, hnempty A: holing- putown- Pre: holing- Del: holing- A: ontle-, ler-, hnempty 3. Exmple Stte-Vrile Representtion Constnt symols:,,,, e of type lok 0, 1, tle, nil of type other Stte vriles: pos(x) = y if lok x is on lok y e pos(x) = tle if lok x is on the tle pos(x) = nil if lok x is eing hel ler(x) = 1 if lok x hs nothing on it ler(x) = 0 if lok x is eing hel or hs lok on it holing = x if the root hn is holing lok x holing = nil if the root hn is holing nothing... (46 more) 32 33

34 Stte-Vrile Opertors unstk(x : lok, y : lok) Preon: pos(x)=y, ler(y)=0, ler(x)=1, holing=nil Effets: pos(x)=nil, ler(x)=0, holing=x, ler(y)=1 stk(x : lok, y : lok) Preon: holing=x, ler(x)=0, ler(y)=1 Effets: holing=nil, ler(y)=0, pos(x)=y, ler(x)=1 pikup(x : lok) Preon: pos(x)=tle, ler(x)=1, holing=nil Effets: pos(x)=nil, ler(x)=0, holing=x putown(x : lok) Preon: holing=x Effets: holing=nil, pos(x)=tle, ler(x)=1 Representtionl Equivlene Any prolem tht n e represente in one representtion n lso e represente in the other two Cn onvert in liner time n spe, exept when onverting to set-theoreti (where we get n exponentil lowup) Set-theoreti representtion trivil write ll of the groun instnes Clssil representtion P(x 1,,x n ) eomes f P (x 1,,x n )=1 Stte-vrile representtion f(x 1,,x n )=y eomes P f (x 1,,x n,y) 35 Comprison Clssil representtion Most populr for lssil plnning, sis of PDDL Set-theoreti representtion Cn tke muh more spe thn lssil representtion Useful in lgorithms tht mnipulte groun toms iretly e.g., plnning grphs, SAT Useful for ertin kins of theoretil stuies Stte-vrile representtion Equivlent to lssil representtion in expressive power Less nturl for logiins, more nturl for engineers Useful in non-lssil plnning prolems s wy to hnle numers, funtions, time Riher Speifition Lnguges: ADL The previous representtions were so-lle STRIPS representtions. ADL is riher, n thus more ompt, representtion lnguge tht llows for Disjuntion n Quntifition in preonitions n gols Effets tht re Quntifie, n/or Conitionl (effet is onitione on stte) PDDL supports STRIPS n ADL, ut not ll plnners support ADL, n not ll plnners even support so-lle Clssil Representtion 36 50 Compiling to Cnonil Ation Rep n PROS & CONS: It is possile to ompile own ADL tions into STRIPS tions Quntifition is written s onjuntions/isjuntions over finite universes Ations with onitionl effets re ompile into multiple (exponentilly more) tions without onitionl effets Ations with isjuntive effets re ompile into multiple tions, eh of whih tke one of the isjunts s their preonitions (Domin xioms n e ompile own into the iniviul effets of the tions; so ll tions stisfy STRIPS ssumption) Compiltion is not lwys win-win. By ompiling own to nonil form, we n onentrte on highly effiient plnning for nonil tions However, often ompiltion les to n exponentil lowup n mkes it hrer to exploit the struture of the omin By leving tions in non-nonil form, we n often o more ompt enoing of the omins s well s more effiient serh However, we will hve to ontinully exten plnning lgorithms to hnle these representtions 51