Logical Extremism, which views life as all
thought and no action, has given Logic a bad name. It has overshadowed its near
relation, Logical Moderation, which accepts that Logic is only one way of
thinking, and thinking isn’t everything.
The antithesis of Logical Extremism is Extreme
Behaviourism, which denies any Life of the Mind and views Life instead wholly
in behavioural terms.
We saw
before that the fox sees the crow through the eyes of a behavioural
psychologist, purely in terms of the crow’s input-output behaviour:
If the fox praises the crow, then the crow sings[1].
In the same way that the fox reasons about the crow, without ascribing any mental processes to the crow, the behaviourist reasons about intelligent agents in general by focussing exclusively on their externally observable behaviour. Thus, a behaviourist, unable to examine the fox’s internal mental state, might view the fox as the same kind of mindless agent that the fox views crow:
If the fox sees that the crow has cheese, then the fox praises the crow.
If the
fox is near the cheese, then the fox picks up
the cheese.
The behaviourist’s description of the fox
begins and ends with the fox’s externally observable behaviour.
The behaviourist refuses to attribute any internal,
mental activity to the fox, because it is impossible to verify such
attributions by the scientific method of observation and experimentation.
According to the behaviourist, the fox is a purely reactive agent, simply responding to changes in her environment. If, in the course of reacting to these changes, the fox gets the cheese, then this is merely an indirect, emergent effect, rather than one that the fox deliberately brings about by goal-oriented reasoning.
Notice that it is natural to describe behaviour in the form of logical implications:
If conditions then actions.
where the conditions
and actions are all expressed in the
declarative voice. Because these implications are expressed in declarative,
logical form, the behaviourist can reason with them,
both backwards and forwards, and in other ways as well. After all, the behaviourist would never dream of applying behaviorist
principles, which she uses for other agents, to herself.
The behaviourist sees no reason
to distinguish between a fox and a human. Implications such as:
If it is raining and you are outside and
you have an umbrella,
then
you open the umbrella and put it up.
might accurately describe your behaviour
as seen by an external observer. But it does not follow that you actually use
such rules yourself internally, to generate your actions in reaction to
changes in the world around you. Your use of an umbrella whenever it rains
might only be an instinct, of whose purpose you are entirely unaware.
Behaviourism is indirectly supported by Darwinism, which holds that organisms evolve by adapting to the environment, rather than by a goal-oriented process of self-improvement. Behaviourism also shares with production systems its focus on modelling behaviour as reactions to changes in the environment.
Few psychologists today subscribe even to
moderate versions of behaviourism. Most adhere instead to some variant of the cognitive science view that intelligent
agents engage in some form of thinking that can usefully be understood as the
application of computational procedures to mental representations of the world.
Paul Thagard states in his book, Mind: Introduction to Cognitive Science, that, among the various models of thinking investigated in
cognitive science, production systems have “the most psychological applications” (page 51). Steven Pinker in How the Mind Works also uses production systems as
his primary example of a computational model of the mind.
A production system is a collection of condition-action rules
incorporated in the thinking component of an agent’s observation-thought-action
cycle.
Condition-action rules (also called production rules) have a similar
form to the behaviourist’s descriptions of behaviour. However,
their conclusions are typically expressed in the imperative, rather than in the
declarative voice:
If conditions then do
actions.
The use of the imperative voice reflects the fact that the rules are
used
internally by an agent to generate its behaviour,
rather than externally by an observer simply to describe that behaviour. This grammatical distinction may seem subtle.
But, as we will see, it can get even subtler, when different rules give rise to
conflicting actions.
Production systems were invented in the 1930’s by the logician, Emil
Post, but were proposed as a computational model of human intelligence by Alan
Newell.
Production
systems embed condition-action rules in an observation-thought-action agent
cycle:
To cycle,
observe the world,
think,
decide what actions to perform,
act,
cycle again.
Thinking
is a form of forward reasoning using the condition-action rules:
If conditions then do
actions.
Forward reasoning first verifies that the conditions
of the rule all hold in the current situation, and then derives the actions of
the rule as candidate actions to perform.
If more than one rule has its conditions verified in
this way, then the agent needs to perform “conflict resolution” to decide which
actions to perform. The agent then executes the chosen actions and observes
their results, including perhaps whether the actions succeed
or fail.
In the simplest case, an agent’s mental state consists entirely of such rules alone, without any
mental representation of the world. In such a case, the conditions of a rule
are verified simply by matching them against the agent’s current observations.
In this simple case, it can be said (and has been said) that the world serves
as its own representation: If you want to find out about the world, don’t think
about it, just look and see!
Observing the current state of the world is a lot easier than trying to
predict it from past observations and from
assumptions about the persistence of past states of affairs. And it is a lot
more reliable, because persistence assumptions can easily go wrong, especially
when there are other agents around, changing the world. It’s too early to
consider this issue further in this chapter, but it is an issue we will return
to later when we look more closely at what’s involved in reasoning about
persistence over time.
Imagine that you are a louse and that your entire life’s behaviour can be summed up in the following three
condition-action rules:
If it’s clear ahead, then move forward.
If there’s
an obstacle ahead, then turn right.
If you are
tired, then stop.
Because
you are such a low form of life, you can only sense the world directly ahead of
you. You can also sense when you are tired. Thus, your body is a part of the
world, external to your mind. Like other external objects, your body generates
observations, such as being tired or hungry, which have to be assimilated by
your mind.
Notice the
use of the imperative mood for the actions “move”, “turn” and “stop” in the
rules that govern your behaviour. This contrasts with the use of the declarative
mood that is more appropriate in rules that a behaviourist
might use to describe your behaviour.
It doesn’t
matter where the rules come from, whether you inherited them at birth, or
whether you learned them in your infancy. The important thing is that, now that
you have them, they govern and regulate your life.
Suppose,
for the purpose of illustration, that you experience the following stream of
observations:
Clear ahead.
Clear ahead.
Obstacle
ahead.
Clear ahead
and tired.
Matching
the observations, in sequence, against the conditions of the rules results in
the following interleaved sequence of observations and actions:
Observe: Clear
ahead.
Do: Move forward.
Observe: Clear
ahead.
Do: Move forward.
Observe: Obstacle
ahead.
Do: Turn right.
Observe: Clear ahead and tired.
At this
point, two rules have conditions that match the current observations. For this
reason, the two rules and their corresponding actions can be said to be in
conflict. Some method of conflict resolution is needed, therefore, to decide
what to do.
Many
different conflict resolution strategies are possible. But, in this as in many
other cases, the simplest strategy is entirely adequate: Assign priorities to
the different rules, and select the action generated by the rule having the
highest priority. In this case it is obvious that the third rule should be
assigned higher priority than the second. So the appropriate action is:
Do: Stop.
Once a
louse has learned its rules, its internal state is fixed. Observations come and
go and the associated actions are performed without needing to record or remember
them. The price for this simplicity is that a louse lives only in the here and
now and has no idea of the great wide world around it. But, for a louse, this
is probably a small price to pay for enjoying the simple life.
More complex behaviours than that of a louse can be modelled with more complex production systems having an internal memory. Such a memory can be used, not only to represent the current state of the world, but also to store a historical record of the past. Typically, such records have the form of atomic sentences, so called because they contain no proper subparts that are also sentences. An atomic sentence is also called an atom.
In the case of a production system with memory, a
condition-action rule is triggered by the record of an observation that matches
one of its conditions. Any remaining conditions of the rule are verified by
testing them against other records in the memory. When all the conditions of
the rule are verified in this way, the corresponding actions of the rule are
derived as candidates for execution.
Imagine that you have
been reincarnated as a robot and have been sent on a mission to look for life
on Mars. Fortunately, your former life as a louse gives you a good idea of how
to get started. But there are two new
problems to solve: How to recognise life when you see it, and how to avoid
going around in circles.
For the first problem,
your designers have equipped you with a life recognition module, which allows
you to recognise life when you see it, and with a transmitter to inform mission
control of your discovery. For the second problem, you need a memory that
allows you to recognise when you have already been to a place before, so that
you can avoid going to the same place again.
A production system
with memory, which is a refinement of the production system of a louse, might
look something like this:
If the place ahead is clear
and you haven’t gone to the place before,
then go to the place.
If the place ahead is clear
and you have gone to the place before,
then turn right.
If there’s
an obstacle ahead
and it
doesn’t show any signs of life,
then turn
right.
If
there’s an obstacle ahead
and it shows
any signs of life,
then report
it to mission control
and turn
right.
To recognise whether you have been to a place before, you need
to memorize a map of the terrain. You can do this by giving each place you
visit a co-ordinate, (E, N), where E is the distance of the place East of the
origin and N is the distance North of the origin, and the origin (0, 0) is the
place where you start. Every time you go to a place, you record your
observation of the place together with the details of its location. Then, to
find out whether you have gone to a place before, you just consult your memory
of past observations.
Suppose
for example, that you are at the origin, pointed in an Easterly direction.
Suppose also that the following atomic sentences describe part of the world
around you:
Life at (2, 1)
Clear at (1, 0)
Clear at (2, 0)
Obstacle at (3, 0)
Obstacle at (2, -1)
Obstacle at (2, 1).
Although there
is life in your vicinity, like a louse, you can sense only what is directly in
front of you. So, when you start, the only thing you know about the world is
that it is clear at (1, 0).
Assume
also that, although it is your mission to look for life, you are the only life
form that moves. So this description of the world applies to all states of the
world you will encounter (assuming, therefore, that when you occupy a place, it
is still considered clear).
With these assumptions, your behaviour is predetermined:
Observe: Clear at (1, 0)
Do: Go to (1, 0)
Observe: Clear
at (2, 0)
Do: Go to (2, 0)
Observe: Obstacle
at (3, 0)
Do: Turn right
Observe: Obstacle
at (2, -1)
Do: Turn right
Observe: Clear at (1, 0)
Remember: Gone
to (1, 0)
Do: Turn right
Observe: Obstacle
at (2, 1) and Life at
(2, 1)
Do: Report life at (2, 1) to mission control
Do: Turn right.[2]
Notice that reporting your discovery of life to mission control is just
another action, like moving forward or turning right. You have no idea that,
for your designers, this is your ultimate goal in life.
Your designers have endowed you with a production system that achieves the
goal of discovering life as an emergent property. Perhaps, for them, this goal
is itself a sub-goal of some even higher-level goal, such as satisfying their
scientific curiosity. But for you, none of these goals is apparent.
Production systems have been used, not only to
construct computational models of intelligent agents, but also to build
computer applications, most often in the form of expert systems. Many of these
applications use condition-action rules to simulate goal-reduction explicitly,
rather than rely on emergence to achieve higher-level goals implicitly.
For this purpose, current goals are recorded as
statements in the system’s memory. Then goal-reduction is simulated by matching
goals in memory with conditions in condition-action rules, using actions to
delete current goals and to replace them by new sub-goals.
Thus, the fox’s reduction of the goal of having cheese
to the sub-goals of being near the cheese and picking up the cheese can be
simulated by forward reasoning using the condition-action rule:
If
the goal is to have an object
then
delete the goal to have the object
and
add the goal to be near the object
and
pick up the object.
Getting this simulation right can be quite
tricky in the general case, especially when there are different ways of
reducing the same goal to alternative sub-goals. It is easier when there is
only one way, as in the simplified example of the fox and crow.
Another problem with this approach is that it looses
the justification for goal-reduction given by the belief:
if the animal is near the object
and the animal picks up
the object.
The production rule simulation is also more complicated
and less natural than obtaining goal-reduction directly, simply by reasoning
backwards with the belief.
Goal-reduction procedures can, similarly, simulate
condition-action rules, but with similar disadvantages. In both cases of
simulation, it is more natural to reason directly with sentences in logical
form, either forwards or backwards, depending upon which direction is more
appropriate in the circumstances.
Another, perhaps more fundamental problem with the approach
is that it distorts the natural status of condition-action rules as goals in
their own right. This is one of the main topics of the next chapter.
[1] Logically, it doesn’t matter whether we write the implication forwards, as we do here, or backwards as we did before. In both cases, the meaning is the same; and in both cases the belief can be used to reason forwards or backwards.
[2] I leave it to the reader to work out
what happens next, and I apologise in advance.