CSC2542 State-Space Planning

Similar documents
Chapter 4 State-Space Planning

CSC2542 Representations for Classical Planning

Lecture 6: Coding theory

Chapter 5 Plan-Space Planning

CS 491G Combinatorial Optimization Lecture Notes

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

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

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

Nondeterministic Finite Automata

Automatic Synthesis of New Behaviors from a Library of Available Behaviors

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

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

Solutions to Problem Set #1

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

2.4 Theoretical Foundations

I 3 2 = I I 4 = 2A

CS 573 Automata Theory and Formal Languages

CS 360 Exam 2 Fall 2014 Name

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

Automata and Regular Languages

Laboratory for Foundations of Computer Science. An Unfolding Approach. University of Edinburgh. Model Checking. Javier Esparza

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.

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

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

Finite State Automata and Determinisation

CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014

NON-DETERMINISTIC FSA

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

Chapter 2 Finite Automata

EE 108A Lecture 2 (c) W. J. Dally and P. Levis 2

Regular expressions, Finite Automata, transition graphs are all the same!!

Nondeterministic Automata vs Deterministic Automata

Unit 4. Combinational Circuits

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

Alpha Algorithm: Limitations

Search: Cost & Heuristics

Review of Gaussian Quadrature method

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

Engr354: Digital Logic Circuits

Lecture 3. XML Into RDBMS. XML and Databases. Memory Representations. Memory Representations. Traversals and Pre/Post-Encoding. Memory Representations

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

Graph Algorithms. Vertex set = { a,b,c,d } Edge set = { {a,c}, {b,c}, {c,d}, {b,d}} Figure 1: An example for a simple graph

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

XML and Databases. Outline. 1. Top-Down Evaluation of Simple Paths. 1. Top-Down Evaluation of Simple Paths. 1. Top-Down Evaluation of Simple Paths

Lecture 9: LTL and Büchi Automata

GNFA GNFA GNFA GNFA GNFA

Implication Graphs and Logic Testing

Algorithms & Data Structures Homework 8 HS 18 Exercise Class (Room & TA): Submitted by: Peer Feedback by: Points:

Chapter Five - Eigenvalues, Eigenfunctions, and All That

A Primer on Continuous-time Economic Dynamics

Exam Review. John Knight Electronics Department, Carleton University March 2, 2009 ELEC 2607 A MIDTERM

Welcome. Balanced search trees. Balanced Search Trees. Inge Li Gørtz

The DOACROSS statement

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 )

1 Nondeterministic Finite Automata

( x) ( ) takes at the right end of each interval to approximate its value on that

Behavior Composition in the Presence of Failure

Spacetime and the Quantum World Questions Fall 2010

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

6. Suppose lim = constant> 0. Which of the following does not hold?

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

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

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

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

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

Nondeterminism and Nodeterministic Automata

Towards Efficient Consistency Enforcement for Global Constraints in Weighted Constraint Satisfaction

Common intervals of genomes. Mathieu Raffinot CNRS LIAFA

Prefix-Free Regular-Expression Matching

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

Surds and Indices. Surds and Indices. Curriculum Ready ACMNA: 233,

INTRODUCTION TO AUTOMATA THEORY

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014

Equivalent fractions have the same value but they have different denominators. This means they have been divided into a different number of parts.

Homework 3 Solutions

CS 275 Automata and Formal Language Theory

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

Finite Automata-cont d

Regular languages refresher

AP Calculus BC Chapter 8: Integration Techniques, L Hopital s Rule and Improper Integrals

Unfoldings of Networks of Timed Automata

Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition

Section 2.3. Matrix Inverses

Lecture 2: Cayley Graphs

Subsequence Automata with Default Transitions

Compression of Palindromes and Regularity.

Algebra 2 Semester 1 Practice Final

A Disambiguation Algorithm for Finite Automata and Functional Transducers

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Lecture 2e Orthogonal Complement (pages )

Minimal DFA. minimal DFA for L starting from any other

Running an NFA & the subset algorithm (NFA->DFA) CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/

Algorithm Design and Analysis

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

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)}

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

5. Every rational number have either terminating or repeating (recurring) decimal representation.

