Document 10591529

advertisement
REWRITING RULES APPLIED
TO THE FORMATION OF
STRATEGY IN GAMES
by
Clayton Hall Lewis
AB Princeton University (1966)
Submitted in partial fulfillment of
the requirements for the degree of
Master of Science
at the
K
K
I'4AS3ACHUSETTS INSTITUTE OF TECHNOLOGY
June, 1968
Signature of Author
~I
Signature redacted
Departient of Mathematics
May 17, 1968
Certified by
S
gnature redacted
Thegis7 Advisor
Archives
JUN 111968
0BRARIU
k
9
%F---
%V
2
REWRITING RULES A-PLIED TO THE
FOR IATION OF STRATEGY IN GAMES
Clayton Hall Lewis
Submitted to the Department of Mathematics on
May 17, 1968 in partial fulfillment of the
requirements for the degree of Master of Science
An attempt is made to represent problem-solving as
consisting mainly of deriving relevant inferences
from experience. These inferences are described with the
aid of simple branching diagrams, which in turn are
condensed into collections of rewriting rules. A machine
is discussed that forms chains of inferences using
these rules. Rules useful in analyzing checkers are
discussed in some detail. An extended machine is described
that has the ability to create, change, or delete rules
in its original list. It is concluded that the
limits on mechanical intelligence are set more by
the experience of a machine than by its ingenuity.
That is, there is no substitute for knowing what to do.
Thesis Supervisor: G. Hubert Matthews
Associate Professor of Modern Languages
3
This paper is addressed to the general problem of mechanical
simulation of human thought processes. Mathematicians tell
us that modern digital computers have the flexibility theory
demands to carry out any recursive process, subject to limitations of memory. But the proof of this statement provides
no guidelines for the practical investigator. The question
of how best to program or organize a machine for particular
problems remains open. Study of human problem-solving may
provide some useful models if the problems considered are
carefully chosen.
Many kinds of problems present difficulties to a machine
that are not in themselves of interest here. Problems
involving dexterity or perception must be translated into
mechanical terms by constructing complicated output and input
devices to be added to the central processor. Problems involving
rhymes would require a large store of information inmemory.
Other problems may be too vague, or for that matter too welldefined. But any simple game of strategy provides a large
class of problems which avoid these difficulties. Moves can
easily be typed out of and into a machine. The rules and other
basic data are easily stored. The alternatives open to a
player at any point are limited, but there are alternatives.
Furthermore, a player in the course of one game solves as many
problems as there are moves, all of which problems are related,
and stated in similar terms. A machine which solves some can
easily be extended and tested on others. Notice that the
problems being considered are not entire games, but the
selections of appropriate moves within a game.
Appropriateness in this situation is not easy to define.
In some sense the appropriateness of a player's moves is
reflected in his won-lost record. But a mistake on one problem
can cancel brilliant performance on many others if
a person's
or machine's skill is measured only by success. People need
not wait until the end of a game to tell that they have
played well or poorly. There are successes scored during play
that the player notes: trapping the opponent, averting threats,
predicting and anticipating. These successas depend on more
than moves. To see this one can contrast two kinds of play.
A and B both play a game with a known winning strategy, such
as nim. A knows the winning strategy. All of his moves are
well chosen, but his play is mechanical. He is not solving
a problem when he moves, he is carrying out a fixed procedure.
B does not know the winning strategy. He may make many misplays,
and cannot defeat A, but his attempts to analyze situations
and choose moves are worth attending. So one cannot look at
the moves a player makes and say,"This is good," or "That is
bad." One must ask for the analysis that underlies the move.
Such an analysis can be conveniently approximated by a
branching diagram. At the foot of the diagram lies the move
chosen. Above it are the statements from which the move is
derived. For example, suppose one is playing checkers, and only
one move, M, is possible. It is a rule of checkers that one
must move if possible, so one makes move M. The diagram for
M looks like this:
possible moves are: 14
must move
move M
diagram 1
Most diagrams continue upward, following the general principle
that the statements from which statement S is derived appear
just above S. Diagram 1 could be elaborated to show how it
was determined that M was the only move. Clearly, this involves
exactly two kinds of statements: rules of the game which
specify what constitutes a move, and objective statements
about the situation on the board. This derivation and similar
ones can be abbreviated thus:
rules
situation
possible moves: M
must move
move M
diagram 2
It is not necessary to show that "must move" is a rule, since
no branching is involved in deriving it.
Clearly factors other than rules and objective conditions
enter these derivations. For example, suppose one has decided
that any of three moves, M1, M2, 143, is a good choice, but
cannot choose among them. He can have someone choose a number
from 1 to 3, and play the corresponding move. If the arbiter
6
picks 2, 142 will be played, and the derivation looks like this:
various factors
M1 M2 M13 are good
2
,according
various factors
cannot choose rationally
choose from M1 142 143
to digit
move 12
diagram 3
The derivation above "2" can be considered to be just "chance",
since any random process would do as well as the one used.
Another class of factor to be considered is the assumptions
a player may use, explicitly or implicitly, during play. These
may include things the player has been told about the game
that he accepts as fact, or judgements that he makes by analogy
to other situations. To take a very simple case, suppose one
is told that the best way to open a checker game is with move M.
Then the derivation is just:
it is the beginning
of the game
at the beginning
move M
move M
diagram 4
There is no derivation given for the assumption, "at the
7
beginning move M." Analogies can be somewhat more complicated.
The decision to ignore a certain move M in analyzing some
situation P is often made in the following way:
situation
M is distant
from P
distant moves
are unimportant
ignore M when
analyzing P
..
.
diagram
V
5
Here "distant moves are unimportant" is not a proposition
about P; in fact it may be quite false of P. It is a proposition about a collection of situations encountered in the
past which is assumed to apply to P.
So four kinds of statements have been presented that can
stand without derivation at the upper end of a branching
diagram. These are rules, objective statements of position,
chance results, and assumptions. A little reflection should
convince oxie that any underived statement will belong to one
of these categories. In fact, the category of chance results
can be eliminated in some situations by incorporating a
random element in the statement of position, and in others
by always choosing the first of a list of alternatives when
chance would be invoked. Derivations, in the sense discussed
here, start with rules, statements of position, and assumptions
H
8
and proceed to moves.
What happens at the nodes of a diagram? By construction,
if one has the diagram
A
B
..
C
x
diagram 6
then X is a function of A,B,C,... only. For if X depends on
some factor Q not represented in the diagram, the diagram
is incomplete. X can be seen as arising from A,B,C,... by
rules of inference which may or may not be those of ordinary
logic. One may have not only
A
A implies B
B
diagram 7
but also
A is good
B is bad
compare A and B
A is better than B
diagram 8
1
which represents not a rule of logic but a rule of language.
These processes at the nodes can be described by simple
9
rewriting rules. Diagram 6 becomes just A B C
Uhen A, B are fixed strings of symbols A,B--* C means just
that when A and B appear in some collection of strings, they
are to be erased and replaced by C. In this discussion A and
B need not appear in a fixed order. If it is desired to replace
B but retain C when A and B are present one writes A,B --*A,C.
This transformation of diagram to rules would not be very
helpful if A,B were required to be fixed strings. The advantage
of the rules is that they can be phrased in terms of variables,
and thus express the relationship described by a whole family
of nodes. Let W, X, and Y be variables that can represent any
strings of symbols. Then the following rules capture some
important relationships:
WX, Yis X---WX, Y is X, WY
W is X, X is Y -- PW is X, X is Y, W is Y
In partioaular,l'if the statements in diagram 5 are rephrased
slightly, one has
distant move is
unimportant
with rspect to
P M is distant move
with respect to
P M is unimportant
ignore unimportant
)
ignore with respect to
PM
diagram 9
-A
10
It can be shown that the introduction of variables adds
nothing new in the following sense: if V is a collection
of rewriting rules with variables there is a collection V'
of rewriting rules without variables that has the same effect
on any string of symbols 1 . But the use of variables makes it
much easier to write rules describing processes of the type
discussed here.
Once rules have been written for all the nodes in a
branching diagram it is easy to imagine a machine which can
simulate the derivation described by the diagram. As a start,
the machine can have a long register into which symbols may
be typed, and a list of rules. The machine examines each
rule in turn, and applies it to the string of symbols in the
register if possible. Then it proceeds to the next rule.
After the last rule has been examined, the machine goes back
to the head of the list. To avoid ambiguity, if a rule applies
in more than one place in the string, it is applied at the
earliest place. In applying a rule any consistent substitutions
may be made for variables in that rule. That is, a variable
may represent any string of symbols, including blank, but
only one string in each application of the rule.
To illustrate, suppose the rule list is
i) AXA--4B
ii)
BB--+A
If ABCABBA is typed into the register, the following changes
I'Notes are collected at the end.
11
will occur: ABCABBA --
BBBA -""+ ABA -+B.
Note that if
the
rules are applied in incorrect order, or to a later part
of the string, different results appear.
Now if one had all the rules for the nodes of some diagram
in this machine, and placed the rules, description of
situation, and assumptions from the top of the diagram in the
register, the machine would produce the statement at the
bottom of the diagram. In examining examples of this it is
helpful to use a few short-cuts.
Most of the symbols appearing in the diagrams above are
grouped into strings resembling sentences. While the order
of the symbols within these sentences is important in making
the changes at the nodes, the order of the sentences
themselves is not. It will save effort to put parentheses
around sentences, and allow them to be permuted freely in
applying rules. This does not apply to items which may be
parentesized within sentences. Now the rule (A)(C) -in(A)(B)
applies equally to (A)(B)(C) and (B)(A)(C). This convention
requires that care be taken with rules that can apply in
more than one sentence in the register, since any sentence can
be considered earliest. But this is not a problem in any of
the examples to be discussed.
It will also be helpful to restrict the definition of
variable somewhat. Suppose one wished to stipulate that A
must be changed to B whenever it is followed by C in the
same sentence. The simplest rule would be -AXC--+BXC, with X
a variable. But if the string (AB)(FC) were in the register,
_J
12
the rule would be applied, letting X stand for B)(F, to
produce (BB)(FC), even though A and C are in different sentences.
Excluding parentheses from X would solve this problem, but
would create others in sentences which include parentheses,
such as will occur later. The best compromise is to let X
represent any string of symbols that is well-formed with
respect to parentheses. This notion can be defined by the
following rules: a) any symbolincluding blanknot a parenthesis is well-formed. b) if W is wellformed (W) is wellformied. c) if W and V are well-formed WV is well-formed.
Thus A,
(A), A(B), (B)(C)A, and (A(B)) are all well-formed,
but (, A(, (B)), and A(B)C(A are not. With this restriction
the rule AXC--+BXC cannot apply to parts of different sentences,
for X would then contain odd parentheses.
Using these conventions, one can easily write rules for a
machine simulating any simple derivation. The advantage of this
'may not be apparent, however. Suppose a machine were constructed which could carry out some few derivations. Would
it not require new rules to handle any new situations it faced?
While the rules of the game, assumptions, and description
of position that appear at the top of the derivations can be
considered legitimate input for the machine, it may be felt
that the rules used on them must be constructed ad hoc. This
objection can best be answered by considering in some detail
the rewriting rules appropriate to some particular game. It
will appear that rules useful in one derivation are useful in
13
many others, so that as the collection of rules is expanded
to treat new situations it does not grow unmuanagably.
Checkers is a game worth studying in this context because
although its rules are easily stated, positions easily
described, and moves easily specified, the play and its
analysis may be quite complicated. For descriptive purposes
the squares of the board will be numbered as in diagram 10
on the next page. The board is shown with the men arranged as
they are at the beginning of the game. The machine will
represent Black. The first version of the machine will be
designed to play only a single, simple strategy. When the rule
system for this simple machine has been explained it will be
expanded.
The first order of business is to devise expressions for
the rules of checkers and the geometrical arrangement of the
board that allow the possible moves in any situation to be
easily derived. This can be accomplished by setting up three
lists, one fixed, and the others to be .changed as the situation
under consideration changes. The first is (BLACK GEOMETRICAL
MOVES IS (1-5)(1-6)(2-6)(2-7)(3-7)...(27-31 )(27-32)(28-32)),
the list of all the geometirically possible forward moves for
Black. Then (BLACK HAS MET ON (1)(2)...(12)) and (RED HAS MEN
ON (21)...(32)), or wherever the men are at the moment in
question.
To manipulate these and other lists it is useful to have
a few general rules. Hereafter lower case letters represent
Red =R
30
__
2
23
20
-
32.
22
i f
ZI
/1
/17
/
/5
/O
5
//1
f0
5
_
_
1
_
_
I a
w-j
3
I
2
-~.
Black =B
diagram 10
~6
~j
A
variables.
1) (WiAT(l)(i) )(lx)~*#(WHAT(i)(l)*X)(lx)
2) (vHAT(i)(1)p (y)q)--*(WHAT(i)(1)p(y)*q)
3) (WHAT(i)(l)p*(i)q)w-
(YES(l)(i))
4) (WHAT (i) (J)xiH)---'"(NO (1)(1))
If (lx) is some list in the register, then introducing (WTHAT(l) (i))
into the register for some i will yield (YES(1)(i)) iIf (i) is
in the list, and (NO(l)(i)) if it is not. For example, if the
register contains (BLACK HAS MEN ON (3)(1)) and (WHAT(BLACK
HAS MEN ON)(1)) the derivation runs as follows:
(BLACK HAS MEN ON (3)(1))(WHAT(BLACK HAS MEN ON)(1))
--
-
(BLACK HAS MEN ON (3) (1 )) (WHAT(1 )(BLACK HAS KEN ON)*(3) (1 ))
(BLACK..) (WHAT(1 )(BLACK HAS MEN ON)*(3)*(1))
Now Rule 3 must apply before Rule 2 applies again, giving
(BLACK...)(YES(BLACK HAS MEN ON)(1)) 2
With these rules in mind one can write the following.
(BLACK HAS MOVES) (LOOKED AT BLACK())
5)
(BLACK HAS MOVES WHAT) -"'
6)
(LOOKED AT BLACK (y))(BLACK GEOMETRICAL MOVES IS y(x)w)-"""
(LOOK AT BLACK (y(x))(BLACK GEOMETRICAL MOVES IS y(x)w)
7) (LOOK AT BLACK (y(i-j)))--(LOOKING AT BLACK(y(i-j)))(WHAT
(BLACK HAS MEN ON)(i))
8) (LOOKING AT BLACK (y(i-j)))(YES(BLACK HAS i 1EN ON)
(LOOK FURTHER AT BLACK (y(i-j)))
9) (LOOKING AT BLACK(y(i-j) ))(NO(BLACK
(LOOKED AT BLACK( y(i-j)))
HAS MEN ON)(i)) --4
10) (LOOK FURTHER AT BLACK(y(i-j)))""+(LOOKING FU'ThE
BLACK(y(i-j)))(WHAT(BLACK HAS MEN ON)(j))
AT
11) (LOOKING FURTHER AT BLACK(y(i-j)))(YES(BLACK HAS MEN ON)(j))
(LOOKED AT BLACK(y(i-j))
12) (LOOKING FURTHER AT BLACK(y(i-j)))(NO(BLACK HAS MEN ON)(j))--*
(LOOK STILL FURTHER AT BLACK (y(i-j)))
L
16
13) (LOOK STILL FURTHER AT BLACK (y(i-j) ))
FURTLER AT BLACK(y(i-j)) )(WHAT(RED
(LOOKING STILL
HAS lIEN ON)(j))
STILL FURTiEl
HLOOKING
AT BLACK(y(i-j)))(YESk RED HAS MEN
ON)(j))-'LOOKED AT BLACKiyti-j)))
1 )
15)tBLACK HAS MOVES, z)(LOOKING STILL FURTHIER AT BLACK(y(i-j)))
(NO(RED HAS MEN ON)(j))--"'(BLACK HAS MOVES z(i-j))
(LOOKED AT BLACK(y(i-j)))
16) (BLACK HAS MOVES z)(LOOKED AT BLACK(x(28-32)))-'*
(BLACK HAS EXACTLY MOVES z)
Now if the lists (BLACK GEOMETRICAL MOVES IS ...),(BLACK HAS
MEN ON
...
),
and (RED HAS MEN ON ...
) are in the register
the introduction of (BLACK HAS MOVES WHAT) into the register
will cause (BLACK HAS EXACTLY MOVES z) to be generated, where
z is the list of legal moves for black3 . To extend this system
to cover Red's moves, for the purpose of predicting moves, it
is only necessary to replace BLACK in Rules 5-15 with a variable,
add the list (RED GEOMETRICAL MOVES IS (5-1)...(32-28)), and
add
17) (RED HAS MOVES z)(LOOKED AT(x(32-28))'*
(RED HAS EXACTLY MOVES z)
Now (RED HAS MOVES WHAT) generates the appropriate response.
The replacement of BLACK by a variable allows another
iimediate extension. As stated, Rules 5-17 apply only to the
situation described by the lists (BLACK HAS MEN ON...) and
(RED HAS KEN ON...), namely, the actual situation on the board.
With a variable replacing BLACK, one can allow strings like
(BLACK(1-5))BLACK to appear in that position, and generate
lists of hypothetically possible moves, that is in this case,
those moves which would be possible if BLACK played (1-5).
This requires only that the situation lists ((BLACK(1-5))
BLACK HAS MEN ON...) and ((BLACK(1-5))RED HAS MEN ON...) be
17
available.
These lists can be generated, and the actual situation
lists updated, by the following rules:
18) (x HAS MEN ON y(z)w)(x MOVES(z-q))--+(x HAS MEN ON y(q)w)
19) (z BLACK HAS MEN ON y(x)w)( RED HAS MEN ON q)(IMAGINE
((BLACK(x-r))zBLACK HAS MPPEN
z BLACK MOVES (x-r))
ON y(r)w)((BLACK(x-r))RED HAS MEN ON q)
20) (z RED HAS MEN ON y(x)w)(z BLACK HAS MEN ON q)(IMAGINE
zRED MOVES (x-rr))--0((BLACK(x-r))zRED HAS MEN
ON y(r)w)((BLACK(x-r))BLACK HAS MEN ON q)
For example, suppose (BLACK HAS MEN ON (1)). If (BLACK MOVES
(1-5)), (BLACK HAS MEN ON (5)). But if (IMAGINE BLACK MOVES
(1-5)), ((BLACK(1-5))BLACK HAS MEN ON (5)). Then if further
MOVES (5-9)), ((BLACK(1-5))(BLACK
MBAcK(1-5))BLAcK
(IMAGINE
(5-9))BLACK HAS MEN ON (9)). Thus the machine cAn follow
hypothetical as well as real play.
It will be noticed that jumps have so far been omitted from
consideration. It is a simple but tedious undertaking to devise
rules similar to those above which use the lists (BLACK
GEOMETRIC JUMPS IS (1-6-10)(2-6-9)...) and (RED GEOMETRIC JUMPS
is...). (BLACK HAS JUMP (i-j-k)) if (YES(BLACK HAS MEN ON)(i)),
(YES(RED HAS MEN ON)(j)),
(NO(BLACK HAS MEN ON)(k)), and
(NO(RED HAS MEN ON)(k)). Hypothetical jumps can be determind
analogously, and listed. A final list (z HAS TOTAL MOVES(i-j)...
21) (z HAS EXACTLY MOVES x) (z HAS EXACTLY JUMPS y) (z HAS TOTAL MOVES x AND JUMPS y)
"
AND JUMPS(k-l-m)...) can be formed by the rule
Once machinery for finding the possible plays under various
conditions is available, it is necessary to provide rules
far evaluating and choosing among possible plays. One case
18
is automatic.
If (BLACK HAS TOTAL MOVES x AND JU2PS (i-j-k))
then by the rules of checkers he must jump, and (BLACK WILL
PLAY (i-j-k)). So
22. (z WILL PLAY W:HAT)(z HAS TOTAL MOVES x AND JUMPS (y))'(z WILL PLAY (y))
Also
23
(z WILL PLAY WHAT)(z HAS TOTAL MOVES AND JUMPS)*""""
(z WILL LOSE)
When there are alternatives the situation is more compli-
cated. If (z HAS TOTAL MOVES x AND JUMPS (y)w), (z MUST PLAY
ONE OF (y)w). If (z HAS TOTAL MOVES (y)w AND JUMPS),
(z MUST
PLAY ONE OF (y)w). So by writing the obvious rules the plays
to be evaluated can be put in a list, which will contain
only moves or only jumps. One can now write
2h-) (EVALUATED z (x))(z MUST PLAY ONE OF x(r)s)--*
(EVALUATE z (x(r)))
Now (r) can be evaluated in some way. The simplest strategy
might be to call a move GOOD if it is a jump or if it allows
no jump, choosing a GOOD move at random, or if there is no
GOOD move, playing randomly. This strategy can be implemented
by the following rules:
25) (EVALUATE z (x(i-j-k)))(z GOOD MOVES ARE y)
(EVALUATED(x(i-j-k)))(z GOOD MOVES ARE y (i-j-k))
26) BLACK NOT--* RED
27) RED NOT -#BLACK
28) (EVALUATE z (x(i-)))-""AP(EVALUATING z (x(i-j)))((2Zi-j))z NOT
HAS MOVE WHAT)(IMAGINE z MOVE (i-j)
Now (tzti-j))z NOT HAS MOVE WHAT) will produce the list of
TOTAL MOVES AND JUMPS for player who is not z, on the hypothesis
19
that z plays (i-j).
So
29) (EVALUATINGz(x(i-j)))(z GOOD MOVES ARE y)tkz(i-j))p
HAS TOTAL MOVES r AND JUMPS)--* (EVALUATED z
(x(i-j)))(z GOOD MOVES ARE y(i-j))
30)
(EVALUATING zkx(i-)))((z(i-j))p HAS TOTAL MOVES r AND
JUMPS (s)) --)PEVALUATED z(xki-j)))
Note that there will only be one list kz(i-j)p HAS...) since
(z(i-j)z HAS...) has not been generated.
To finish the evaluation and choose a move one needs
31-) (z MUST PLAY ONE OF 1(m))(EVALUATED z (x(m) )z GOOD MOVES
ARE y)--*)(z MUST PLAY ONE OF x(m))(z GOOD MOVES ONLY
ARE y)
32) (SELECTING z MOVE)(z GOOD MOVES ONLY ARE xtm))
(z WILL PLAY (m))
33)
(z MUST PLAY ONE OF x(m))(z GOOD MOVES ONLY ARE)(SELECTING
z MOVE) -- "(z
WILL PLAY (m))
The procedure can be started by
34)
(SELECT z MOVE)---*(z GOOD MOVES ARE)(SELECTING z MOVE)
(z HAS MOVE WHAT)(z HAS JUMP WHAT)
Now if one types (SELECT BLACK MOVE) into the register the
machine will generate (BLACK WILL PLAY(m)), where x is if
possible some GOOD move. A complete game could be played,
at least until kings appeared, by typing into the register
the sentences (BLACK MOVES(x))(RED MOVES(y)), where x is
the machine's last play, y is Red's, allowing the machine to
stop, and typing in (SELECT BLACK MOVE). At the beginning of
the game the register would contain only the GEOMETRICAL lists,
and the initial positions of the men.
There is of course little interest in such a simple strategy.
What is of interest id that this rule structure can be easily
extended to model more complex strategies. To facilitate this
one can change the EVALUATE and SELECT rules to introduce
20
more flexibility. In EVALUATING a move the machine can trace
all consequences of the move for, say, two moves ahead. If an
event labelled GOOD is a necessary consequence of the move,
the move is labelled GOOD. If an event labelled BAD is a
possible consequence the move is labelled BAD. If two or
more events are consequences, one GOOD cancels one BAD.
SELECT chooses a move at random from among those with the
most GOOD8 or fewest BADs. This structure is adaptable, since
any detectable event, such as a jump, the crowning of a king,
or the blocking of a move can be added to the list of labelled
events. To take an example from actual novice strategy, the
list of all moves toward the center of the board could be
called GOOD. Then any of these moves, or one which sets up such
a move, would get a GOOD rating. But if it also allowed a jump,
the resulting BAD would cancel the GOOD. The sentences which
label events are assumptihns about the game which must be
put in the register before play beginsw
strategy may be
made indefinitely comprehensive by choosing a large enough
set of weighted ebents. The added assumptions need not
add
materiallly to the number of rules required if they can be stated
in terms of jumps, moves, or their prevention, since these
events are explicitly set olit in the (z HAS TOTAL MOVES...)
lists. More geometrical considerations, such as clumping of
pieces, are harder to specify unless they can be approached
through the number of moves available or some other easily
determined condition.
An attempt to catalogue the assumptions used by a human
21
player in this fashion will make one less likely to begrudge
a machine an extra assumption or an extra rule. A human
player is equipped with a vast collection of geometrical and
other assumptions which he can app~y to checkers before he
begins to play. He assumes that he should not give away men,
he assumes he should control as much of the board as possible,
he assumes kings are desirable. And he has rules, largely part
of his linguistic knowledge, to translate these generalizations
into specific play. He can afford to develop these assumptions
because they are useful in a variety of games and situations-for example, all the assumptions mentioned have some relevance
to chess. His ability to apply them is as fluent as speech.
Indeed, the ability to translate "territory" into checker
terms is part of the ability to speak English. A machine is
by contrast severely limited by its inexperience. It speaks
only fragments of a language, and it knows no other games.
But people operate upon their experience. Some points of
checker strategy do not occur to most players without hints
from better ones, but the novice can add to his skill as he
plays even without instruction. The machine described above
can be taught easily enough, but it cannot learn by itself.
It cannot in particular define and label new events, and
change its rules accordingly. Some simple changes actually
make this possible, so that the machine, hampered initially
by its tiny vocabulary and meager intuition, can in fact
progress.
22
The essential change is the combination of the register
and rule list into one string of symbols. This can be accomplished by placing ((A) --:PB)) in the register when
(A)---P(B) is a rule in the list. The list of rules can
now be replaced by one meta-rule: if ((X)--P (Y)) and X are
in the list, where X is obtained from X by consistent
substitution for variables, and does not intersect ((X)--#0(Y)),
then X must be replaced by Y, obtained from Y by the same
substitutions. No rule can be reappliedimrnsdiately if another
rule is applicable. This provision allows some ordering of
rules, even though they are sentences in the register which
permute.
A machine organized in this way can easily generate new
rules,, or destroy old ones.
35) ((PARAPHRASE(x)y)--*
((pxq)(pyq))))
(DELETE x)x
-
36)
(((pxq)) --
Note that in Rule 35 x can have an entire rule as its value.
The PARAPHRASE rule can be adapted to define new events
for labeling. Suppose a list (HISTORY IS(BLACK(10-14))(RED(2518))...) is kept up to date during play, with moves being
added as they occur. Suppose further that the last play in the
HISTORY is GOOD or BAD. Then some paraphrase of (HISTORY MS...)
describes a sequence of plays which is itself GOOD or BAD.
If one writes
3 ) ((WITH RESPECT TO (z
(((pxq))-
PARAPHRASE (x)y) -- 0
((pxq)(WITH RESPECT TO (z)(pyq)))))
3 ) (WITH RESPECT TO (z)(WITH RESPECT TO (z)(x)))-a
(WITH RESPECT TO (z)(x))
23
one ca.
formulate a collection of assumptions which can be
used to make (HISTORY IS ... ) into a general statement:
(WITH RESPECT TO (x(1-5))PARAPHRASE (y(2 6-32)) REMOTE)
(WITH RESPECT TO (x(1-5))PARAPHRASE (y(27-32))
REMOTE)
(WITH RESPECT TO (x(i-j-k))PARAPHRASE(y(1-k))BLOCK)
(WITH RESPECT TO(x(i-j))PARAPHRASE (y( J-1)) UNBLOCK)
(WITH RESPECT TO (x)PARAPHASE (i-j-k) JUMP)
The first group of assumptions here is made up of further
geometric information, not found in the GEOMETRICAL lists.
The second group defines terms to be used in interpreting
HISTORY. To illustrate, the HISTORY (HISTORY IS(BLACK(2226))(RED(5-1))(BLACK(13-17-22))) would be paraphrased as
(WITH RESPECT TO(BLACK(13-17-22))HISTORY
IS (UNBLOCK) (REhOTE)
(JUMP)). Now if (BLACK(13-17-22)) has been labelled GOOD,
the generalized sequence ((UNBLOCK)(REM4OTE)(JUM4P)) can be
labelled GOOD, and any specific sequence which can be
paraphrased as ((UNBLOCK)(RENOTE)(JUM P)) will also be labelled
GOOD. If however such a specific sequence turns out to be BAD,
the BAD label will cancel the GOOD label on the generalized
sequence. Thus PARAPHRASE allows reasoning of the following
sort: the specific sequence s, which is GOOD, can be
generalized to S, which is assumed to be GOOD. The hypothetical
sdquence st is an instance of S, and is thus assumed GOOD.
If st turns out to be BAD, the generalization S is discarded.
24
If terms can be assigned to these new generalizatibns,
they can themselves be used in the analysis of HISTORY.
The rules
ISz))-"+((NAME IS zA)(PARAPHRASE(x)(z))))
40) ( ((SEqUENCE(x)GOOD) ) -"2
( ((x) (NAM.,E(x)) ))
)
39) (((NAME(x)))(NAME
will assign a new vocabulary item of the form A...A to
any sequence labelled GOOD. Now if the term AA is assigned
to ((BLOCK)(REMOTE)(JUMP)) then the HISTORY above becomes
just (WITH RESPECT TO(BLACK(13-17-22))HISTORY IS (AA)).
Thus the machine can create, define, and use new terms
of analysis as it plays. Of course, as the list of geometrical
and other paraphrases is limited, so will be its power of
analysis. Nothing has been said about symmetry, for example.
But assumptions can be taught, and it is not clear that people
generate them routinely.
It can be argued that the PARAPHRASES employed by humans are
all either the products of more or less explicit teaching,
Perceptual.bisA-,or nearly random supposition. (PARAPHRASE(i-j-k)
JUMP) is an example of the first, and (WITHT RESPECT TO(x(1-5))
PARAPHRASE(28-32) REMOTE) is an example of the second. The
third ia harder to exemplify, for people seldom have no
experience to guide them. If they do, they generally fail.
"Maybe I should think of 8.,5,4,9,7,6,3,2 as words" in the
problem of placing I in that sequence comes close.
Machines of the type discussed here differ in several
respects from most other "intelligent" machines. Their
25
emphasis is more on analysis than on production of solutions
to problems. This approach largely bypasses the problem of
credit-assignment-- the machine's progress does not consist
of tinkering with some relatively fixed solution generator
to optimize some measure, but rather of the logical
development of an analysis from assumptions. Its experience
is not stored away as a collection of specific events, but
rather as a collection of tentative generalizations. If the
generalization is wrong, the experience may be lost, but this
is characteristic of human behavior also. Most importantly,
the machine's structure is meant to exploit the logical
structure of human problem-solving. The role of assumptions
and rules of inference is made clear. People do not solve
interesting problems by trial and error but by inferences,
logical or not, from experience.
The weakness of the machine seems to be less a matter of
lack of creativity than it is of lack of knowledge. The
machine is not only ignbrant but also nearly blind, for
part of the knowledge it lacks concerns the effient grouping
(from a human point-of-view) of inputs. The very limitations
of human perception can be seen as invaluable assumptions,
serving to give reasoning a beginning. These assumptions, and
all their learned extensions, must be given explicitly to the
machine. If this is gs-nerously done, the mnchine can analyze
and speculate about the world defined by them, whether that
is the world of check .rs or something grander.
26
Notes:
1) The construction of V' involves adding some symbols
which do not appear in any of the rules of V, and the
effect of Vt will match that of V only on strings not
containing these new symbols. Also, the effect of V' is
not considered finished until all the new symbols have
been removed by rules. Thus V' can use several rules to
simulate each rule of V. For example,suppose V contains the
rule AXB --.4AXC, where X is a variable standing for any
string of D's and Els. Then V1 could have the rules Bi-19.*B,
*D,
*
#
and
*-**,
A* -
A#,#D--*D#, #E-OE#, #B-+C, where
are new symbols. If
the string ADEDB is transformed
by V', the derivation looks like this:ADEDB -*
ADE*DB -P
AD*EDB -OP A*DEDB ---
A#DEDB -PAD
ADEDi-B
"
D* .-
#EDB -'OP ADE#4DB
ADED#B -P ADEDC. If there Tere no A in the string, the new
symbol * would never vanish,
so V' would have no effect
on the string. The construction can get much more complicated,
and it will not work if variables appear on the right side
of an arrow that are not also on the left.
2) The second asterisk is included in anticipation of a
weakening of the ordering of the rules. With two asterisks,
it is sufficient that a rule not succeed itself if another
rule can apply. With one asterisk the entry at the boginning
of the list may be missed under this weak ordering.
3)
Kings are ignored, throughout.
-
U ~~-*--------------------------------
27
Bibliography:
Wiswell, Tom, Secrets of Checkerboard Stratey, Simon and
Schuster, New York, 1960.
Acknowledgements:
The author wishes to thank G. Hubert Matthews foil his
valuable and patient advice. This work was done while
the author was a National Science Foundation Fellow.
Download