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

Similar documents
Basic Derivative Properties

1 Online Learning and Regret Minimization

19 Optimal behavior: Game theory

Reinforcement Learning

f a L Most reasonable functions are continuous, as seen in the following theorem:

SUPPLEMENTARY NOTES ON THE CONNECTION FORMULAE FOR THE SEMICLASSICAL APPROXIMATION

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

C. C^mpenu, K. Slom, S. Yu upper boun of mn. So our result is tight only for incomplete DF's. For restricte vlues of m n n we present exmples of DF's

When e = 0 we obtain the case of a circle.

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Conservation Law. Chapter Goal. 6.2 Theory

1 nonlinear.mcd Find solution root to nonlinear algebraic equation f(x)=0. Instructor: Nam Sun Wang

In-Class Problems 2 and 3: Projectile Motion Solutions. In-Class Problem 2: Throwing a Stone Down a Hill

3.4 Conic sections. In polar coordinates (r, θ) conics are parameterized as. Next we consider the objects resulting from

Recursively Enumerable and Recursive. Languages

Convert the NFA into DFA

If we have a function f(x) which is well-defined for some a x b, its integral over those two values is defined as

School of Business. Blank Page

Matrix & Vector Basic Linear Algebra & Calculus

UNIFORM CONVERGENCE. Contents 1. Uniform Convergence 1 2. Properties of uniform convergence 3

APPENDIX. Precalculus Review D.1. Real Numbers and the Real Number Line

CS 188: Artificial Intelligence Spring 2007

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

Homework Problem Set 1 Solutions

Nondeterminism and Nodeterministic Automata

Uninformed Search Lecture 4

4.4 Areas, Integrals and Antiderivatives

DATA Search I 魏忠钰. 复旦大学大数据学院 School of Data Science, Fudan University. March 7 th, 2018

Chapter 0. What is the Lebesgue integral about?

Chapter 4 Contravariance, Covariance, and Spacetime Diagrams

Name Solutions to Test 3 November 8, 2017

Math 1B, lecture 4: Error bounds for numerical methods

Chapter 5 Plan-Space Planning

The First Fundamental Theorem of Calculus. If f(x) is continuous on [a, b] and F (x) is any antiderivative. f(x) dx = F (b) F (a).

LECTURE 3. Orthogonal Functions. n X. It should be noted, however, that the vectors f i need not be orthogonal nor need they have unit length for

CS5371 Theory of Computation. Lecture 20: Complexity V (Polynomial-Time Reducibility)

Exam 2, Mathematics 4701, Section ETY6 6:05 pm 7:40 pm, March 31, 2016, IH-1105 Instructor: Attila Máté 1

5.2 Exponent Properties Involving Quotients

x ) dx dx x sec x over the interval (, ).

Chapter 14. Matrix Representations of Linear Transformations

7.2 The Definite Integral

KNOWLEDGE-BASED AGENTS INFERENCE

Math 4310 Solutions to homework 1 Due 9/1/16

Formal languages, automata, and theory of computation

Improper Integrals, and Differential Equations

CSC2542 State-Space Planning

Bayesian Networks: Approximate Inference

Advanced Calculus: MATH 410 Notes on Integrals and Integrability Professor David Levermore 17 October 2004

Bernoulli Numbers Jeff Morton

Sturm-Liouville Theory

Minimal DFA. minimal DFA for L starting from any other

CM10196 Topic 4: Functions and Relations

Lecture 1: Introduction to integration theory and bounded variation

4.5 THE FUNDAMENTAL THEOREM OF CALCULUS

Classical Mechanics. From Molecular to Con/nuum Physics I WS 11/12 Emiliano Ippoli/ October, 2011

Chapter Five - Eigenvalues, Eigenfunctions, and All That

Review of basic calculus

Parse trees, ambiguity, and Chomsky normal form

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Before we can begin Ch. 3 on Radicals, we need to be familiar with perfect squares, cubes, etc. Try and do as many as you can without a calculator!!!

Necessary and sufficient conditions for some two variable orthogonal designs in order 44

VII. The Integral. 50. Area under a Graph. y = f(x)

A REVIEW OF CALCULUS CONCEPTS FOR JDEP 384H. Thomas Shores Department of Mathematics University of Nebraska Spring 2007

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

D. Harel, Statecharts: A visual formalism for complex systems, Science of Computer Programming 8, 1987, pp

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

Recitation 3: More Applications of the Derivative

Unit #9 : Definite Integral Properties; Fundamental Theorem of Calculus

