Chapter 2 The Fox and the Crow
Proactive people tend to use logic to reason about the world and to
reduce goals to sub-goals. Reactive people tend to use condition-action rules
to respond to changes in the world around them. We will look at proactive
thinking in this chapter, reactive thinking in the next chapter, and show how
to reconcile and combine the two kinds of thinking in the following chapters.
The fox and the crow
Probably everyone knows the ancient Greek fable, attributed to Aesop,
about the fox and the crow: The crow is
sitting in a tree with some cheese in its mouth. The fox is on the ground under
the tree and wants to have the cheese.
The fox, like other members of her foxy species, is ruthless, conniving
and proactive. She uses logic to represent her beliefs about the world, and backward
reasoning to reduce her goals to sub-goals.
To simplify the story, assume that the fox has the following beliefs:
Beliefs The crow has the cheese.
if the animal is near the object
and the animal picks up the object.
The fox is near the cheese
if the crow has the cheese
and the crow sings.
The crow sings if the fox praises the crow.
As you can see, the fox is not only a logician, but also an amateur physicist.
In particular, the fox’s belief about being near the cheese if the crow sings
encapsulates in a single statement, not only the fox’s knowledge[1]
about her location in relation to the cheese, but also a simple theory about
the law of gravity. This single belief can be derived from other beliefs that
separate the fox’s knowledge about her location from her knowledge about
gravity. Reasoning informally:
The
fox knows that if the crow sings, then the crow opens its beak and the cheese falls
to the ground under the tree. The fox also knows that, because the fox is under
the tree, the fox will be near the cheese when the cheese falls to the ground. Therefore,
the fox knows that she will be near the cheese if the crow sings.
The fox is also an amateur psychologist, a behavioural
psychologist in fact. Being a behaviourist, the fox
makes no assumptions about the way the crow actually generates his input-output
behaviour. In particular, although the fox represents
his own beliefs about the crow in logical terms, she does not assume that the
crow also uses logic to determine his behaviour. As
far the fox can tell, the crow’s behaviour might be
generated by condition-action rules without logical form. Or it might be
directly “hardwired” through his spinal cord without entering into his brain.
Like the fox’s belief about being near the cheese if the crow sings, the
fox’s belief about the crow’s behaviour might be
derived from other, separate beliefs – perhaps from more general beliefs about
the way some purely reactive agents respond to appeals to their vanity, without
first monitoring the logical consequences of their proposed reactions.
The fox also has ordinary common sense. It knows that an animal will
have an object if it is near the object and picks it up. It knows this as a
general law, which applies universally to any animal and to any object
(although it doesn’t seem to know that the law also applies to robots). It also
knows enough logic to be able to instantiate the general law and to apply it to
the case where the fox is the animal and the cheese is the object.
The fox’s beliefs as a Logic Program
The fox’s beliefs not only have logical form, but they also have the
form of a logic program. As we have already seen, a logic program is a collection
of implications of the form:
Conclusion if Conditions.
Both the conclusion and the conditions are
written in declarative form.
The implications are written “backwards”, conclusion first[2],
to indicate that their intended use is to reason backwards, from conclusions to
conditions. As a consequence of backward reasoning, each such implication
behaves as a goal-reduction procedure[3]:
To derive the Conclusion, derive the Conditions.
Even “facts”, which record observations, like the belief that the crow
has the cheese, can be viewed as implications that have a conclusion, but no
conditions:
Conclusion if nothing.
Such facts also behave as procedures:
To derive the Conclusion, do nothing.
Therefore, the fox’s beliefs can be used as a collection of procedures:
To have an object,
be near the object
and pick up the object.
To be near the cheese,
check that the crow has the cheese
and make the crow sing.
To make the crow sing,
praise
the crow.
To
check that the crow has the
cheese,
do
nothing.
These
procedures can be applied, one after the other, to reduce the top-level goal:
The fox has the cheese.
to the two action sub-goals:
the fox praises the crow and the fox picks up the cheese.
Together, these two actions constitute a plan for
achieving the original goal.
Goal-reduction graphs
The fox’s reduction of her original goal to the two action sub-goals can be visualized as a graph, in which implications of the form:
Conclusion if
Condition1 and Condition2
are represented by sub-graphs of the form:
Conclusion
Condition 1 Condition 2
The graph has the form of an upside-down tree with the top-level goal at
the top of the upside-down tree:
The fox has the cheese.
The fox is
near the cheese.
The fox picks up the cheese.
The
crow has the cheese.
The crow sings.
Do nothing. The
fox praises the crow.
For the fox to solve the top-level goal, it suffices for her to grow the tree, starting from the top down, reducing goals to sub-goals, terminating when no further reduction is possible. If all the sub-goals at the “leaves” of the tree are irreducible action sub-goals, then these actions constitute a plan for solving the top-level goal.
The operation of reducing a goal to sub-goals can also be viewed in logical terms, as reasoning backwards with an implication, matching the goal with the conclusion of the implication and deriving the conditions of the implication as sub-goals.
For example, the top-level goal:
The fox has the cheese.
matches the conclusion of the general implication:
if the animal is near the object
and the animal picks up the object.
Backward reasoning derives the two sub-goals:
the fox is near the cheese and the fox picks up the cheese.
by instantiating the general
terms “the animal” and “the object” with the specific terms “the fox” and the
“cheese”, respectively.
The second of these two
sub-goals is an action, which matches the conclusion of no implication and
which can be solved only by performing it successfully. However, the first
sub-goal can be solved by three further steps of backwards reasoning.
The final result of this chain of backward reasoning is a logical proof
that the fox has the cheese if she praises the crow and picks up the cheese.
The proof has the same tree-like structure as the goal-reduction graph we saw
before.
End of story?
For some Logic
Extremists, this is the end of the story. For them, there is no difference
between the fox’s world and the
fox’s beliefs about the world, and no difference between the fox’s plan for
getting the cheese and the fox’s actually having it.
However, Common Sense tells us that there is more to life than just thinking – and perhaps more to thinking than just logic alone. In addition to thinking, an intelligent agent needs to observe changes in the world and to perform actions that change the world in turn. And there might be other ways of thinking - ways that do not use Logic and even ways that do not use any other mental representation of the world.
The moral of the
story
Presumably Aesop’s fable had a purpose – a lesson that it is not safe to take another agent’s words and actions at face value, without trying to understand the agent’s underlying goals and intentions. Or, even more simply, that before doing something you should think about its possible consequences.
The crow in our story responds to the fox’s praise spontaneously - without thinking, you might say. A more intelligent crow would monitor his intended actions, before they are performed, to determine whether they might have any unintended and undesirable consequences.
If only the crow knew what the fox knows, the crow would be able to reason as follows:
I want to sing.
But if I sing, the cheese will fall to the ground.
If the cheese falls to the ground, then the fox will be near the cheese.
If the fox is near the cheese and wants to have the cheese,
then the fox will pick up the cheese.
Perhaps the fox wants to have the cheese and therefore will pick up the cheese.
But if the fox picks up the cheese, then I will not have the cheese.
Since I want to have the cheese, I will not sing.
Notice that this line of reasoning uses the same beliefs as those used by the fox to reduce goals to sub-goals, but it uses them forwards rather than backwards. We will investigate this dual use of beliefs for both backward and forward reasoning later in the book.
In the meanwhile, we note that, although logic might not always be the most natural way of thinking, its use can sometimes help us (and the crow) to think and behave more effectively.
[1] The term “knowledge” applies to beliefs that are “true”.
[2] Implications in formal logic are more commonly written “forwards” in the form: if conditions then conclusion. This forward direction of writing tends to suggest their use for forward reasoning, to derive conclusions from conditions. In fact, logical implications can be used both ways. However, we write them one way rather than the other when we have one preferred direction of use in mind.
[3] Grammatically
speaking, the conclusion of the procedure is expressed in the subjunctive mood
and the conditions are expressed in the imperative mood. Implications in logic,
on the other hand, are purely declarative.