Lesson 2.1 Inductive Reasoning

The Evaluation Theorem

Transcription:

CSC2542 Stte-Spe Plnning Sheil MIlrith Deprtment of Computer Siene University of Toronto Fll 2010 1 Aknowlegements 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

Motivtion Nerly ll plnning proeures re serh proeures Different plnning proeures hve ifferent serh spes Two exmples: Stte-spe plnning Pln-spe plnning Stte-spe plnning Eh noe represents stte of the worl A pln is pth through the spe Pln-spe plnning Eh noe is set of prtilly-instntite opertors, plus some onstrints Impose more n more onstrints, until we get pln 3 Outline Stte-spe plnning Forwr serh Bkwr serh Lifting STRIPS Blok-stking 4

Forwr Serh tke 3 tke 2 move r1 5 Properties Forwr-serh is soun for ny pln returne y ny of its noneterministi tres, this pln is gurntee to e solution Forwr-serh lso is omplete if solution exists then t lest one of Forwrserh s noneterministi tres will return solution. 6

Deterministi Implementtions Some eterministi implementtions of forwr serh: reth-first serh s 1 1 epth-first serh 4 est-first serh (e.g., A*) s 0 s 2 2 greey serh 5 s 4 s 5 s g Breth-first n est-first serh re soun n omplete But they usully ren t prtil, requiring too muh memory Memory requirement is exponentil in the length of the solution In prtie, more likely to use epth-first serh or greey serh Worst-se memory requirement is liner in the length of the solution In generl, soun ut not omplete But lssil plnning hs only finitely mny sttes Thus, n mke epth-first serh omplete y oing loop-heking 3 s 3 7 Brnhing Ftor of Forwr Serh 1 1 2 3 50 initil stte 2 3 gol Forwr serh n hve very lrge rnhing ftor Cn hve mny pplile tions tht on t progress towr gol Why this is : Deterministi implementtions n wste time trying lots of irrelevnt tions Nee goo heuristi funtion n/or pruning proeure (This will e fous of lter isussion) 8

Bkwr Serh For forwr serh, we strte t the initil stte n ompute stte trnsitions new stte = γ(s,) For kwr serh, we strt t the gol n ompute inverse stte trnsitions new set of sugols = γ 1 (g,) To efine γ -1 (g,), must first efine relevne: An tion is relevnt for gol g if mkes t lest one of g s literls true g effets() oes not mke ny of g s literls flse g + effets () = n g effets + () = 9 Inverse Stte Trnsitions If is relevnt for g, then γ 1 (g,) = (g effets()) preon() Otherwise γ 1 (g,) is unefine Exmple: suppose tht g = {on(1,2), on(2,3)} = stk(1,2) Wht is γ 1 (g,)? 10

g 1 1 g 4 4 s 0 g 5 5 g 2 2 g 0 3 g 3 11 Effiieny of Bkwr Serh 1 1 2 3 50 initil stte gol Bkwr serh n lso hve very lrge rnhing ftor E.g., n opertor o tht is relevnt for g my hve mny groun instnes 1, 2,, n suh tht eh i s input stte might e unrehle from the initil stte As efore, eterministi implementtions n wste lots of time trying ll of them 12

Lifting foo(x,y) preon: p(x,y) effets: q(x) p( 1, 1 ) p( 1, 2 ) foo( 1, 1 ) foo( 1, 2 ) p( 1, 3 ) foo( 1, 3 ) q( 1 ) p(1, 50 )... foo( 1, 50 ) Cn reue the rnhing ftor of kwr serh if we prtilly instntite the opertors this is lle lifting foo( 1,y) q( 1 ) p( 1,y) 13 Lifte Bkwr Serh Bsi Ie: Dely grouning of opertors until neessry in orer to in vriles with those require to relize gol or sugol More omplite thn Bkwr-serh Must keep trk of wht sustitutions were performe But it hs muh smller rnhing ftor 14

Lifte Bkwr Serh 15 The Serh Spe is Still Too Lrge Lifte-kwr-serh genertes smller serh spe thn Bkwr-serh, ut it still n e quite lrge Suppose tions,, n re inepenent, tion must preee ll of them, n there s no pth from s 0 to s input stte We ll try ll possile orerings of,, n efore relizing there is no solution Pln-spe plnning n help with this prolem s 0 gol 16

