1 / 11

The situation calculus

K. V. S. Prasad Notes for TIN171/DIT410 (Friday, 26 March 2010) Based on Nils Nilsson, “Artificial Intelligence: a new synthesis”, Morgan Kaufmann Publishers, 1998. The situation calculus. The situation calculus. Features can leave out irrelevant properties Important for goal condition

lshatley
Download Presentation

The situation calculus

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. K. V. S. Prasad Notes for TIN171/DIT410 (Friday, 26 March 2010) Based on Nils Nilsson, “Artificial Intelligence: a new synthesis”, Morgan Kaufmann Publishers, 1998 The situation calculus

  2. The situation calculus • Features can leave out irrelevant properties • Important for goal condition • To get some block on B (don't care which) • “Exists x. (xB)” • Any predicate formula g can be a goal condition • Does state s satisfy g? • But state s is itself described by formulas • So try to prove g from those formulas • The situation calculus represents knowledge about both states and actions by predicate formulas

  3. Blocks in the situation calculus • The state (BAC) could be written • On(B,A) and On(A,C) and On(C,T) and Clear(B) and ... • But explicitly including the state helps • E.g., (ML, last term) -> not (ML, this term) • “On(B,A,S0) and On(A,C,S0) and On(C,T,S0) and Clear(B,S0)” is a statement about S0 • All s. Clear(T,s) (The table is always clear) • All x, y, s. On(x,y,s) and not(y=T) -> not Clear(y,s) • We can prove “not Clear(A,S0)”

  4. Actions in the situation calculus • States are terms in SC • So are actions: • “move(B,A,T)” is the term representing the action • Of moving B from A to the table • move(x,y,s) is a family of move actions • Instantiate the variables to get specific actions • “Do” takes (action, state) -> state • So now what is the effect of an action? • Knowledge about is encoded in the pred. calculus

  5. Effects of actions • On(x,y,s) and Clear(x,s) and Clear(z,s) and not (x=z) -> On(x,z, do(move(x,y,z),s)) • In iconic notation, • (XY)(Z) –move(X,Y,Z)-->(Y)(XZ) • The above formula only tells you about (XZ) • Each effect axiom is like P -> Q, where P is the precondition for the action

  6. Action effects, contd. • On(x,y,s) and Clear(x,s) and Clear(z,s) and not (x=z) -> not On(x,y, do(move(x,y,z),s)) • This negative effect axiom describes a proposition that became false after the action

  7. Antecedent more than precondition • How does move cause Clear conditions? • On(x,y,s) and Clear(x,s) and Clear(z,s) and not (x=z) and not (y=z) -> Clear(y, do(move(x,y,z),s)) • On(x,y,s) and Clear(x,s) and Clear(z,s) and not (x=z) and not (T=z) -> not Clear(z, do(move(x,y,z),s)) • Here “not(y=z)” is not a precondition (the action can be done even if y=z) but the effect will not be given by the axiom above

  8. Plans in the situation calculus • To go from S0=(BAC) to (AC)(B) • Try to prove “Exists s. On(B,T,s)” starting from the axioms describing S0 and the move axioms • You will succeed in proving “On(B,T,do(move(B,A,T),S0))” • The plan is “move(B,A,T)” and can be extracted from the proof • Programs from proofs is an idea that also crops up in type theory

  9. Plans contd. • Let Ans(s) say that A is on B in state s • To get from S0=(BAC) to a state s where Ans(s) • Ans(do(move(A,C,B),do(move(B,A,T),S0))) • So the plan is move(B,A,T); move(A,C,B) • This used to be regarded as hopelessly hard even for small plans • But with fast SAT solvers these days ...

  10. Problems with SC • Frame axioms • Actions typically have limited effects • Have to explicitly say rest stays unchanged • Both positive and negative literals can stay unchanged • Qualification axioms • Block not too heavy, not glued down, etc. • Ramification axioms • When a plane moves, everything in it moves • Mechanisms have been proposed for each

More Related