x dx does exist, what does the answer look like? What does the answer to

Acceptance Sampling by Attributes

Harvard University Computer Science 121 Midterm October 23, 2012

The Regulated and Riemann Integrals

RELATIONAL MODEL.

Review of Calculus, cont d

Riemann Sums and Riemann Integrals

The area under the graph of f and above the x-axis between a and b is denoted by. f(x) dx. π O

Riemann is the Mann! (But Lebesgue may besgue to differ.)

Optimal estimation of a physical observable s expectation value for pure states

Finite Automata-cont d

THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS.

Riemann Sums and Riemann Integrals

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows:

Monte Carlo method in solving numerical integration and differential equation

Homework Solution - Set 5 Due: Friday 10/03/08

MTH 5102 Linear Algebra Practice Exam 1 - Solutions Feb. 9, 2016

We will see what is meant by standard form very shortly

Problem Set 2 Solutions

List all of the possible rational roots of each equation. Then find all solutions (both real and imaginary) of the equation. 1.

First Midterm Examination

EULER-LAGRANGE EQUATIONS. Contents. 2. Variational formulation 2 3. Constrained systems and d Alembert principle Legendre transform 6

Improper Integrals. Type I Improper Integrals How do we evaluate an integral such as

This lecture covers Chapter 8 of HMU: Properties of CFLs

Administrivia CSE 190: Reinforcement Learning: An Introduction

GNFA GNFA GNFA GNFA GNFA

W. We shall do so one by one, starting with I 1, and we shall do it greedily, trying

The Fundamental Theorem of Calculus Part 2, The Evaluation Part

Fundamental Theorem of Calculus

AP Calculus AB First Semester Final Review

Math& 152 Section Integration by Parts

Lecture 1. Functional series. Pointwise and uniform convergence.

Transcription:

Plnning gent: single gent or multi-gent Stte: complete or Incomplete (logicl/probbilistic) stte of the worl n/or gent s stte of knowlege ctions: worl-ltering n/or knowlege-ltering (e.g. sensing) eterministic or non-eterministic (logicl/stochstic) Gol onition: stisficing or optimizing finl-stte or temporlly extene/control knowlege/script optimizing: preferences or cost or utility or Resoning: offline or online (fully observble, prtilly observble) Plns: sequentil, prtil orer, conformnt, contingent, conitionl (controller) 2 Plnning gent: single gent or multi-gent Stte: complete or Incomplete (logicl/probbilistic) stte of the worl n/or gent s stte of knowlege ctions: worl-ltering n/or knowlege-ltering (e.g. sensing) eterministic or non-eterministic (logicl/stochstic) Gol onition: stisficing or optimizing finl-stte or temporlly extene/control knowlege/script optimizing: preferences or cost or utility or Resoning: offline or online (fully observble, prtilly observble) Plns: sequentil, prtil orer, conformnt, contingent, conitionl (controller) 3 Sitution lculus First we look t how to moel ynmic worls within firstorer logic. The sitution clculus is n importnt formlism evelope for this purpose. Sitution lculus uiling locks Situtions Fluents ctions Sitution lculus is (mostly) first-orer lnguge. Inclue in the omin of iniviuls specil set of objects clle situtions. Of these S 0 is specil istinguishe constnt which enotes the initil sitution. 24 25 1

