Situation Calculus
A simple approach to capture information about situations is situation
calculus. It is due to John McCarthy and Pat
Hayessitcalc. In situation calculus, the world
consists of a series of snapshots, situations. Every situation is
created from the previous by a series of actions. Relations and
properties are noted with a separate situation argument.
Properties subject to change are called fluents.
Changes from one situation to another are modeled using a function,
. The atomic
predicate
is true, if the fluent
is true in the
situation
.
Actions are
described by stating their effects. Therefore effect axioms
have to be stated, describing the properties of a situation that
results from doing some action. However, this is not enough. One also
has to state axioms describing a situation after not
performing an action. Those are called frame axioms.
Frame axioms have to be stated for every fluent and action. Another
solution is to use a successor-state axiom. This axioms states,
that a fluent is true after some action, if an action made it true or
it has been true and no action made it false.
This is a very weak theory of situations. The world consists of a
series of snapshots, that are complete on its own. There is no
development within a situation, since they do not have a duration.
We shall therefore turn our attention to a more complex theory of
situations.
But first, let us consider an example. We want to open a bottle of beer, smell
the beer
and after that we drink the beer. So the fluents we have to
consider are
and
, the actions will be
and
.
We start off with the beer closed and not empty.
Now we want to perform the action of opening the beer, ending up in a
new situation.
However, this does not do anything yet. We have to put some knowledge
about our
action in our theory, our first effect axiom.
Now
is true and our beer is no longer closed. But before consuming the
beer we would like to smell it first, because we are in another
country and do not trust their ability to brew beer after German
purity law
.
There is no fluent changed here, because the smelling is rather a
symbolic act, we cannot smell the ingredients anyway.
After we finished this ritual, we finally want to drink the beer,
ending up in a new situation.
We need some effect axioms too. We can only drink an open, not empty beer. And
after we finished drinking, the beer is empty.
Now the question is, if
is true. Oddly, it is not. Since there is no axiom saying otherwise,
the beer could have closed itself while we were smelling the
beer. The beer could have been closed already in
. Even worse, the
beer could have emptied itself at any time! We have to add
some frame axioms about things, that do not change, if some action is
done. If the beer is empty or open, then there is no way to undo this.
Now we have to state, that the bottle only open when we open it, and,
more important, that the only way it will get empty is, when we
consume it.
Now our beer will be empty in
, but not before that.
leechuck
2005-04-19