Algorithms For A Minimal Chess Player
Algorithms For A Minimal Chess Player
Algorithms For A Minimal Chess Player
Introduction
The p u r p o s e o f this p a p e r is to isolate a n d describe some f u n d a m e n t a l chess
algorithms. I t is clear f r o m the l i t e r a t u r e t h a t m a n y g r o u p s f r o m all p a r t s o f
the w o r l d are w o r k i n g o n chess p r o g r a m s . Thus it is i m p o r t a n t to r e p o r t al-
g o r i t h m s in o r d e r to p r e v e n t their r e p e a t e d rediscovery. A m i n i m a l chess
p l a y e r is defined here as one t h a t d o e s n o t o p e r a t e in the region where the
execution time p e r move is clearly a n exponentially increasing function o f the
quality o f play.
I n 1968 chess p r o g r a m d e v e l o p m e n t b e g a n at University o f California,
Davis ( U C D ) with :
(1) a tree searching l a n g u a g e (TSL) which e n a b l e d a n easy a n d effective
i m p l e m e n t a t i o n o f a search p r o g r a m (Kozckowicki, 1968a, b);
(2) a legal move g e n e r a t o r a n d ;
(3) a MATER I p r o g r a m ( B a y l o r & Simon, 1966) i m p l e m e n t e d in TSL.
142 E . W . KOZDROWICKI, J. S. LICWlNKO AND D. W. COOPER
The goal from the offset was to develop a minimal player. TSL would then
be used to produce "well formed search trees" allowing the machine to
utilize its full allotted time per move to achieve maximum quality. The allotted
time per move was normally one minute while the minimal game player
consistently used in the neighborhood of one second. After one year the
program could compete with most non-club players. In the following year,
while at Stanford, Cooper (1969) continued development which incorporated
chess logistics into tree searching and produced an improved TSL. That
program--COKO III (the Cooper-Koz chess program)--was a strong
contender (lower B class) in the first ACM computer chess championship in
New York (29 August 1970). At UCD work continued on the blitz player or
minimal chess player. The blitz player currently competes at lower chess club
level and has worked 27 of the 40 puzzles in the section on "Brilliant Chess
Combinations and Sacrifices" of Reinfeld's book (1955). This was at a blitz
rate of under 2 seconds per move on the IBM 7044.'~ Like most tournament
players the blitz player also has a good opening (on the basis of principle), a
shaky middle game and a weak end game. It can easily win against players
who leave an occasional pawn en prise. Currently the blitz player is being
merged with coKo III which achieved 24 of Reinfeld's puzzles, before the
ACM championship, at a tournament rate of play.
Doe's Delight
Doc Ross,:~ whose chess ability grew along with the machine, has been the
computer's most ardent competitor. Occasionally playing throughout the
night, when the machine was otherwise idle, he would emerge in the morning
elated, having repeatedly trounced the machine. Figure 1 illustrates his
unorthodox openings, used when he discovered the machine's weakness in
-R -N -B -K -B -N -R
-p -p -p -p ~ -p -p
* ,)( . -P -Q ,
~ B P P ~ * -p
}( }( ~ N ~
P P P ~( ~ P P P
R N B Q K )~ * R
FIG. 1. The opening strategy for Doc's delight. Doc plays black.
t The program is entirely in rORTPa~Nwithout a single assembler language instruction,
i.e. it is completely machine independent.
$ UCD ComputerCenterStaff.
A MINIMAL CHESSPLAYER 143
handling the pawn structure in front of the castling position. The machine's
pawn structure improvement later led to a frustrating evening of defeat
resulting from such unorthodox openings. Doc's second delight came when he
discovered that the machine would tend to castle immediately after but not
before all minor pieces were developed. His third delight is current with both
the minimal player and cor[o III. The strategy is to continually sacrifice
pieces to build up a powerful king offensive. Being greedy for material the
machine does not see what is coming before it is too late. Throughout the
program's development it has in effect been assumed that upon loss of material
or sufficient strategic position the opponent would stoutly resign, as masters
would. The cause and correction o f Doc's delights will be further discussed.
P P P P P P P P
R N B O K B N R
P-Q4 136
P-K4 136
P-Q3 108
P-K3 108
N-QB3 105
N-KB3 105
N-QR3 85
N-KR3 85
P-QN3 20
P-KN3 20
P-QN4 14
P-KN4 14
P-QI34 5
P-KB4 5
P-QR4 2
P-KR'4 2
P-QB3 -4
P-KB3 -4
P-QR3 -9
P-KR5 -9
move is listed and given a number representing the relative quality of the
transformation. Each legal move must be included in the set of scored moves
otherwise an element of randomness would be introduced. The creation of
scores for the moves of such a minimal game is the main subject of this
paper and will be discussed along with the treatment of the Lasker regions,
chess predicates and functions, forks, and sacrificial combinations. Next the
concept of the Fisher set is introduced and look-ahead procedure, as per-
formed automatically by TSL, is described. Finally, a mating combinations
procedure is described which employs well documented chess predicates and
the tree searching language to produce a MATERtree.
7 7 7 7 7 77 77 777
7 7 7 7 7 77 77 777
7 7 -4 -2 -3 -5 -6 -5 -2 ~3 7 7
7 7 -I -I -I -I -I -I -1 -1 7 7
: 7 7 77
'7 7 0 77
7 7 0 0 0 77
7 7 0 0 0 0 0 77
7 7i I I I I 1 1 1 1 77
7 7 4 2 3 5 6 3 2 477
7 7 7 7 7 7 7 7 7 777
7 7 7 7 7 7 7 7 7 777
(b)
7 7 0 0
-I3_ 1 ~ 2 _I I 77 77 0N 00 00
-I I
7 7 7 7 7
(e) (d)
FIG. 3. Chess environment representation: minimal game board. (a) The chessboard
represented by a linear array. (b) Representation of pieces, empty squares and border
squares. (c) Move directions for king and queen. (d) The knight dictates a 12 x 12 board.
obtained very easily and at high rate. Figure 4(b) shows the pin board map-
ping for the example position of Fig. 4(a). The simplest region is the center
defined as the 4 central squares and coded with a - 7 0 . While evaluating
moves the program can rapidly test the pinboard, for - 7 0 , to determine
if the moved piece would reside in the center or possibly attack the center.
For example, if all the squares to which the knight on KB3 of Fig. 4(a)
-R }( ~ }( * -R -K .
W }( ~ )~ w -P -P -P
P Q ~ ~ N ~
P B P w . P B P
R w w * K . * R
(a)
(b}
PiG. 4. The pinboard. (a) Sample board position. (b) Corresponding pinboard setting.
could legally move were generated, the pinboard would contain - 7 0 for 2
of them. Likewise, all the squares adjacent to the opponent's king are given
numbers ( - 6 0 ) marking the king sector. As illustrated in the example of
Fig. 4(b) more important information, such as the 113 on KN7, can overlay
the king sector code J" Thus "most" king sector attacks can be easily detected.
The pawn structure in front of the castled position or the potential castling
positions is coded with a - 5 0 . If the machine is considering a pawn move,
it can rapidly determine if it will harm the castled position by testing the
pinboard. Here is the cause of Doc's delight as illustrated in Fig. 1. The
pawns were given too large a penalty for moving thereby failing prey in a
near frozen position. After castling the pawns on the opposite side are
released by not setting the code.
? The pinboard is a well clustered Lasker map due to the core memory limitation of
the IBN 7044.
A MINIMAL CHESS PLAYER 147
On the condition that castling is still possible the castle structure region is
coded with a -51. For the calculation of Fig. 2 the top 8 moves received a
50-point bonus for clearing the castle region. Clearly the correct group of
moves are set aside in a class of their own. The source of Doc's second delight
occurred when the weight for castling was overpowered by the incentive to
clear the entire castle region. With such weighting, a bishop frozen on K2
could prevent castling. This feature alone is not sutficient for good openings
but the corresponding program is simple and makes a good group classifica-
tion. Openings could be varied by setting a random castle structure region,
e.g. a - 5 1 on KN2 could cause a king's Indian defense.
In Fig. 4, the white queen pins the knight against a pawn. The pin is found
by removing the knight and then determining if the pawn is left en prise. On
the pinboard the square with the pinning piece (QB3) is coded with the "pin
direction" (Shannon, 1950). Thus at some later time it can be easily deter-
mined if the moving of that piece will or will not relinquish a pin, e.g. moving
in other than the plus or minus pin direction breaks the pin. The square
corresponding to the "pinned against piece" is coded with pin direction plus
100 [113 in Fig. 4(b)]. In general, moving this piece in a direction other than
the pin direction will break the pin. The square corresponding to a pinned
piece is always greater than 1000. It contains the direction plus 1000 times the
en prise value of the piece pinned against. This yields immediate information
as to the strength of the pin (the 200 is needed so that a negative pin direction
doesn't modify the en prise strength).
If it were not for the mating threat the number on KN6 would be 1213
indicating that the pinned against piece had a potential en prise value of a
pawn, the classical piece value being 9,5,3,3,1 with 120 being arbitrarily used
for the king. Since moving the knight could lead to mate, the knight square is
coded as if it were pinned against the king itself. The mate threat pin itself is
easily discovered using the mate threat predicate (MT THRT) to form the
regional mapping. Complications such as the opponent knight itself protect-
ing the mating square must be accounted for by execution rather than flatly
relying on region information. As an example the move P-KN5 attacking the
pinned piece would trigger additional evaluation that would discover the
easy reprotection of the mating square.
The main value of the Lasker regions is that they allow an optimum use of
information discovered during pre-analysis to direct execution during move
evaluation.
In Fig. 4 the bishop on KN2 has an X-ray attack (through his own knight),
on the opponent's rook, in the + 11 direction. With the knight removed the
en prise value of the rook is 2 (rook minus bishop) indicated by the ten
148 E. W. KOZDROWICKI, J. S. LICWINKO AND D. W. COOPER
thousands digit of the number (-20211) on the knight's square. The notation
for X-rays is the same as for pins except the numbers are negative and in-
corporate an extra digit. The extra digit is necessary for distinction between
X-raying pieces and pinning pieces (negative directions exist). A precedence
order has been established for information overlapping identical squares.
Center, pawn structure and king sector regions are frequently overlapped
with X-ray and pin information in that respective order.
Figure 5 illustrates the exchange board. This region board contains useful
information for attempting combinations. Associated with each piece on the
-Q x ~ , -P -P
* ~ ~ * Q ~
w w ~ W ~ W W K
(a)
~ ~ ~ * I00300 *
I00 ~( ~ w 022022
~ ~ ~ ~ I00 ~
(b)
FIG. 5. The exchange board. (a) Sample board position. (b) Corresponding exchange board
setting.
game board is a positive 3-digit number stored on the exchange board. Each
digit gives information concerning the participation of a piece in an exchange.
The hundreds digit indicates the number of other pieces protected by that
piece, the tens digit indicates the number of attacks on that piece itself and the
ones digit indicates the number of pieces that protect it. Thus the opponent
queen location on the exchange board contains 100, meaning the queen is
protecting one piece, the queen is not attacked and is not protected. Likewise,
the king protects 3 pieces. The pawn on the exchange square (KB7) protects
no other pieces, is attacked twice and is protected twice.
All en prise pieces are indicated on the exchange board by a negative
A MINIMALCHESSPLAYER 149
number, its value being the expected loss of material. While the exchange
board is being set, a list is made of the en prise pieces and a separate list is
made of all the opponent pieces subject to exchange. An interesting statis-
tic is that the exchange list tends to be rather small, therefore, pieces subject
to exchange can be re-examined at high frequency, e.g. after minor perturba-
tions of the state (board position). An exchange list is a list of all opponent
pieces under direct attack by machine pieces.
Once the pre-analysis of the situation is complete and the Lasker regions
have been determined, evaluation for move selection may commence.
W- -w -R
W W * w-
-N-P\ jB x
-~-N ~ ~ -w- N
W- ~ Q W
W W W R $$ R W 'I~
(o)
N -N N P
,I
B R -P
I
Q -B -R _
I
R
(b)
FIG. 6. The EN PRIS algorithms ordering problem. (a) Sample board position. (b) Linear
attack list for pawn on Q4. Actually square numbers are stored rather than pieces.
150 E . W . KOZDROWICKI, J. S. LICWINKO AND D. W. COOPER
(actually square number 66). All the squares containing pieces which bear on
the target square are loaded into the list indicated in equation (1) as ATK
LST. N M ATKS returns the number of pieces bearing directly on the target
square. The predicate, ATK SQ is FALSE only on the condition that no
pieces bear on the target square or NM ATKS is zero.
The example of Fig. 6 illustrates the scheme used for preservation of the
ordering of attacking pieces. If SQ is assigned the value of the Q4 square
for the position of Fig. 6(a) the ATK LST would appear as shown in Fig. 6(b).
All of the knights bearing on the target square are the first elements of the
list. Next all the pieces that bear directly on the target square are listed
with 8 as a maximum. Any piece behind a piece bearing directly is displaced 8
units along the list, e.g. - B is displaced 8 units from B. A sufficient list
size of 32 allows up to 4 pieces in line. NM ATKS would be returned with a
value of 8 for the position of Fig. 6(a). Unless specially requested, the ATK
LST does not contain strongly pinned pieces. ATK SQ is the most generally
used program or predicate.
A most useful subprogram which employs ATK SQ, determines whether
or not a piece is en prise as illustrated by equation (2).
IF (EN PRIS (SQ))-~ (2)
The input argument (SQ) is the square on which the piece resides and the func-
tion variable, EN PRIS is logical. This function returns 3 other variables
through COMMON (equivalent to GLOBAL),
(1) PER SAF is TRUE if the piece cannot be captured, even at a loss it
is perfectly safe. This information is particularly valuable for
mating threat evaluation.
(2) PSUD SF (pseudo safe) is TRUE if the piece is subject to an even
exchange.
(3) EP SCR (enprise score) is the exact amount of material to be lost in
the exchange, if any.
The EN PRIS algorithm must take pinned pieces into account. As defined
here the knight of Fig. 7 would be evaluated as follows. In Fig. 7(a), the
-p , -B , -e ~ -Q
-p ~ -p ~ -P ~
N ~ N ~ N N
Q ~ Q ~ Q -~ Q
(o) (b) (c) (d)
FIo. 7. EN PRIS algorithm. (a) EN PRIS; (b) PSUD SF; (c) not EN PRIS; (d) PER SAF.
A MINIMAL CHESS PLAYER 151
For the PRT SQ predicate, SQ is the square on which the piece of concern
resides, PRT LST is a list of squares containing pieces protected by the piece
on SQ, NM PRTS is the number of pieces protected and PRT SQ is FALSE
only if NM PRTS is zero.
The SAFE SQ program is the heart of the chess algorithms allowing risky
moves to be considered.
IF (SAFE SQ (SQ))~ (5)
$
In Fig. 8, the pawn moving forward would become EN PRIS. It is actually a
safe move, however, since its capture would leave a bigger (or equal) piece EN
PRIS. The pawn move could well be the best for the minimal game because
-N ~ -B
~ -N
the move is safe and attacks a pinned piece. Though extremely important,
SAFE SQ is a very simple program. It is made up of:
(1) A call to ATK SQ.
(2) Repetitive calls to PRT SQ.
(3) And numerous calls to EN PRIS.
The real power of SAFE SQ lies not so much with minimal chess but with the
use of look-ahead procedure. A safe move is frequently good but not neces-
sarily for obvious reasons. It is this algorithm, combined with look-ahead,
that produces moves that appear as if created through intuition.
For the SAFE SQ evaluation of the position of Fig. 8 the pawn is actually
moved, ATK SQ yields the square (SQ) of the attacking knight and PRT SQ
is evaluated for the knight. For this evaluation the exchange board allows
optimization. If the correspondence knight square on the exchange board was
to contain a number less than 100 then it could not be protecting another
piece and further evaluation would not be necessary. After discovering that
the knight bears upon a second knight the tens digits o f the corresponding
exchange board square of the second knight is examined. If the tens digit is not
zero, i.e. meaning the second knight is under attack, then the move, NxP must
actually be made followed by an EN PRIS test of the second knight.
The board position of Fig. 9(a) is used to illustrate the employment of the
ATK SQ, ATK MV and RE PRT predicates. This position is the same as
Fig. 5 after one exchange (NxP, QxN). A call to ATK SQ on QB7 (SQ)
yields the fact that the opponent king protects his queen. In the first step to
determine if the king as protector can be drawn away, ATK MV is used.
IF (ATK MV (SQ, MV LST, NM MVS))~ (6)
$
ATK MV is FALSE only if the number of moves, NM MVS is zero. MV
LST is a 2-dimensional list containing the origin and destination square of
each move attacking SQ. Thus for the position of Fig. 9(a), MV LST would
contain the bishop move indicated by the arrow (B-KR7). A second call to
"13 -K }( -X }(
-Q - p / , "B "Q
(a) (b)
FIG. 9. Illustrationof drawingoff protecting pieces.
A MINIMAL CHESS PLAYER 153
ATK MV would yield the information that the king cannot move to reprotect
the opponent queen as it could if either the bishop or the pawn were absent.
ATK MV is a very general program, whose use has only begun.
For the situation of Fig. 9(b) the opponent queen could reprotect the rook
simply by moving back. Since such a move would not be considered an ATK
MV a call to RE PRT is needed.
IF (RE PRT (SQ ATKD, SQ PRTG, MV LST, NM))--, (7)
The arguments would be the rook square and the queen square followed by the
list of reprotecting moves and the number of them.
Another valuable predicate is SF MV SQ. For example of Fig. 10 it could
~ ~---Q
N ~ B
be discovered that the indicated pawn move protects the pawn while the
queen move still leaves it EN PRIS.
IF (SF MV SQ (SQ FM, SQ TO, SQ PRT))~ (8)
$
SF MV SQ merely makes the corresponding move, calls EN PRIS on the
square being protected and unmakes the move to restore the minimal game
board.
X -K ~- * -K
-p -p -p -~ .
R
N ~ Q ~ ~ ~ ~
(a) (b)
FIG. 11. Illustration of the M T T H R T predicate.
To determine ifa move such as N-KB5 is a mating threat the move is actually
made on the minimal game board, and the square attacked is proposed as the
mating square (MTNG SQ) and given as input for the first argument. The
MR THRT program determines if the proposed MTNG SQ is in the king
sector, invokes ATK SQ for the proposed mating square and for each move in
turn determines if the potential mating move leaves the moving piece EN
PRIS, if the king is left EN PRIS and if a king run is possible. The second
argument (SP PC SQ) returns the square on which the piece supporting the
mate threat resides, i.e. the queen square in Fig. 1l(a). Figure 1l(b) illustrates
a case where the mating square returned is not the one proposed. It is apparent
from Fig. ll(b) that the new mating square must be created by ATK MV
(Proposed KN7, returned KR4).
The interpose function shown in equation (10) yields a set of moves that
constitute interposes between 2 squares. The squares are normally the square
of the mating piece (or checking piece), SP PC SQ and the mating square (or
king square), MTNG SQ.
IF (INT POS (MT PC sO, MTNG sO, MV LST, NM))-~ (10)
N ~
~ Q ~
are returned as zero, i.e. actually knight directions are orthogonal and thus are
unimportant.
Since a mating threat is such a frequent occurrence in chess it is desirable
to have a function to yield the relative strength of the mate threat, i.e. a mate
threat score.
IF (MT TH SC (MTNG SQ, SP PC SQ) .LT. 100000)~ (12)
$
The arguments of MT TH SC are the same as MT T H R T and normally
passed from MT THRT. If there is no way for the opponent to answer the
threat, MT TH SC is returned as 100,000. Successively lower arbitrary scores
are returned if the opponent can best answer the threat by (1) an unsafe
move, (2) a king run (3) protecting the mating square, (4) by interposing a
piece, or (5) by castling. Similar scores (with exception of cases 3 and 5) are
returned for checking moves as illustrated in equation (13).
IF (CHK SC ( C H K G SQ) .EQ. 100000)--, (13)
(o)
(b)
-R * -P * -P * -P
(c)
X X /X )t/" X X
(e) (f)
X\X ~ X X
I
I
(g) Q
(h)
FIG. 13. Forks and threats. (a) First-order fork. (b)First-order threat to fork. (c) Second-
order fork: a virtual non-occurrence. (d) Complex fork. (e) A complex fork (N-N5) which
has profound effect on openings. (f) A first-order fork with a mating threat and a direct
attack. (g) A king-queen fork. (h) A false fork.
NxP, must reflect the expected resultant gain (this is not necessarily true when
look ahead is used). The terminology of the Fisher set arose out of occur-
rences at tournaments where spectators would repeatedly try to predict the
moves of the American Grandmaster, Bobby Fisher. It has been rumored that
his selected move was always the one least predicted. Apparently the best
moves always tend to receive the lowest score in the minds of lesser players.
Once a move is scored into the Fisher set it cannot be retrieved, even with
tree searching or look-ahead procedure. The Fisher set shall remain a prob-
lem to automated chess until perfect play is achieved!
-p
-N
-N -R ~ N
* * P
Q *
(a)
NXP I000 l
___--__. . . . ._~__. j~Sacrificialset
NXN 0 ]
____~_.......... .-- j~ Regular set
(b)
FIo. 14. Sacrificialcombinations and the Fisher set.
When playing a minimal game all legal moves are considered in sequence
and scored by the forking program. Next, good sacrificial moves are proposed
by the E X C H N G program and the corresponding moves, already loaded into
the minimal game set, have their scores modified. The E X C H N G program
could produce non-sacrificial moves and sacrificial moves could be screened
by SAFE SQ. Next an arbitrary number of the highest scored branches
(moves) are accepted as the minimal game. All remaining moves are thus con-
demned to the Fisher set and erased. The Fisher set is a fuzzy set. The Fisher
set has little consequence until multiple minimal games or look-ahead pro-
cedure is used. There it has profound effect on selective searching and must
be clearly defined. (Further detail appears in Kozdrowick & Cooper e,
1971).
158 Z . W . KOZDROWICKI, J. S. LICW1NKO AND D. W. COOPER
~( w ~( w w w N *
~( X ~( P .W I( .W .W
W W W w P -~ ~ w
w ~ w Q'/w w ~( ,Ix-
FIG. 15. A fundamental concept is to draw tactical units into desirable position.
moves are scored by FORK. The king attack feature alone results in the
solution of 4 of Reinfeld's (1955) puzzles.
The third algorithm for discovering sacrificial moves is that described in
conjunction with Fig. 9. I t involves drawing off a protecting tactical unit by
attacking it directly. The 3 methods are referred to in Fig. 16 as E-F-D;
exchange, fork and draw. Though usually true it is not necessary that E-F-D
results in proposing sacrificial moves.
masters, when questioned, claimed they did not use it in any conceivable way.
Figure 16 illustrates an exhaustive low-level alpha-beta search which does
indeed simulate human thought (which according to local prejudice is an
acceptance criteria). Figure 16(a) gives an example exchange situation with 3
attacking and 3 protecting units. It is desirable to try E - F - D or exchange, fork,
draw procedures after all possible combinations of capture-recapture pairs.
-B )~ -K
B/.x.
6
(a)
E -F-D
E-F-D
E-F-D
BxB E_F.D~ - ~ ' ~-
E-F-D
BxP
tQxB
[KxB
Low level alpha beta trimming
&--- --
(b)
FIG. 16. The alpha-beta dilemmai a specializedexhaustivesearch tree. (a) An exchange.
(b) Exhaustive search for a singlefeature.
The search tree shown in Fig, 16(b) represents an exhaustive search for a
single feature centered about a single exchange. As illustrated in Fig. 16(b)
the exchange pair, BxP, BxB is tried followed by E-F-D. If there is no E - F - D
success further exchange pairs and E - F - D are tried. In the event that all 5
E-F-D's, as shown in Fig. 16(b), have no success the opponent has success-
fully answered the threat of BxP. There is no point in testing the other
opponent replies of QxB or KxB. (This simple fact constitutes the well known
160 E . W . KOZDROWICKI, J. S. LICWINKO AND D. W. COOPER
alpha-beta algorithm). Similarly some fourth level branches are also term-
inated. The asterisk (*) indicates that further growth from that branch is
not to be continued. When applied this way such a low level alpha beta
pruningt algorithm is in accord with human thought. It is, in fact, the appli-
cation that makes the accordance. The total tree of F i g 16(b) requires only
15 E - F - D ' s on the condition it fails to show results on all E - F - D ' s (only
5 are shown, i.e. NxP or QxP sequences are not shown). This procedure is
carried out for all possible exchanges yet the E - F - D ' s per minimal game re-
main small. Although the tree of Fig. 16(b) may appear as if look-ahead
procedure is employed it only results in occasional moves to be inserted
into the minimal game set of Fig. 14(b).
P-K4
N-KB5
126
P-Q4
P-Q3
108
I000
I I correctedscore
OTHER I
NxP 4000 ]
// lO,N ,~ . . . . . . . . . . . . . . . . . . . . . . . 4000
Z-Erroneousscore
(o)
Nxp -4000}
Q-QN7 l
-3000]
[---5000~ Loss of a rook
I -3oooj
: 1
(bl
{c)
FIG. 18. The false score problem. (a) First ply erroneous scores on risky moves may be
corrected by look ahead. (b) False scores representing excessive threat can redirect and
misguide the search. (c) Estimate of probable scores for a move transformation; tactical
plus strategic scores.
Though most machines play p o o r end game it is really in end game where
there is much opportunity to take advantage of the machine's brute force
capability. Originally this p r o g r a m produced 2 trees per move. I f the MATER
tree did not produce mate it was discarded and the regular tree made the
move selection. An early achievement was a mate in 9 (18-ply) puzzle by a
series o f checks.
A MINIMAL CHESS PLAYER 163
MT [ -I00000
~
CH
I CH
"IO0000=MATE
,IO0000=MATE
E-F-D -I00000
Although sacrificial moves are loaded into the tree, the MATER tree is
plagued with exponential growth and a great deal of selection, through
scoring is necessary. Frequently the MATER tree discovers sequences that
win material or gain strategical position. For the minimal game all the moves
selected are determinable on the basis of an algorithm. The MATER tree,
however, frequently selects moves for which it seems indeed "impossible" to
discover a minimal game algorithm. After further experimentation and
development this MATERprocess will be combined with the regular tree for
COKO III.
Conclusion
It is felt that in order to create a good chess program there is no substitute
for a direct analysis of the problem and implementation of fundamental
164 E. W. KOZDROWlCKI, J. S. LICWlNKO AND D. W. COOPER
References
BAYLOR,G. W. & SIMON,H. A. (1966). A chess mating combinations program,
Proc.-Spring Joint Computer Conf., pp. 431--47.
BELL,A. G. (1970). How to program a computer to play legal chess. Computer J.
13, no. 2.
BOTVINNIK, M. M. (1969). Computers Chess and Long-range Planning. New York:
Springer Verlag.
COOPER, D. W. (1969). Heuristic Tree Searching in the Game of Chess, Working
paper,
A MINIMALCHESSPLAYER 165
DE GROOT, A. (1966). Thought and Choice in Chess. New York: Basic Books.
F•IGENBAUM, E. A. & F~.LDMAN, J. (Eds) (1963). Computers and Thought. New
York: McGraw-Hill, Inc.
FINE, R. (1967). The psychology of the chess player. New York: Dover.
GARDNER, M. (1959). Mathematical games. ScL Am. 206, 138.
Gooo, I. J. (1967). A five-year plan for automatic chess. Machine Intelligence.
Edinburgh: Oliver and Boyd.
GREENBLATT, R. D., EASTLAI~E,D. E. & CROCKER, S. D. (1967). The Greenblatt
chess program. AFIPS Conf. Proc. Washington, D.C. : Thompson.
HUBERMAN, B. J. (1968). A program to play chess end games, Ph.D. Thesis, Stan-
ford University, 1968 (also Technical Report CS106 August).
KozoRowicr~, E. W. (1968a). A practical application of machine learning: use of
learning in an interpreter for a tree searching language. Proc. LE.E.E. Systems
Science and Cybernetics Conf., pp. 250-7. San Francisco, California.
KOZOROWICKI, E. W. (1968b). An adaptive tree pruning system: a language for
programming heuristic tree searches. Proc. A CM Conf.
KOZDROWICKI,E. W. & COOWR, D. W. (1971). Coko-III: The Cooper-Koz Chess
Program, Comm. ACM (To be published).
REINrELD, F. (1955). Improving Your Chess. New York: Barnes and Noble, Inc.
SAMUEL,A. L. (1967). Some studies in machine learning using the game of checker.
II-Recent Progress, I B M Journal, 11 (6) November.
SCOTT, J. J. (1969). A chess playing program. Machine Intelligence IV. New York:
Elsevier.
SHANNON, C. E. (1950). Programming a digital computer for playing chess.
Phil. Mag. 41, 256.