Modelcore
Situation calculus
Also called McCarthy-Hayes situation calculus.
A logical language for change in which situations are histories of actions and fluents are relations whose truth depends on the situation; reasoning about actions is entailment.
The situation calculus is a logical language for describing a world that changes through actions. A situation is a term that names a finite history of actions, starting from the initial situation , and a fluent is a relation whose truth depends on the situation. McCarthy and Hayes (1969) introduced it, and Reiter and his colleagues later fixed its form as a set of axioms with clear metatheory. Questions about actions, such as "is the door open after these three actions?", are questions of entailment from the axioms. The frame problem page explains why describing what does not change is hard and how the solutions compare; the successor state axioms page gives the form of the axioms that solve it here; and the regression page gives the main reasoning procedure. This page is the language and its foundations.
The machine
Syntax. The language is many-sorted, with sorts for actions, situations and ordinary objects. It has
- the constant , the initial situation, and the function , the situation that results from doing action in situation ;
- action functions, such as or ;
- relational fluents , whose last argument is a situation, such as ;
- the predicate , "action can be done in situation ";
- the order , " is reached from by one or more actions", with for .
A situation term such as names the history "open, then pick up ". McCarthy and Hayes (1969) thought of a situation as the complete state of the world at an instant. In the axiomatization of Reiter (2001), a situation is a history, so two different situations can agree on every fluent: and are different situations even if the door is closed in both.
Foundational axioms. The axioms (Reiter 2001, Chapter 4; Pirri and Reiter 1999) make the situations exactly the finite action sequences:
- ;
- ;
- ;
- .
The second axiom is an induction axiom in second-order logic. With the first, it makes the situations in every model a tree with root , in which each situation has one child for each action.
Basic action theory. A domain is described by a basic action theory
where
- has one precondition axiom for each action function ;
- has one successor state axiom for each fluent;
- has the unique names axioms for actions: different action functions give different actions, and each action function is one-to-one;
- is a set of first-order sentences about , the initial database.
The formulas and the right sides of the successor state axioms must be uniform in : they mention no situation term other than the variable , and no and no .
Semantics. A model of is a structure of second-order logic. The language has no special semantics of its own; all its meaning comes from the axioms.
Example. A robot has a door and objects. The fluents are and , and the actions are , , and . Two precondition axioms are and . The initial database is . With the obvious successor state axioms, entails , and it also entails that this history is executable, because the door is closed at and open after .
What it counts
Every question is an entailment question . The main ones are
- projection: does a formula hold after a given sequence of actions? ;
- executability: can the sequence be performed? , where says that every action in the history of was possible when it was done;
- planning: is there a history that reaches a goal? , where a witness for is a plan;
- queries about all futures: for example, , which needs induction over situations.
Relation to other models
- STRIPS and classical planning describe one complete state and transform it with add and delete lists. A STRIPS domain is the special case of a basic action theory in which is a complete set of ground atoms with the closed-world assumption, and each action has unconditional effects. The situation calculus also allows incomplete initial knowledge, conditional effects and quantified preconditions.
- The event calculus uses time points and a narrative of events in place of histories. It handles actions that happen at the same time and continuous change more directly, while the situation calculus is built around branching hypothetical futures.
- Goal regression in STRIPS planning and the weakest precondition of program verification are the same idea as regression in the situation calculus: rewrite a condition on the result of an action as a condition on the situation before it.
- Temporal logic talks about properties along paths of states with operators such as "always" and "eventually"; the situation calculus talks about named histories with quantifiers over situations.
Known results in the model
- Relative satisfiability. A basic action theory is satisfiable if and only if is satisfiable (Pirri and Reiter 1999). The axioms for actions, written in the forms above, can never make a consistent initial database inconsistent.
- Regression. For a regressable formula , such as a formula about a ground history, if and only if , where is a first-order formula about (Pirri and Reiter 1999; Reiter 2001, Section 4.5). So projection and executability reduce to first-order reasoning about , without and without the second-order axiom. The regression page gives the operator.
- Undecidability. Because can be any first-order theory, projection is undecidable in general: with no actions at all, it is first-order entailment. In the ground, finite case, where the fluents and actions are propositional, it is decidable, and the regression page shows that it is coNP-complete when the initial database is a propositional formula.
- Progression is harder. Updating to a database about , so that the new theory has the same consequences about the future, needs second-order logic in general, and Lin and Reiter (1997) give first-order cases in which it does not.
- Planning is deduction. A plan is a witness for an existential query. Since entailment is undecidable in general, so is planning; in the propositional case it is the classical planning problem.
References
- John McCarthy and Patrick J. Hayes, Some philosophical problems from the standpoint of artificial intelligence, in Bernard Meltzer and Donald Michie (eds.), Machine Intelligence 4, Edinburgh University Press, 1969, pages 463 to 502, situations, fluents and the function result for the situation after an action, and the statement of the frame problem (general locator)
- Raymond Reiter, Knowledge in Action, Logical Foundations for Specifying and Implementing Dynamical Systems, MIT Press, 2001, Chapter 3 from page 17 (the language), Chapter 4 from page 45 (the foundational axioms, basic action theories and regression)
- Fiora Pirri and Raymond Reiter, Some contributions to the metatheory of the situation calculus, Journal of the ACM 46(3), 1999, pages 325 to 361, the foundational axioms, basic action theories, the relative satisfiability theorem and the regression theorem (general locator)
- Fangzhen Lin and Raymond Reiter, How to progress a database, Artificial Intelligence 92(1-2), 1997, pages 131 to 167, progression of a basic action theory, which in general needs second-order logic, and first-order special cases (general locator)
- Frank van Harmelen, Vladimir Lifschitz and Bruce Porter (eds.), Handbook of Knowledge Representation, Elsevier, 2008, Chapter 16, Situation Calculus, by Fangzhen Lin (general locator)
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag MA8AJC Edit this page History Report an error Markdown