Specifying the effects of ctions Specifying the effects of ctions ction preconitions: ertin things must hol for ctions to hve preictble effect. pickup(c) this ction is only pplicble to situtions S when cler(c,s) hnempty(s) is true. ction effects: ctions mke certin things true n certin things flse. holing(c, o(pickup(c), S)) X. hnempty(o(pickup(x),s)) ction effects re conitionl on their preconition being true. S,X. ontble(x,s) cler(x,s) hnempty(s) holing(x, o(pickup(x),s)) hnempty( o(pickup(x),s)) ontble(x, o(pickup(x,s)) cler(x, o(pickup(x,s)). Green inictes sitution term 32 33 Two types of resoning. The Frme Problem Two common types of queries : 1. Preicting the effects of given sequence of ction E.g., on(b,c, o(stck(b,c), o(pickup(b), s 0 )) ) Fining n effective wy of specifying the noneffects of ctions, without hving to explicitly write them ll own is the frme problem. 2. omputing sequence of ctions tht chieve gol conitions E.g., S. on(b,c,s) on(c,,s) Goo solutions hve been propose, n the sitution clculus hs been powerful wy of eling with ynmic worls: Logic-bse high-level robotic progrmming lnguges 39 43 2

omputtion Problems lthough the sitution clculus is very powerful representtion. It is not lwys efficient enough to use to compute sequences of ctions. The problem of computing sequence of ctions to chieve gol is plnning From Sitution lculus to STRIPS Next we will stuy some less expressive representtions tht support more efficient plnning. 44 45 STRIPS representtion. STRIPS (Stnfor Reserch Institute Problem Solver.) is wy of representing ctions. ctions re moele s wys of moifying the worl. since the worl is represente s W-K, STRIPS ction represents wy of upting the W-K. Now ctions yiel new K s, escribing the new worl the worl s it is once the ction hs been execute. Sequences of Worls In the sitution clculus where in one logicl sentence we coul refer to two ifferent situtions t the sme time. on(,b,s 0 ) on(,b,s 1 ) In STRIPS, we woul hve two seprte W-K s. One representing the initil stte, n nother one representing the next stte (much like serch where ech stte ws represente in seprte t structure). 56 57 3

STRIPS ctions: pickup(x): Pre: {hnempty, cler(x), ontble(x) s: {holing(x) Dels: {hnempty, cler(x), ontble(x) pickup(x) is clle STRIPS opertor. prticulr instnce e.g. pickup() is clle n ction. Opertion of STRIPS ction. For prticulr STRIPS ction (groun instnce) to be pplicble to stte ( W-K) every fct in its preconition list must be true in K. This mounts to testing membership since we hve only tomic fcts in the preconition list. If the ction is pplicble, the new stte is generte by removing ll fcts in Dels from K, then ing ll fcts in s to K. 59 60 Opertion of Strips ction: pre = {hnmpty, cler(b), ontble(b) pickup(b) = {holing(b) el = {hnmpty, cler(b), ontble(b) STRIPS locks Worl Opertors. pickup(x) Pre: {cler(x), ontble(x), hnempty : {holing(x) Del: {cler(x), ontble(x), hnempty putown(x) Pre: {holing(x) : {cler(x), ontble(x), hnempty Del: {holing(x) K = {hnempty cler(c), cler(b), on(c,), ontble(), ontble(b) K = { holing(b), cler(c), on(c,), ontble() 61 62 4

STRIPS locks Worl Opertors. unstck(x,y) Pre: {cler(x), on(x,y), hnempty : {holing(x), cler(y) Del: {cler(x), on(x,y), hnempty stck(x,y) Pre: {holing(x),cler(y) : {on(x,y), hnempty, cler(x) Del: {holing(x),cler(y) Plnning s Serch Problem Given W-K representing the initil stte, set of STRIPS or DL (ction Description Lnguge) opertors, n gol conition we wnt to chieve (specifie either s conjunction of fcts, or s formul) The plnning problem is to etermine sequence of ctions tht when pplie to the initil W-K yiel n upte W-K which stisfies the gol. This is known s the clssicl plnning tsk. 63 71 Plnning s Serch This cn be trete s serch problem. The initil W-K is the initil stte. The ctions re opertors mpping stte ( W-K) to new stte (n upte W-K). The gol is stisfie by ny stte (W-K) tht stisfies the gol.. move(b,c) move(c,b) move(c,tble) move(,b) 72 73 5

Problems Serch tree is generlly quite lrge rnomly reconfiguring 9 blocks tkes thousns of PU secons. The representtion suggests some structure. Ech ction only ffects smll set of fcts, ctions epen on ech other vi their preconitions. Plnning lgorithms re esigne to tke vntge of the specil nture of the representtion. Plnning We will look t one technique: Relxe Pln heuristics use with heuristic serch. The heuristics re omin inepenent. s such they re prt of clss of so-clle omin-inepenent heuristic serch for plnning 74 75 STRIPS locks Worl Opertors. pickup(x) Pre: {hnempty, ontble(x), cler(x) : {holing(x) Del: {hnempty, ontble(x), cler(x) putown(x) Pre: {holing(x) : {hnempty, ontble(x), cler(x) Del: {holing(x) unstck(x,y) Pre: {hnempty, cler(x), on(x,y) : {holing(x), cler(y) Del: {hnempty, cler(x), on(x,y) stck(x,y) Pre: {holing(x),cler(y) : {hnempty, cler(x), on(x,y) Del: {holing(x),cler(y) 79 Grphpln-style Relxe Pln Grph b c on(,b), ontble(c), ontble(), cler(), cler(), hnempty unstck(,b) pickup() S 0 0 b c on(,b), ontble(c), ontble(), cler(), hnempty, cler(), holing(), cler(b), holing() S 1 this is not stte s some of these fcts cnnot be true t the sme time! 80 6

Grphpln-style Relxe Pln Grph Grphpln-style Relxe Pln Grph b c unstck(,b) from pickup() 0 on(,b), ontble(c), ontble(), cler(), cler(), hnempty, holing(), cler(b), holing() S 1 putown(), putown(), stck(,b), stck(,), stck(,), stck(,b), stck(,), unstck(b,c) 1 Impossible, but we on t know becuse we ignore els. b c on(,b), ontble(c), ontble(), cler(), cler(), hnempty unstck(,b) pickup() S 0 0 b c on(,b), ontble(c), ontble(), cler(), hnempty, cler(), holing(), cler(b), holing() S 1 this is not stte! 81 82 on(,b), ontble(c), ontble(), cler(), cler(), hnempty, holing(), cler(b), holing() S 1 putown(), putown(), stck(,b), stck(,), stck(,b), stck(,), pickup(), unstck(b,c) 1 legen: [pre]ct[] G = {f 6,f 5,f 1 83 93 7

legen: [pre]ct[] G = {f 6,f 5, f 1 We split G into G P n G N : Gol: f 6,f 5,f 1 ctions: [f 1 ] 1 [f 4 ] [f 2 ] 2 [f 5 ] [f 2,f 4,f 5 ] 3 [f 6 legen: [pre]ct[] G = {f 6,f 5,f 1 G N = {f 6 (newly chieve) G p = {f 5, f 1 (chieve before) 94 95 legen: [pre]ct[] G = {f 6,f 5, f 1 ountcts(g,s 2 ) G P ={f 5, f 1 //lrey in S1 G N = {f 6 //New in S2 = { 3 //s ll in G N //the new gol: G P Pre() G 1 = {f 5,f 1,f 2,f 4 Return 1 + ountcts(g 1,S 1 ) Now, we re t level S1 G 1 = {f 5,f 1,f 2,f 4 ountcts(g 1,S 1 ) We split G into G P n G N : 96 97 8

Now, we re t level S1 G 1 = {f 5,f 1,f 2,f 4 ountcts(g 1,S 1 ) Now, we re t level S1 G 1 = {f 5,f 1,f 2,f 4 ountcts(g 1,S 1 ) G P ={f 1,f 2 //lrey in S0 G N = {f 4,f 5 //New in S1 = { 1, 2 //s ll in G N //the new gol: G P Pre() G 2 = {f 1,f 2 Return 2 + ountcts(g 2,S 0 ) We split G 1 into G P n G N : We split G 1 into G P n G N : G N = {f 5,f 4 G P = {f 1,f 2 98 99 Now, we re t level S1 ountcts(g 2,S 0 ) G N ={f 1,f 2 //lrey in S0 G P = { //New in S1 = { //No ctions neee. Return 0 Now, we re t level S1 ountcts(g 2,S 0 ) G N ={f 1,f 2 //lrey in S0 G P = { //New in S1 = { //No ctions neee. Return 0 G 2 = {f 1,f 2 We split G 2 into G P n G N : G N = {f 1,f 2 G P = { 100 G 2 = {f 1,f 2 We split G 2 into G P n G N : G N = {f 1,f 2 G P = { So, in totl ountcts(g,s2)=1+2+0=3 101 9

Using the Heuristic First, buil lyere structure from stte S tht reches gol stte. ountctions: counts how mny ctions re require in relxe pln. Use this s our heuristic estimte of the istnce of S to the gol. This heuristic tens to work better with greey best-first serch rther thn * serch Tht is when we ignore the cost of getting to the current stte. missibility minimum size pln in the elete relxe problem woul be lower boun on the optiml size of pln in the rel problem. n coul serve s n missible heuristic for *. However, ountctions oes NOT compute the length of the optiml relxe pln. The choice of which ction set to use to chieve G P ( just chieve prt of G ) is not necessrily optiml it is miniml, but not necessry minimum. Furthermore even if we picke true minimum set t ech stge of ountctions, we might not obtin minimum set of ctions for the entire pln---the set picke t ech stte influences wht set cn be use t the next stge! 102 103 missibility It is NP-Hr to compute the optiml length pln even in the relxe pln spce. So ountctions cnnot be me into n missible heuristic without mking it much hrer to compute. Empiriclly, refinements of ountctions performs very well on number of smple plnning omins. 104 10