Pruning the Serh Spe Pruning the serh spe n relly help. Two tehniques we will isuss: Soun pruning using rnh-n-oun heuristi serh Domin ustomiztion tht prunes tions n sttes For now, just two exmples: STRIPS Blok stking 17 STRIPS One of the first plnning lgorithms (Shkey the root) π the empty pln o moifie kwr serh from g ** eh new sugol is preon() (inste of γ -1 (s,)) when you fin n tion tht s exeutle in the urrent stte, then go forwr on the urrent serh pth s fr s possile, exeuting tions n ppening them to π repet until ll gols re stisfie π = 6, 4 s= γ(γ(s 0, 6 ), 4 ) g 6 stisfie in s 0 6 g 4 g5 g 3 4 5 g 1 g 2 1 2 g 3 urrent serh pth g 3 3 18

Quik Review of Bloks Worl unstk(x,y) Pre: on(x,y), ler(x), hnempty Eff: ~on(x,y), ~ler(x), ~hnempty, holing(x), ler(y) stk(x,y) Pre: holing(x), ler(y) Eff: ~holing(x), ~ler(y), on(x,y), ler(x), hnempty pikup(x) Pre: ontle(x), ler(x), hnempty Eff: ~ontle(x), ~ler(x), ~hnempty, holing(x) putown(x) Pre: holing(x) Eff: ~holing(x), ontle(x), ler(x), hnempty 19 Limittions of STRIPS Exmple 1. The Sussmn Anomly Initil stte gol On this prolem, STRIPS nnot proue n irreunnt solution. Try it n see. Strt with the gol {on(,), on(,)}. 20

Exmple 2. Register Assignment Prolem Stte-vrile formultion: Initil stte: Gol: Opertor: {vlue(r1)=3, vlue(r2)=5, vlue(r3)=0} {vlue(r1)=5, vlue(r2)=3} ssign(r,v,r',v') preon: vlue(r)=v, vlue(r')=v' effets: vlue(r)=v' STRIPS nnot solve this prolem t ll 21 How to Hnle Prolems like These? Severl wys: Do something other thn stte-spe serh e.g., Chpters 5 8 Use forwr or kwr stte-spe serh, with omin-speifi knowlege to prune the serh spe Cn solve oth prolems quite esily this wy Exmple: lok stking using forwr serh 22

Domin-Speifi Knowlege A loks-worl plnning prolem P = (O,s 0,g) is solvle if s 0 n g stisfy some simple onsisteny onitions g shoul not mention ny loks not mentione in s 0 lok nnot e on two other loks t one et. Cn hek these in time O(n log n) If P is solvle, n esily onstrut solution of length O(2m), where m is the numer of loks Move ll loks to the tle, then uil up stks from the ottom Cn o this in time O(n) With itionl omin-speifi knowlege n o even etter 23 Aitionl Domin-Speifi Knowlege A lok x nees to e move if ny of the following is true: s ontins ontle(x) n g ontins on(x,y) - see elow s ontins on(x,y) n g ontins ontle(x) - see elow s ontins on(x,y) n g ontins on(x,z) for some y z - see elow s ontins on(x,y) n y nees to e move - see e elow e initil stte gol 24

Domin-Speifi Algorithm loop if there is ler lok x suh tht x nees to e move n x n e move to ple where it won t nee to e move then move x to tht ple else if there is ler lok x suh tht x nees to e move then move x to the tle else if the gol is stisfie then return the pln else return filure repet e initil stte gol 25 Esily Solves the Sussmn Anomly loop if there is ler lok x suh tht x nees to e move n x n e move to ple where it won t nee to e move then move x to tht ple else if there is ler lok x suh tht x nees to e move then move x to the tle else if the gol is stisfie then return the pln else return filure repet initil stte gol 26

Properties The lok-stking lgorithm: Soun, omplete, gurntee to terminte Runs in time O(n 3 ) Cn e moifie to run in time O(n) Often fins optiml (shortest) solutions But sometimes only ner-optiml 27