Upload
bhagyashree-pawale
View
288
Download
0
Embed Size (px)
Citation preview
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
1/56
Carnegie Mellon University
Research Showcase
Computer Science Department School of Computer Science
1-1-1973
Analysis of the alpha-beta pruning algorithmSamuel H. FullerCarnegie Mellon University
John G. Gaschnig
Gillogly
Follow this and additional works at: hp://repository.cmu.edu/compsci
is Technical Report is brought to you for free and open access by the School of Computer Science at Research Showcase. It has been accepted for
inclusion in Computer Science Department by an authorized administrator of Research Showcase. For more information, please contactresearch-
Recommended CitationFuller, Samuel H.; Gaschnig, John G.; and Gillogly, "Analysis of the alpha-beta pruning algorithm" (1973).Computer ScienceDepartment. Paper 1701.hp://repository.cmu.edu/compsci/1701
http://repository.cmu.edu/?utm_source=repository.cmu.edu%2Fcompsci%2F1701&utm_medium=PDF&utm_campaign=PDFCoverPageshttp://repository.cmu.edu/compsci?utm_source=repository.cmu.edu%2Fcompsci%2F1701&utm_medium=PDF&utm_campaign=PDFCoverPageshttp://repository.cmu.edu/scs?utm_source=repository.cmu.edu%2Fcompsci%2F1701&utm_medium=PDF&utm_campaign=PDFCoverPageshttp://repository.cmu.edu/compsci?utm_source=repository.cmu.edu%2Fcompsci%2F1701&utm_medium=PDF&utm_campaign=PDFCoverPagesmailto:[email protected]:[email protected]://repository.cmu.edu/compsci/1701?utm_source=repository.cmu.edu%2Fcompsci%2F1701&utm_medium=PDF&utm_campaign=PDFCoverPagesmailto:[email protected]:[email protected]://repository.cmu.edu/compsci/1701?utm_source=repository.cmu.edu%2Fcompsci%2F1701&utm_medium=PDF&utm_campaign=PDFCoverPageshttp://repository.cmu.edu/compsci?utm_source=repository.cmu.edu%2Fcompsci%2F1701&utm_medium=PDF&utm_campaign=PDFCoverPageshttp://repository.cmu.edu/scs?utm_source=repository.cmu.edu%2Fcompsci%2F1701&utm_medium=PDF&utm_campaign=PDFCoverPageshttp://repository.cmu.edu/compsci?utm_source=repository.cmu.edu%2Fcompsci%2F1701&utm_medium=PDF&utm_campaign=PDFCoverPageshttp://repository.cmu.edu/?utm_source=repository.cmu.edu%2Fcompsci%2F1701&utm_medium=PDF&utm_campaign=PDFCoverPages7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
2/56
NOTICE WARNING CONCERNING COPYRIGHT RESTRICTIONS:
The copyright law of the United States (title 17, U.S. Code) governs the making
of photocopies or other reproductions of copyrighted material. Any copying of this
document without permission of its author may be prohibited by law.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
3/56
ANALYSI S OF THE ALPHA-BETA PRUNI NG ALGORI THM
S. H. Ful l er , J . G. Gaschni g and J. J . Gi l l ogl y
Department of Computer Sci enceCarnegi e- Mel l on Uni versi ty
Pi t t sburgh, Pennsyl vani a 15213
J ul y, 1973
Thi s work was supported by the Advanced Research Proj ects Agencyof the Of f i ce of the Secretary of Def ense ( F44620- 73- C- 0074) andi s moni tored by t he Ai r Force Of f i ce of Sci ent i f i c Research.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
4/56
ABSTRACT
Many game-pl ayi ng programs must search very l arge game trees. Use
of the al pha- beta pruni ng al gor i thm i nstead of the si mpl e mi ni max search
reduces by a l arge f actor the number of bot tomposi t i ons whi ch must be
exami ned i n the search. An anal yti cal expressi on f or the expected number
of bot tom posi t i ons exami ned i n a game t ree usi ng al pha- beta pruni ng i s
deri ved, subj ect to the assumpt i ons that the branchi ng f actor N and the
depth D of the tree are arbi t rary but f i xed, and the bot tomposi t i ons
are a random permutat i on of N uni que val ues. A si mpl e approxi mat i on t o the
growth rate of the expected number of bot tomposi t i ons exami ned i s suggested,
based on a Mont e Car l o si mul ati on for l arge val ues of N and D. The behavi or
of the model i s compared wi t h t he behavi or of the al pha- beta al gor i thm i n a
chess pl ayi ng program and t he ef f ects of correl at i on and non- uni que bot tom
posi t i on val ues i n real game t rees are exami ned.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
5/56
TABLE OF CONTENTS
Secti on Page
1. I nt roducti on 1
2. The Al pha- Beta Pruni ng Al gor i thm 2
3. A Probabi l i st i c Model of Game Trees and Some I ni t i al 14
Observat i ons
4. The Probabi l i ty of Eval uati ng a Node i n the Game Tree 18
5. The Expected Number of BottomPosi t i ons Eval uated 23
6. Appl i cati on of the Game Tree Model to Chess 37
7. Empi r i cal Observat i ons 42
8. Concl usi on 47
Appendi x: Notat i on 49
References 51
i i
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
6/56
1. I NTRODUCTI ON
Searchi ng t rees of possi bl e al ternat i ves i s a task common to a wi de
range of programs. The ef f i ci ency wi th whi ch these t rees can be searched
i s of cri t i cal i mportance to such programs, si nce the t rees are typi cal l y
very l arge. Thi s paper i s concerned wi t h measur i ng the ef f i ci ency of a
part i cul ar t ree- searchi ng al gor i t hm, the mi ni max search of a game t ree
wi t h al pha- beta pruni ng.
The probabi l i st i c model used i n our study i s presented i n the next
sect i on and we der i ve an anal yti cal expressi on f or the expected number of
bot tomposi t i ons eval uated i n the search of a game tree usi ng al pha- beta
pruni ng. A reasonabl y accurate si mpl e approxi mat i on to the anal yt i cal
resul t based upon an empi r i cal anal ysi s i s suggested. Si nce our model i n
corporates several si mpl i f yi ng assumpt i ons, the rel evance of our model wi l l
be exami ned i n Sect i on 6 where we compare the behavi or of our model wi t h
the observed behavi or of the al pha- beta procedure as i t i s used i n a non-
t r i vi al exampl e, a chess pl ayi ng program.
I n thi s paper, the operat i on of the mi ni max search procedure and the
al pha- beta pruni ng procedure are i l l ust rated i n the context of game pl ay
i ng programs. We gi ve t he name Max to the pl ayer whose t urn i t i s to move
and t he name Mi n to hi s opponent . Max at tempts to maxi mi ze the ul t i mate
val ue of the game whi l e Mi n at tempts to mi ni mi ze the val ue. A number of
strategi es exi st to ai d a pl ayer i n determi ni ng hi s next move, but the
mi ni max procedure has recei ved the most attent i on i n programs whi ch pl ay
games of perf ect i nf ormat i on. The procedure i s most easi l y i l l ustrated
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
7/56
- 2-
wi t h the ai d of the si mpl e game tree of Fi gure 1. 1. The nodes of the t ree
are i nterpreted as posi t i ons, and the arcs f romeach node are the l egal
moves f rom that posi t i on. The square nodes i ndi cate i t i s Max' s turn to
move whi l e the ci rcl es i ndi cate i t i s Mi n' s turn. The stati c val ues
associ ated wi t h each of the ni ne bot tomposi t i ons are gi ven i ndependent l y
of the appl i cat i on of any search procedure. I ncreasi ng val ues are i nterpreted
as a measure of the "goodness11 of a board posi t i on, i . e. , the amount of ad
vantage to pl ayer Max. I n the mi ni max procedure t he backed- up val ue of a
Max posi t i on i s the maxi mum of the val ues of i ts i mmedi ate successors and
si mi l ar l y, the backed- up val ue of a Mi n posi t i on i s the mi ni mumof the
val ues of i t s i mmedi ate successors, i . e. , at each node t he pl ayer to move
wi l l choose t he move whi ch i s most f avorabl e t o hi msel f . The mi ni max pro
cedure recursi vel y appl i es these two rul es unt i l t he stat i c val ues at the
l eaf nodes have been used t o generate a backed- up val ue f or the root node.
For exampl e, i n Fi gure 1.1 the backed- up val ues of p (1 ) , p( 2) , and p( 3)
are 3, -2 and - 10, r especti vel y and t he backed- up val ue of p, the root node,
i s 3. For a more compl ete di scussi on of the mi ni max procedure see Shannon
[1950] or Ni l sson [1970] .
We wi l l f requent l y use t he game of chess i n thi s paper to i l l ustrate
some of the practi cal i mpl i cat i ons and l i mi tat i ons of our anal ysi s. The
cl assi c exampl e of the l i mi tat i on of the mi ni max procedure i s i ts appl i ca
t i on to chess. Consi der the game tree for chess where the posi t i on p i s
def i ned by t he l ocat i on and i dent i ty of each pi ece on the board, the i dent i ty
of the pl ayer whose t urn i t i s to move, and hi stor i cal i nf ormat i on rel at i ng
to cast l i ng, en passant capt ures, and draws by repet i t i on. Suppose we ex
tend the chess game tree unt i l every l eaf node i s a wi n, l oss, or draw.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
8/56
- 3-
4
Fi gure 1. 1. A game tree wi t h branchi ng f actor 3and depth 2.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
9/56
- 4-
Then the mi ni max procedure coul d be appl i ed to thi s t ree to f i nd the
opt i mal pl ayi ng st rategy. However , the exponent i al expl osi on of the
"l ook-ahead11 t ree makes t hi s i mpossi bl e i n pract i ce. ( I t i s est i mated
40
that there are about 10 possi bl e checkers games [ Samuel , 1959] and about
10^ possi bl e chess games [Shannon, 1950] , but l ess than 10^ mi croseconds
per century. ) Theref ore, the l ook- ahead process i s typi cal l y cont i nued
down to some non- termi nal (and possi bl y f i xed) depth at whi ch the posi t i on
i s eval uated wi t h a l ess accurate eval uat i on functi on. I f the branchi ng
f actor , N, and the dept h, D, are both f i xed, then N bot tom posi t i ons are
generated i n the mi ni max search. Even usi ng i ncompl ete ( non- termi nal )
trees, the l ook-ahead t rees f or most game pl ayi ng programs are st i l l very
l arge. I n chess, f or exampl e, a typi cal val ue f or the number of l egal
moves f roma mi ddl e-game posi t i on i s 35. I f = , then the
number of bot tom posi t i ons, ND, whi ch must be eval uated usi ng si mpl y mi ni
max search i s 1, 500, 625. For , N = 42, 521, 875. Chess
pl ayi ng programs are expected t o sat i sf y the t i me const rai nts of tournament
pl ay: they are al l owed t wo hours of computati on t i me to make 40 moves. For
a t ree of si ze =, thi s woul d mean that on the average about 220
mi croseconds woul d be avai l abl e f or eval uat i on of each bot tomposi t i on i f
the mi ni max al gor i thmwere used, i ncl udi ng the tree- searchi ng overhead i n
vol ved i n reachi ng that posi t i on. The need to ef f ecti vel y reduce the si ze
of the tree to be searched i s apparent .
I n the remai nder of thi s paper we wi l l rest r i ct our at tent i on to Max-
trees, i . e. , game trees that maxi mi ze at the top l evel . We can do thi s
wi t hout any l oss i n general i ty because of the obvi ous mappi ngs that exi st to
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
10/56
- 5-
t ransformMi n- t rees toMax- t rees. For exampl e, consi der thei somorphi sm:
cp(x) - x. Thenby t hedef i ni ti on of the mi n and maxoperatorswe see:
max( x1, x2, . . . , xn) = - mi n( - x- , - x2, . . . , - x^= cp(mi n(cptx1), cp(x2) , . . . , co(xn>)
and
mi n( x1, x2, . . . , xn) - - max( - x- , - x 2, . . . , -x r)
= cp(max(cptx1), co(x2) , . . . , co(xn) )
Si nce these i dent i t i es can be appl i ed r ecursi vel y, anarbi t rary Mi n- t ree
canbeanal yzed byanal yzi ng thecorrespondi ng Max- t ree created bycompl e
ment i ngal l theval ues i n theMi n- t r ee, repl aci ng al l mi n' sbymax' s, and
repl aci ng al l max' sbymi n' s. Theonl y di f f erence betweenaMi n- t reeand
i ts associ ated Max- t ree i sthat al l backed- up (andstat i c) val ues i n the
Max-t ree wi l l be thecompl ement of thecorrespondi ng val ues i n the Mi n- t ree
2. THEALPHA-BETA PRUNI NG ALGORI THM
The al pha- beta al gor i thm i sequi val ent to themi ni max al gor i thmi n
that they both f i nd thesame best move f romposi t i onp andbot h wi l l assi gn
the same val ueofexpected advantage t o i t . Al pha- beta i s faster thanmi ni
max because i t does not expl ore some branchesof the tree that wi l l not
af f ect thebacked-up val ue. Theal gor i thm can be i l l ustrated wi t h thetree
of depth three i nFi gure 2. 1. Assumi ng that thesearchi ng proceeds i n a
depth- f i rst f ashi on f rom l ef t tor i ght and that theroot node i s a Max
node, thesuccessors of Mi nnode p( l ) are f i rst exami ned and themaxi mum
val ue 3 i sbacked up top( 1, 1) . Theval ue3 nowbecomes anupper l i mi t
(beta val ue) f or thebacked- up val ue ofnode p( l ) . At thi s poi nt thef i nal
val ue p( 1) i sunknown, but si nce p( 1) i s a Mi nnodewe doknow that i t s
val ue must be at most 3.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
11/56
pO);v( 1) - 3
3 2 5 -8 1 -1
| +1: posi t i on not eval uated because ofacutof f s,
0 : posi t i on not eval uated because of |3 cutof f s.
Fi gure 2. 1. Exampl e of al pha and beta cut of f s.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
12/56
- 7-
Next the procedure begi ns t o exami ne the successors of p( 1, 2) . When
p( l , 2, 2) i s eval uated t he l ower l i mi t (al pha val ue) f or the backed- up
val ue of the Max node p( l , 2) becomes 5. Si nce the al pha val ue of p(1, 2)
i s greater than the beta val ue of p( 1) ( =3) , p( 1, 2) cannot be t he l owest
val ued successor of p( l ) , and t hus there i s no need to eval uate t he re
mai ni ng successors of p( 1, 2) 0 That i s, Mi n wi l l not sel ect p(1, 2) because
Max can choose a branch l eadi ng to a hi gher val ue t han Mi n knows can be
achi eved wi t h p( l , l ) . Hence we have a beta cutof f at p( 1, 2, 2) . Addi t i onal
beta cutof f s occur at p( l , 3, l ) and p( 3, 2, 2) .
Af t er the bet a prunes at p( l , 2, 2) and p( l , 3, l ) occur , the val ue 3 i s
backed- up to p( l ) and becomes the l ower l i mi t (al pha val ue) f or the backed-
up val ue of node p. The procedure now begi ns to i nvest i gate the successors
of p(2). On eval uat i on of p( 2, l ) the beta val ue of p( 2) becomes 1. Si nce
thi s i s l ess than the al pha val ue (-3) of p, an al pha prune occurs at p( 2, 1)
Because of al pha cutof f s, nodes p( 2, 2) , p( 2, 3) , and p( 3, 4) , and thei r suc
cessors, are not eval uated. Note that onl y 15 bot tomposi t i ons are eval uate
by the al pha-beta procedure, whereas the mi ni max procedure woul d exami ne al l
28.
I n thi s exampl e t he al pha val ue used to obtai n the al pha cutof f s was
associ ated wi t h t he root node and t he cutof f s occurred near the bot tom l evel
of the tree. Not e that i f the tree i n the exampl e were one of greater
depth, the cutof f s at p( 2, l ) and p( 3, 3) woul d prune the potent i al l y vast
subt rees r ooted at p( 2, 2) , p( 2f3) , and p( 3, 4) . Fur t hermore, an al pha or
beta val ue may generate cutof f s at any node an even number of l evel s bel ow
i t . These are cal l ed deep cutof f s and a deep al pha cutof f i s i l l ustrated i n
Fi gure 2. 2.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
13/56
- 8-
Backed- up val ues: 3
Stat i cval ues:
x x
x| posi t i on not eval uated because of deepa cutof f
x posi t i on not eval uated because of shal l owa cutof f
Fi gure 2. 2. Exampl e of deep al pha cutof f s.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
14/56
- 9-
Beta cutof f s are anal ogous to al pha cut of f s, wi th t he rol es ofmi ni
mi zi ng and maxi mi zi ng reversed. The beta val ue speci f i es an upper l i mi t
f or the backed- up val ue of a Mi n node and i s used to generate cutof f s
among the successors of Max nodes at any l evel deeper i n the tree. Assum
i ng t hat the root node ( D O) i s a Max node, al pha cutof f s occur at even
l evel s and bet a cutof f s occur at odd l evel s.
I n order to formal l y def i ne the al pha- beta pruni ng al gor i thmdescri bed
above, we i nt roduce a few notat i onal conveni ences. Consi der the part i al
game t ree shown i n Fi gure 2. 3. We i dent i f y a node at depth d ^ D i n the
tree as p(T^), where i , someti mes denoted ( i ^ , i ^ ) , i s a vector of
l ength d whose components i.j , i 2, . . . j i i dent i f y the branch sel ected from
the nodes at successi ve depths i n the t ree al ong t he path f rom the root
node to p(T^). v(i^) i s the backed- up (f or an i ntermedi ate node) or stat i c
(f or a l eaf node) val ue associ ated wi t h node p( i ) .
To si mpl i f y subsequent subscri pts and summat i on ranges, we i nt roduce
the notat i on
, IK i fK i s evenLKL = 2L|J =. JK i fK i s oddLKJ = 2L SF I] + 1 =/ (2. 2) ] k-1 i f k i s even
Consi der the path f rom the root node to p( i ) . At l evel j , f or j and d eve
and 0 j < d, a maxi mi zi ng operati on i s i n progress and we have a l ower
bounda^(i^) on v( i ) , denoted the j - l evel al pha val ue, where
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
15/56
- 10-
depth
5 3 i 5 = (2, 3, 1, 4, 3)
Of ( l 5) = -1
0( i 5) =10
Fi gure 2. 3. A game t ree i l l ustrat i ng our notat i on f or the al pha- beta al gor i thm.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
16/56
- 11-
a j ( i d ) - p m a x { v ( i 1 v( i 1 , . . . , 2) , . . . ,
v( i 1, . . . , i j , i j +1- 1 ) } f or > 1 (2. 3)
for i J + 1 = 1
Si mi l ar l y, at l evel j ,f or j and d odd and 1 j < d, a mi ni mi zi ng operat i o
i s i n progress and we have an upper bound b ( i ) on v( i ) , denoted the j -
l evel beta val ue where
b. . ( i d) ^ m i n j V C ^ , . . . , ^ , ! ) , v(i j , , i ^ , 2) , . . . , v( i1, . , i ^ , i ^+1-
f or i ^ > 1 (2. 4)
for i J + 1 = 1
Fi nal l y, def i ne the greatest al pha val ue, or si mpl y al pha val ue as
( i d) = m a x { a 0 ( i d ) , a 2 ( i d ) a
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
17/56
- 12-
v( l j :> p( i j and d odda a
a beta cutof f occurs. A cutof f at node p0- d) means that the remai nder of
the subt ree rooted at p( i , . . . >i d- 1) > i . e. , p( i d>! s parent node, i s not
exami ned i n the mi ni max search.
The above di scussi on of j - l evel al pha and bet a val ues proves the fol l ow
i ng f undamental l emma.
>
Al pha-Beta Lemma. Let v ( i g) be the backed- up val ue of a game tree usi ng
the al pha- beta pruni ng al gor i thmand l et v ^^g) be the backed- up val ue of
the same game tree usi ng the mi n-max al gor i thm. Then
I t shoul d be noted that there i s at l east one cl ass of r i sk- f ree pruni ng
al gor i thms that i s not subsumed by t he al pha- beta al gor i thm. For exampl e,
consi der the case where a top l evel move i s f ound to l ead to a wi n. Usi ng
the al pha-beta al gor i thm the next branch woul d have to be expl ored to some
extent bef ore bei ng pruned; but i t i s cl ear that al l other branches at the
top l evel coul d be pruned i mmedi atel y. Thi s coul d, of course, be appl i ed
at any poi nt i n the t ree where a wi n f or the pl ayer to move i s f ound.
The use of al pha- beta pruni ng i n the mi ni max search reduces by a l arge
f actor the number of bot tom posi t i ons whi ch need to be exami ned, typi cal l y
Some care must be taken i n tne i mpl ementat i on of thi s al gor i thm. I n theSecond Annual Computer Chess Champi onshi p (Chi cago, 1971) a chess programusi ng t hi s al gor i thm di scovered a mate i n two moves and t ermi nated i ts search.Af ter the opponent moved, the programbegan t he search agai n, di scover i ngf i rst a mate i n three. I t i mmedi atel y pruned and made the f i rst move of thi ssequence, mi ssi ng t he possi bl e mate on the move. I t cont i nued f i ndi ng matesi n more than one move unt i l due t o another bug i t f i nal l y l ost the game.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
18/56
- 13-
by several orders of magni tude i n many game pl ayi ng programs. Previ ous
resul t s [Sl agl e and Di xon, 1969] have establ i shed the l ower l i mi t f or the
number of bot tom posi t i ons exami ned. The l ower l i mi t wi l l be achi eved i f
the stat i c val ues of the bot tom posi t i ons are i n "per f ect or der 11, i . e. ,
ordered such that every possi bl e al pha and beta cutof f occurs. I t can be
shown that i f per f ect order i s achi eved at every l evel , so that every pos
si bl e al pha or bet a cutof f occur s, then the number of posi t i ons at thebot
tomof the t ree of depth D and constant branchi ng f actor N i s:
D
NBP = 2N2 - 1 f or D even,po
D+1 D-1
NBP = N 2 + N 2 - 1 f or D odd.po
4
Thus f or = , NBP - 2449, whi ch di f f ers f rom35 - 1, 500, 625
by a f actor of 612.
Thi s very l arge rat i o of extremes i n per f ormance has i mportant i mpl i ca
t i ons f or searchi ng l arge game trees. The perf ormance of the al pha- beta
procedure may be f urther i mproved by the i ncorporat i on of heur i st i cs whi ch
reorder the nodes of the tree i nto a "more perf ect 11 arrangement . Var i ous
techni ques of f i xed and dynami c order i ng of nodes at i ntermedi ate l evel s
of the t ree are avai l abl e [e. g. , Sl agl e, 1963] . The rat i onal e f or t hese
types of heur i st i cs i s based on a correl at i on between the stat i c val ues of
nodes at i ntermedi ate l evel s of the tree and the f i nal backed- up val ues ob
tai ned f or these nodes. Thi s means that the nodes may be reordered before
eval uat i on of thei r subt rees to more cl osel y approxi mate per f ect order i ng an
thus obtai n a hi gher rate of pruni ng. The eval uat i on of the expected gai n
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
19/56
- 14-
over the si mpl e al pha- beta al gor i thm obtai ned by t he use of such heur i st i cs i s
compl i cated by t he f act t hat , whi l e the perf ect order i ng r esul ts provi de a great
est l ower bound f or the number of bot t om posi t i ons eval uated, the upper bound
of N i s unreal i st i c because i t i s great er , of ten by several orders of magni tude
than the number of bot tom posi t i ons eval uated wi t h the unmodi f i ed al pha- beta
al gor i thm.
Knowl edge of the expected val ue of the number of bottomposi t i ons
eval uated i n a l ook-ahead t ree usi ng al pha- beta pruni ng shoul d be usef ul
because the expected val ue provi des a much t i ghter upper bound f or the
average perf ormance of the t ree- searchi ng procedures than does the upper
bound gi ven by t he mi ni max al gor i thm. Thus, when eval uat i ng the ef f ect i ve
ness of heur i st i cs to be used i n conj uncti on wi t h t he al pha- beta al gor i thm
one mi ght determi ne not onl y how cl osel y the resul t i ng per f ormance approach
es the l i mi t under perf ect order i ng, but al so how much bet t er (or worse!)
the resul t i ng per f ormance i s compared wi t h t hat of the unmodi f i ed al pha- beta
al gor i thm.
3. A PROBABI LI STI C MODEL OF GAME TREES AND SOME I NI TI AL OBSERVATI ONS
I n order to draw some quant i tat i ve concl usi ons about the per f ormance of
the al pha- beta procedure i t i s necessary t o preci sel y model game t rees.
However, our purpose here i s to keep the model suf f i ci ent l y si mpl e so that
anal yti cal techni ques can be appl i ed t o our study of the perf ormance of the
al pha- beta procedure.
Our model i ncl udes three si mpl i f yi ng assumpt i ons.
1. Let us assume our game trees are compl ete t rees of depth D wi t h
constant branchi ng f actor N, e. g. , Fi gure 2. 3 where D = 5 and N = 4.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
20/56
- 15-
Note that there are al ways bot tom posi t i ons, and i n general
dN nodes at depth d i n the game t ree.
2. To study the probabi l i st i c propert i es of the game trees we must
provi de a model of the stat i c val ues assi gned to the bot tomposi
t i ons. A si mpl e yet appeal i ng assumpt i on to make i s. that the
val ues, v( i p) , of al l N bot tom posi t i ons are i ndependent , i den
t i cal l y di str i buted ( i i d) r andomvari abl es wi t h arbi t rary di s
t r i but i on f uncti on VD( x ) .
3. The onl y requi rement on VD( x ) , i n addi t i on to the standard prop
er t i es of a cumul at i ve di st r i but i on functi on [cf . Parzen, 1960] ,
i s t hat i t be cont i nuous. I n other wor ds, we requi re that the
probabi l i ty t hat the val ue of a l eaf node i s preci sel y x i s van-
i shi ngl y smal l , to el i mi nate t he possi bi l i t y of two or more nodes
havi ng the same val ue.
The second and thi rd assumpt i ons can be equi val ent l y restated by model
i ng the l eaf nodes as a randompermutat i on of the ordered l i st of val ues;
i . e. , each of the NI assi gnment of val ues to the nodes i s equal l y l i kel y.
Not e that the actual val ues of the N bot tom posi t i ons i s not of i nterest
when st udyi ng the behavLDr of mi ni max searchi ng, and the al pha-beta procedur
i n par t i cul ar , but onl y thei r rel at i ve order i ng. Our previ ous di scussi on o
the t ransf ormat i on of Mi n- t rees to Max-t rees i mpl i es that the probabi l i ty
of exami ni ng a part i cul ar bot tom posi t i on i n a Mi n- t ree wi t h cont i nuous
di st r i but i on Vp( x) i s equal to the probabi l i t y of exami ni ng the cor re
spondi ng bot tomposi t i on i n the associ ated Max- t ree wi t h di st r i but i on
Vp(-x). Thus, si nce the behavi or of the search i s i ndependent of the
speci f i c di str i but i on (as l ong as i t i s cont i nuous) , each of the subsequent
resul ts about Max-t rees wi l l be t rue of Mi n- t rees aswel l .
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
21/56
- 16-
We can now make t he obvi ous but i mportant observat i on that the val ue
of a node at any l evel i n the game t ree i s i ndependent of the val ues of the
other nodes at the same l evel * I n addi t i on, si nce the l eaf nodes are i i d
random var i abl es, i t f ol l ows f rom the structure of our game t rees, i . e. ,
uni f ormdepth at al l bot tom posi t i ons and constant branci ng f actors, that
al l the nodes at any l evel i n the t ree are i i d random var i abl es. I t i s
i nterest i ng to consi der the actual di st r i but i on of the val ues of the nodes
at an arbi tr ary l evel . I t f ol l ows f rom f i rst pri nci pl es i n order stati sti cs
that the di st r i but i on f uncti on of the maxi mum of n i i d random var i abl es wi t h
di str i but i on funct i on F( x) i s [F (x)] n and the di st r i but i on f uncti on of the
mi ni mumof n i i d random vari abl es wi th di st r i but i on f uncti on F( x) i s
1-[1-F(x)] n. Hence:
VQ( x) = [ V x) ] * ,
V x) = 1 - [1 -V2(x ) ]
N
,
V, ( x) = [ V2( x ) ]N;
and i n general :
Vf c(x) = V +1( x ) , f or k=0, 2, . . . , LD- 1J e ( 3. 1)
Vf c(x) ^+ 1 ( x ) , f or k=1, 3, . . . , LD- 1j Q (3. 2)
where F( x) denotes the survi vor f unct i on, i . e. , F(x) = 1- F( x).
To i l l ust rate the rel at i on of the di st r i but i on of the nodes f romone
l evel to the next, the di st r i but i on f uncti on at al l the l evel s i n the game
tree of Fi gure 2. 3 are shown i n Fi gure 3. 1. The val ue of the l eaf nodes
are assumed t o be uni f orml y di st r i buted over the uni t i nterval i n Fi gure 3. 1,
but thi s i s onl y f or i l l ustr at i ve purposes; as stated bef ore, V D (X ) c a n he
any cont i nuous di st r i but i on f uncti on.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
22/56
- 17-
Fi gure 3. Cumul at i ve di st r i but i on f uncti on of val ues of nodes i ngame t ree wi t h .
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
23/56
- 18-
4. THE PROBABI LI TY OF EVALUATI NG A NODE I N THE GAME TREE
We are i nterested i n the stat i st i cs concerni ng t he number of bot tom
posi t i ons eval uated i n an al pha- beta search of a game tree. We wi l l start
by f i ndi ng the probabi l i t y t hat an arbi t rary node wi t h i ndi ces i ^ i s ex
ami ned by t he al pha- beta procedure; cal l thi s probabi l i ty of exami nat i on
Pr{i d}.
To f i nd Pr[ i } we f i rst consi der the path f rom the root node to p( i ) .At l evel j , f or j a non- negat i ve, even i nteger l ess t han d, a maxi mi zi ng
operat i on i s i n progress, we have a l ower bound on v ( i ) , i . e. , a i ) ,
and the di st r i but i on functi on for the j - l evel al pha val ue i s
A. (x) = [V ( x ) ] l j + 1 \ (4. 1)3 9 j +1 J
As i . approaches N, the f ormof A. . (x) approaches V . ( x ) .
Si mi l ar l y, at l evel j , f or j a posi t i ve, odd i nteger l ess t han D, a
-*
mi ni mi zi ng operat i on i s i n progress, we have an upper bound on v ( i ) , i . e. ,
b. ( i , ) and the survi vor f unct i on f or the j - l evel beta val ue i sJ d
B. . " (x) - [ V- . - C x ) ] 1 ^ 1 \ (4. 2)
Note that the j - l evel al pha and beta val ues associ ated wi t h i ^ are
i ndependent but not i dent i cal l y di st r i buted random vari abl es and thedi s
t r i but i on funct i on of cKi ) i s
Arf (x) = An (x) A (x). . . A (x) (4. 3)0 , 1 , 2, i 3 l d- 1^,1o
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
24/56
- 19-
and si mi l arl y the survi vor f uncti on ofP dd )i s
B-* (x) - B- . (x) B (x). . . B. . . (x) (4. 4)1* 12 3 j l 4 L d" 1 J o 1LdJ e
We can now prove several f undamental propert i es of the al pha- beta
pruni ng al gor i thm.
Theorem 1. Node p( i d) i s exami ned, i . e. , not pruned, by the cHS pruni ng
al gori thm i f and onl y i f
of(id) < P( i d) . (4. 5)
Proof . Fi r st , suppose
I n other wor ds, i f p( i d) i s not exami ned, an al pha or beta cutof f has
occurred; the candi dates f or p(i *) are shown i n Fi gure 2. 4. I f we con
si der the al pha cutof f case, Eqn. (4. 6) , we see
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
25/56
Fi gure2. 4
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
26/56
- 21-
si nce bj , (Tj) i s the mi ni mum of the i -1 successors of P(*-j ] ) Cl ear l y
PTFJ.,) , (1 (4. 9)
by def i ni t i on of the bet a val ue, Eqn. 2. 6. FromEquat i ons ( 4 . 6 ) , ( 4 . 8 ) ,
and ( 4. 9) i t f ol l ows that
ati^j* PTFJ-I> ( 4 - 1 0 )
and f romEqns. (2. 5) and (2. 6)
of(i d) *P( i d) (4. 11)
whi ch cont radi cts Eqn. (4. 5) . By a preci sel y anal ogous argument our second
case, Eqn. ( 4. 7) , al so l eads to Eqn. ( 4. 11) , and hence a cont radi ct i on.
Now i t remai ns to be shown that i f p(i ) i s exami ned, then Eqn. (4. 5)
must f ol l ow. Agai n proof by cont radi cti on provi des the si mpl est argument ,
i . e. , suppose
( i d) * B(i d) . ( 4. 12
I t f ol l ows f rom thi s i nequal i ty t hat there must exi st aj and ak such
that
bj (V * a k (V - ( 4 - 1 3 )
Supposek>j;then t here exi st s a nodep(T +,*) such that
v ( T k + I * >= V V - ( 4 - 1 4 )
However, the above t wo equati ons guarantee a beta cutof f no l ater than
p( i k+1*) and t hi s cont radi cts the assumpt i on of no cut of f .
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
27/56
- 22-
I f k < j , by a preci sel y anal ogous argument we get an al pha cutof f ,
agai n a cont radi cti on,
Now that Theorem 1 has been f ormal l y presented i t may be hel pf ul to
provi de an i ntui t i ve descr i pt i on. Theorem 1 says that a node i n a game
tree i s exami ned i f and onl y i f the associ ated upper bound (beta val ue) i s
greater than the associ ated l ower bound (al pha val ue) . Not e that i n thi s
paper we have def i ned al pha and beta val ues f or al l nodes i n the t ree, not
j ust those nodes exami ned by the al pha- beta procedure.
The next theorem i s the cent ral resul t of thi s sect i on: an expressi on
f or the probabi l i ty of eval uat i ng an arbi t rary node i n the game t ree.
Theorem2. Let A-+ (x) and (x) be the di st r i but i on f unct i ons of the al pha
J J -and bet a val ues, respecti vel y f or a node p( l ) at depth d i n a game t ree.
Then i f i . > 1 f or some j {2, 4, ,LdJ }:
(a) Pr{i d} = f Bj (z) dAj (z)-c o d d
and i f i j > 1 f or some j 6 { 1, 3 , . . . , L dJ q } :
(b) Pr{i , } = r A? (z) dBj (z)d J -c o^ d ~*d
and i f i . = 1 for al l j :J
(c) Pr{i d} =1 .
Proof . Fi r st , par t ( a) . FromTheorem 1 we know that the statement "posi
t i onp(i , ) i s not pruned11 i s equi val ent to the statement ) < B( i ) "
and so:
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
28/56
- 23-
Pr{i d} = Pr{(y(i d)
(Note: the condi t i on cKi ) = z i s def i ned onl y i f some el ement of i ^ wi th
an even i ndex i s greater than 1. )
-o o d d
-o o d d
The proof of par t (b) i s anal ogous to the above proof f or part ( a) . Part
(c) i s obvi ous, si nce the f i rst l eaf node must al ways be eval uated.
5. THE EXPECTED NUMBER OF BOTTOM POSI TI ONS
I n order to der i ve the expected number of bot tom posi t i ons E[NBP^ ]
eval uated i n a tree of depth D and branchi ng f actor N whi ch conf orms to
our model , we t ake advantage of the l i near i ty of the expected val ue operat or ,
i . e. , E[ Exi ] = SE[ xi ] . Hence E[ NBP D ] i s equal to the sumover the set of
al l bot tom posi t i ons of the probabi l i ty that the bot tom posi t i on i s eval uated,
i . e. ,
E[NBP ] - S E . . . S PRFL} (5. 1)w , u l t l i 2 N
and we may compute Pr i j usi ng Theorem2.
To i l l ust rate the method we wi l l f i rst eval uate E[NBP 9 ] . Fi rst con-N, Z
si der the case for i 0 > 1.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
29/56
- 24-
Pr {i ) = - j' " A-+ (z) df j ( z) (f romThm. 2b)1 _oo
2
- - f V 1 (z) dV2 (z) (fromEqns. 4. 1- 4. 4).CO
i . -l i 9- 1- - J* [ l - V z) ] 1 dV2
z ( z) (f romEqn. 3. 2)-00
We may now perf orm the subst i tut i on u V2( z ) , el i mi nat i ng the speci f i cdi s
t r i but i on of bot tomposi t i ons.
Pr i i - j =- I 0- u ) d uz ' 1
i . - l 1
= ( I - x) d xJ o
i - 1 i -1 - g 1
J o
i -1 i 2 - l
4 - 3 ( 1 , , - f - ) ( i 2 > D
where 0( x, y) =F ^ ^ ^ , the beta f unct i on.
Si mi l ar l y we can f i nd t he val ue of Pr {i 2) f or i 2 = 1 and i > 1 f rom
Theorem2a.
Pr {i2
) = f & (z) d (z)-o o 2 2
f V 1 ( z) d V, (z)2
.00
For i 0 85 1 we have
Pr{i 2} =f d V*1 ' ( z )
L 2 i . -l
V1 1 00.00
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
30/56
- 25-
by the f undamental theorem of cal cul us. Theref ore
Pr{i 2} =1 ( i 2> 1, i 2 = 1)
By Theorem2c, Pr{( l , 1) } = 1.
Thus
N N N i -1 iE[NBP 2 ] = 1 + 2 1 + S L - | ^
N , /
1 2 i2=2
N 1 N
. N- l NN + N 1 . S5>
1=1 j =1
, N-l N i - iN +J E i E F u3" ' ( l - u ) M du
i =l j =l 0
1 N- l . -1 / NN + 2 i | ' ' ( l - u) N ( SuJ - ' ] duN I=l 0 VJ= 1
1 N _ 1 l n " 2 n
N + i 2 i f ( l - u) N (1-u ) duN I=l JO
E[ NBPN) 2] = N + V j i j - [ *
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
31/56
- 26-
Thi s f orm i s qui te adequate f or comput i ng the expected val ue over the range
of branchi ng f actors useful i n game pl ayi ng programs. For smal l val ues of
N, E[NBP 9 ] was computed exactl y usi ng MACSYMA, a symbol i c mani pul at i onN, Z
programdevel oped at MI T [ Bogen, et al . 1972] . These val ues are presented
i n Tabl e 5. 1.
Next we wi l l eval uate Pr f i } f or arbi t rary dept h. A f ew prel i mi nary
def i ni t i ons and l emmas wi l l suppl y the necessary f oundat i ons.
Fi rst we def i ne the operator T( f , k) f or a f uncti on f and non- negat i ve
i nteger k as f ol l ows:
r i f k = 0T(f , k)
l - [ T( f , k-1) ] N i f k > 0
For exampl e, T( V3( x ) , 2) = 1-[T(V3(x ) , 1)]
= l - [ 1- [ T( V3(x) , 0) ]N] N
N N
Lemma 5. 1a
Lemma 5. l b
Lemma 5. l c
Lemma 5. I d
Vk
Vk ( x )
T( VD( x ) , k) , D even, k
T( VD( x ) , k ) , D odd, k
T( VD( x ) , k) , D even, k
T( Vp( x ) , k ) , D odd, k
1, 3, 5, . . . , D-1
0, 2, 4 D-l
0, 2, 4, . . . , D
1, 3, 5, . . ,D
Proof : We wi l l prove 5. 1a by i nduct i on on k. The other proof s are the same.
For k 1, D even, we have f rom Eqn. 3. 2
Vi ( x )
Vi ( x )
V D- 1 ( X )
vZ(x)
1- Vj (x)
T( VD( x ) , 1)
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
32/56
- 27-
1 1
Tabl e 5.1. E[ NBPJN, 2
E[NBP . J > N B P 2 C 2 )
3
5 2 1
N B P 2 C 3 )
7 0
5 4 7 0 3 3
N B P 2 C 4 )
4 5 0 4 5
1 7 2 0 2 9 1 1 6 9
N B P 2 < 5 )
9 7 3 4 9 6 1 6
1 4 7 8 6 0 0 1 0 1 7 7 7 1
N B P 2 < 6 >
6 1 7 1 0 9 2 0 0 4 0 0
1 4 8 3 6 3 4 2 7 3 4 3 1 5 2 7 6 1 7
N B P 2 C 7 ) -
4 7 9 1 3 4 8 9 5 5 2 3 4 9 9 8 0
1 2 5 2 6 1 5 1 4 5 6 3 8 0 4 3 8 0 9 7 0 6 7 2 6 9
N B P 2 C 8 )
3 2 4 0 8 6 3 1 6 9 1 4 1 5 0 8 4 0 8 7 4 8 2 5
6 0 6 3 0 1 9 4 2 4 9 2 9 1 7 2 5 1 2 6 4 9 1 1 0 1 9 2 4 9 7 7
N B P 2 ( 9 > . . . .
1 2 9 0 2 8 3 6 1 5 9 7 6 2 0 9 6 8 7 3 7 8 0 7 9 0 1 9 2 0 0
3 9 0 1 5 2 2 6 2 5 9 2 7 7 9 8 4 1 9 6 8 1 7 8 0 9 9 7 1 6 0 6 2 2 1 7 5 1 8 0 9
N B P 2 C 1 0 ) *
6 9 7 2 0 3 7 5 2 2 9 7 1 2 4 7 7 1 6 4 5 3 3 8 0 8 9 3 5 3 1 2 3 0 3 5 5 6 8
2 0 1 9 6 5 4 2 6 4 2 3 8 0 8 7 6 5 6 2 3 8 3 8 5 6 5 6 6 4 5 9 6 1 1 3 2 3 4 8 9 3 0 1 3 8 3 1 1 9
N B P 2 C 1 1 ) - - * '
3 0 8 1 5 2 1 7 6 7 6 5 3 8 6 3 5 0 5 8 4 6 2 6 3 8 2 4 1 6 5 9 5 8 5 8 7 3 5 2 1 1 6 4 8 8 0 0
NBP2 ( 12) =?29^I5234423499941_235877
26468917348837676265384815256420322119583790673790618350""
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
33/56
- 28-
Assume , . (x) = T(\L(x), k*) f or a part i cul ar odd k*. Then
VD- k * - 2 ( x ) - 1" >- k*- 1( x ) ( f r m E q n * 3 , 2 )
1 - ( 1 - V D- k * - l ( x ) ) N
- 1- ( 1-VJJ_k*(x))N (f romEqn. 3. 2)
l - [ 1- TN( VD( x ) , k* ) ]N
=l - TN( VD( x ) , k*+l )
= T( VD( x) , k*+2) , provi ng the i nduct i on step. I
We now observe that i f i 1 f or m 2,4, . . . , | .DJ , then Theorem2a maym e
be appl i ed di rectl y.
Pr{i _} = f By ( z ) dAy ( z )
F N B . . ( z ) d( N A ( Z ) )- j&=2, 4, . . . , LDJ e
X" ' k=1, 3, . . , , LDJ o K" '
i.-l i , -1j 1 " n V
&
( z ) d ( n VK
(ZJ 6=2,4 |DI k- l , 3, . . . , LDj
o
V1
f d( n V ( z) , si nce i 1 f or- k=l , 3, . . . , LDJ o
K I even *
V ,00 '
II V ( z ) I b y the Fundamentalk=1, 3, . . . , LD] 0 -
00Theoremof Cal cul us.
Pr{i D} = 1 f or i ] = i . = . . . = U = 1. (Thm. 2c)
.'. Pr{i n} = 1 for i 9 = i ^ = . . . = i | D ] =1 and i 1 for some odd m.J e
For the rest of the devel opment we wi l l assume i m > 1 for some even m.
We are now ready to consi der Pr {i D} f or arbi t rary depth D. FromTheorem
2b we have
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
34/56
- 29-
-oo D D
- - T n \ , (z ) d( n B , . ( z ) )k=1, 3, . . . fLDJ o
K_ l j 2, 4, . . . , LDJ e*-1
i . - l i . -l- - T n v k ( Z) d( n v * ( z
k=l , 3 LJ)J J 2, 4,...,LDJ *o e
As i n t hecase f or D 2 ,wewi sh toperf orma subst i tut i on whi ch wi l l
el i mi nate theunder l yi ng di str i but i on. For Dodd we canappl y l emmas5. 1b
and5. I d:
Pr{i }- - p n [T(V( z ) , D- k ) ] ^ \( n [T(V( z ) , D-D] 1*- k=l , 3 , . . . , | _Dj * = 2 , 4 , . . . , [ D J
o e
Substi tut i ngu V^(z)9 weobtai n
P r f L } - - ! 1 1 n [T(u, D- k) ] k d ( n [ T ( u , D- ja)] l A ) (5. 3)-1 i . -l
d ( n [T0 k=1, 3 [DJ * * 2 , 4 , . . . , LDJ
' e
f or D odd.
Si mi l ar l y, f or Devenweappl y l emmas5. 1a and 5. 1c:
i , -1 i . -Pr(i }- - J* H [ T(V ( z ) , D- k)] d( n [ T(V ( z ) , D- A) ] 1
- k=1, 3, . . . j&2, 4, . . . , [Djo e
(5. 4)1 i . - 1 i . - l
P r C l } - +J n [T(u, D- k) ] K d( [ T ( u , D - l ) ] ' ) , Deven.' 0k1, 3, . . . , [Dj 2, 4, . . . J D J
o e
Combi ni ng equati ons(5.3) and (5. 4) ,
pr {i D}=(-DY n [ K u . D- k ) ] ^1 d( n [ T(u, D- j t ) ] Xi \
' 0k=1, 3, . . . , [Dj tf2yUt...J DJo ^J e
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
35/56
- 30-
Di f f erent i at i ng the second product and observi ng that the termf or
whi ch i ^ 1 di sappear , we have
. i -1Pr{i n} - (- l )
Df II T (u, D- k) )0 k = 1 ' 3 LDJ o , .
S [( n T * (u, D- i )) dTm ( u, D-m)]m=2, 4, . . . , LDj J, 4. . . . , | DJ
i {1 6 Jfcf m .m
(5. 5)
We eval uate the der i vat i ve ofEqn. 5. 5 wi t h the fol l owi ng l emma.
1 i f k = 0k-1
nn=0
Lemma 5. 2; -r- T( u, k) = < k-1 .d U n T ' ( u, n) i f k > 0
Proof (by i nducti on onk) ;
3JT < U '0 )
" '
du
* k -2d * k- 1 N-1 *
Now assume -rT(u,k - 1) = (-N) II T (u, n) f or some f i xed k Thend U n=0
d * d N *
N-1 * d *= -N T W ' (u, k - 1) ^ T( u, k -1)
* k -1= ( - N) k n ^( u . n )
n=0
Appl yi ng thi s l emma to Eqn. 5. 5 we obtai n
i -1 i - - 1
Pr{J n}- ( - UYC n Tk (u, D-k) ) S [( II T * (u, D-A))
D ' 0 k=l , 3, . . . , | _Dj m=2, 4, . . . fLDJ eA=2, 4, . . . , LDJ e i f 1 1 f m
mi -2 D D-m-1 -
( i - 1) Tm (u, D-m)( -N) " n ir' Oi . n) ) ] dum n0
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
36/56
- 31-
Movi ng thesummat i on to thef ront , wehave
m=z,tt, . . . , [DJ 0k=l naO
**^1 k / m
Col l ecti ng termsandnoti ci ng that ( - l ) 20" 01 = 1, we f i nal l y have
2, 4, . . . , ] 0 k=0 du (5. 6)
where Pk( m) = 7
0 i f i =1m
i D. k+N- 2 i f k < D-m
i D_k- 2 i f k = D-m
i D_k- 1 i f k > D-m
LD 4
JD i f D i seven
J D-1 i f D i s odd
and i > 1 f or some evenm.m
Eval uat i on ofEqn. 5. 6 requi res i ntegrat i onoff uncti onsof thef orm
1 k j
I k ( j rj 2 J k> - J H Tn( u, k- n+l ) .
0n=l
For exampl e, i f i / 1
1 i +N-2 i -2 i -1Pr{i }= ( i 9- l ) NJ* T ( u,0)T (u, l ) T
1 ( u,2)du* 0
, i +N-2 i -2 KT i . -l= ( i - 1) Nf1 u3 (1- uN) 2 ( l - ( l - uN) N) 1 du
( i 2- l ) N 1 3 ( ^ - 1 , 1 2 - 2 , 1 ^ - 2 ) ,
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
37/56
- 32-
These i ntegral s may be eval uated exactl y usi ng the recurrence rel at i ons of
the fol l owi ng l emma.
Lemma 5. 3:
V1
j 2+i
j
i f k = 1
i f k - 2
'1S (-0 ( J 2+AN, J 3, . . . , J k) i f k > 1.
Proof : = [ u du* 0
I 2( j , , j 2) - fV-uV1 u2du
1 V1
k j 4
k 1 K 0 n=1du
= I*1 T ^ (u, k) n T*"(u, k-n+1) duJ
' 0 n=2
1 N j l k j k- (" (1- TN( u, k- 1) ) ' n T (u, k- n+l ) du
J 0 n=2
= f Z ( - 1 ) A( ) [ TN( u, k- 1) ] A n TJ k( u, k- n+1) du
k j ,
0!F0n=2
(f romthe Bi nomi al Theorem)
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
38/56
- 3 3 -
S 1("D f!1
) ^ ( u. k - l ) N TJ k( u, k- n+1) dui -0 *' 0 n=2
i ^(2i) A - i v - ^ Vj&=0
I
As another exampl e of the method, we present the di f f erent cases f or
D = 4 and arbi t rary N.
Pr{i j = 1 f or i j - i i j i l f romThm. 2c.
Pr{i , }1 for i 9=i ,=L f romEqn. 5. 2.
i i v 1 v 2 i - ^ + N - 2
Pr{i , } = a , - D i r r , T ' (u, 3) TZ (u, 2) T (u,L)du0
- (IJ-DN2 ( 1 1, 12- 2, 1 - 2, 0) i f i 4=L and 1 2/ 1
Pr{i 4} = ( i 4-L) I 4( i r 1, 0, i 3-L, i 4- 2 ) i f i 2=L and ^ J 1
Pr{i 4} =(IJ-DN2 I 4( i RL, i 2- 2 , i 3+N- 2, i 4+N- 2) +
+ ( i 4-1 ) I 4( i RL, i 2- 1, i 3- 1, i 4- 2) i f 1 and i ^L.
N N N NThen E[NBP , ] - 2 2 2 2 Pr{i . },
i =1 i =1 i =1 i =11 2 3 4
and I 4( J 1, J 2J 3J 4) i s eval uated wi t h Lemma 5. 3.
I t i s possi bl e t o el i mi nate one summat i on f rom thi s method of eval uat
i ng E[ NBPN D ] . We observe that
P r [ 7 l > } = 9 L 2 m i V V V " - ' W >m=2, 4, . . . , | _DJ e
where > 1 f or some even m, t f c= PD_k( m) - i k (Eqn. 5. 6) , and I D i s computed
wi t h a D-2- f ol d summati on. However , the summati on on the i ndex i-j may be
combi ned wi t h the f i rst reduct i on of Lemma 5. 3.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
39/56
- 34-
i ,-". pr - 1, L2,4>L, LDJ e( v, ) i D
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
40/56
- 3 5 -
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
41/56
- 3 6 -
7 1 9
E [ N B P J = N B P 3 C 2 ) -
2 , 3
' 1 0 5
5 7 8 7 9 3 8 9 7 9 1
N B P 3 C 3 )
2 9 7 4 5 7 1 6 0 0
1 0 5 8 6 1 2 1 3 4 8 2 7 2 0 8 0 2 3 1 6 8 8 7 9 6 7
N B P 3 C 4 )
2 6 3 8 9 8 8 5 8 0 5 8 6 6 5 6 8 4 7 1 2 3 5 7 5
NBP3 ( 5 ) = 12 1-^I?Z51Z2457756H97 8 7 6 8 5 1 _ 26 9 3 7 8 7 8 7 6 2 3 8 7 5 9 0 4 1 7
1 7 4 1 3 6 0 2 5 7 6 2 2 4 0 9 3 1 6 3 8 2 8 2 9 6 9 7 4 8 1 7 3 4 5 9 0 6 1 1 9 9 7 1 6 4 8
r ~\ 7 7 5 0 3E [N BP J = N B P 4 C 2 ) - - - - - -
' \ 6 4 3 5
3 7 9 7 1 7 6 7 4 9 8 0 5 9 8 5 7 0 5 8 3 3 0 8 7 2 6 5 7 0 0 2 3
N B P 4 ( 3 > .
8 4 0 0 3 7 7 9 4 7 3 6 9 5 8 8 9 4 3 6 9 9 2 4 1 7 2 6 4 0 0
Tabl e 5 . 2 . Exact val ues for E [ N B P n f or D = 3 , 4 .
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
42/56
- 37-
the val ues are drawn, we see that the expected number of move generati on f or
a depth D search i s si mpl y t he sumof the expected number of non- termi nal
posi t i ons at each l evel , i . e. ,
E [ N M G N > ] ) ] = 1 + V E [ N B P N > I ]
6. APPLI CATI ON OF THE GAME TREE MODEL TO CHESS
Several assumpt i ons have been made to si mpl i f y t he anal ysi s of the
model whi ch do not conf orm to the propert i es of game t rees i n general .
Fi rst , the model assumes a f i xed branchi ng f actor and f i xed depth. Many
game pl ayi ng programs ( though not al l ) use searches of var i abl e depth and
breadth. Second, the val ues of the bot tomposi t i ons have been assumed
to be i ndependent ; i n pract i ce there are strong cl uster i ng ef f ects. For
exampl e, i n a chess programwi t h an eval uat i on f unct i on whi ch depends
st rongl y on materi al , a subt ree whose parent move i s a queen capture wi l l
have more bot tom posi t i ons i n the range correspondi ng t o the l oss (or wi n)
of a queen than wi l l subt rees whose parent move i s a non- capt ure. The
f i nal assumpt i on i s t hat the probabi l i ty that two bot tom posi t i ons i n the
t ree wi l l have the same val ue i s zero ( cont i nui ty assumpt i on) . I n pract i ce,
game programs sel ect the val ue of the termi nal posi t i on f roma f i ni te (and
somet i mes smal l ) set of val ues.
No attempt has been made to model modi f i cati ons to t he basi c al pha-
beta search, such as f i xed order i ng, dynami c order i ng, or the use of
aspi rat i on l evel s. Thi s model shoul d be vi ewed as an upper bound i n the
sense t hat any program can perf orm thi s wel l i f the moves are no worse t han
randoml y ordered.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
43/56
- 38-
I n thi s secti on we wi l l i nvest i gate the ef f ects of these assumpt i ons
by compari ng the predi cted average search ef f ort wi t h the observed searches
of a chess program. Si nce several exi st i ng chess programs use a f i xed
branchi ng f actor (sel ecti ng the N best moves accordi ng to a stat i c eval ua
t i on funct i on) and f i xed depth (at tempt i ng to resol ve i ssues of qui escence
wi th a stat i c anal ysi s), we wi l l concent rate on the i ndependence assumpt i on
and the cont i nui ty assumpt i on.
I n order to assess the expected ef f ect of the cont i nui ty const rai nt ,
we rel ax i t i n the model so that the val ues f or the eval uat i on functi on
are chosen f romR equal l y l i kel y di st i nct val ues. I f R88 1, we have, i n
ef f ect , per f ect order i ng, si nce equal val ues wi l l produce a cutof f . As
R approaches i nf i ni ty the expected number of bot tomposi t i ons i s predi cted
anal yt i cal l y by thi s paper . The var i at i on of the number of bot tom posi t i ons
wi t h R i s shown i n Fi gure 6.1 f or D 3; these curves were generated usi ng
a Monte Car l o si mul at i on.
The chess programused f or compari sons was a modi f i cat i on of the
Technol ogy Chess Program [Gi l l ogl y, 1972] . The Technol ogy Program (Tech)
i s a "brute f orce" programwhi ch i nvest i gates al l l egal moves to a f i xed
depth; al l chai ns of captures f rom these bot tom posi t i ons are expl ored. The
termi nal posi t i ons are eval uated onl y wi t h respect to materi al , where a pawn
i s consi dered to be wort h 100 poi nts, kni ght and bi shop 330, rook 500, and
queen 900. A number of posi t i onal heur i st i cs are appl i ed st at i cal l y at the
top l evel , and var i ous modi f i cat i ons are made to the basi c t ree search.
Tech was modi f i ed f or thi s anal ysi s to search t rees of f i xed depth
and branchi ng f actor (the branches to be exami ned sel ected randoml y) , and
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
44/56
- 39-
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
45/56
- 40-
the t ree search modi f i cat i ons were del eted. I n addi t i on to Tech' s st andard
eval uat i on f unct i on, an opt i onal eval uat i on term f or mobi l i t y was programmed.
Thi s term i s useful f or the anal ysi s, si nce i t i ncreases the ef f ect i ve range
of eval uat i on and decreases the degree of correl at i on i n subt rees. Most
chess programs have eval uati on f unct i ons whi ch are consi derabl y more compl ex
than Tech' s.
I n order to ensure a r easonabl e mi x of openi ng, mi ddl e and endgame
posi t i ons a compl ete game was anal yzed, consi st i ng of 80 posi t i ons (Spassky-
Fi scher , Reykj avi k 1972, game 21) , Each of these posi t i ons was anal yzed by
the modi f i ed Tech programs f or D = 2, 3, and 4 over the ef f ect i ve range of
branchi ng f actors. Fi gure 6. 2 shows the anal yt i c r esul ts f or these para
meters wi t h the empi r i cal val ues obtai ned usi ng Tech' s standard eval uat i on
f unct i on. At a typi cal poi nt ( = ) , the observed r ange ( R) of
di st i nct bot tomposi t i on val ues i n the t rees var i ed bet ween 1 and 9, wi t h
medi an 5. Thi s agrees wel l wi t h Fi gure 6. 1. To demonst rate the ef f ect of
the i ndependence assumpt i on, these poi nt s were r e- run wi t h the programmodi
f i ed so t hat a val ue whi ch woul d r esul t i n a prune by equal i ty was randoml y
perturbed up or down. Thi s si mul ated an eval uat i on f unct i on that assi gns
uni que val ues f or al l the bot tomposi t i ons. The pertubat i ons changed the
val ue of the posi t i on by at most two poi nt s, si nce there are at most twoal phas or two bet as bei ng kept at any gi ven ti me i n a depth 4 t ree. Si nce
two poi nt s i s smal l compared to the val ue of a pawn (100poi nt s) , t he t i e-
breaki ng procedure does not si gni f i cant l y af f ect the correl at i on among posi
t i ons i n a subt ree. The systemat i c di screpancy between these poi nt s and
the anal yt i c curve must then be due to the assumpt i on of i ndependence.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
46/56
- 4 1-
BRANCHI NG FACTOR (N)
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
47/56
- 42-
I n Fi gure 6.3 we pl ot the anal yt i c curves wi t h t he data f romthe
eval uat i on functi on whi ch i ncl udes mobi l i t y as wel l as mat er i al . The
range i s much hi gher f or thi s eval uat i on f unct i on, so that the number of
bot tomposi t i ons i s consi derabl y hi gher than the unmodi f i ed versi on. The
range (R) at = f or thi s versi on var i ed between 12 and 82, wi t h
medi an 43. Si nce the ti ebroken poi nt s are onl y sl i ght l y hi gher , i t i s cl ear
that the range i s cl ose to the ef f ect i ve maxi mum range f or that eval uat i on
f uncti on. I t i s of i nterest to not e that the t i ebroken poi nts l i e al most
on the anal yti c l i ne, i ndi cat i ng t hat the i ndependence assumpt i on i s more
near l y correct f or thi s eval uat i on f uncti on.
Compar i son of these graphs i ndi cates two ways i n whi ch t he eval uati on
f uncti on af f ects t he number of bot tomposi t i ons eval uated: (1) as the
range of the eval uat i on f unct i on i ncreases, the number of bot tomposi t i ons
i ncreases; (2) as t he correl at i on among val ues i n the same subt ree i ncreases,
the number of bot tomposi t i ons decreases.
7. EMPRI CAL OBSERVATI ONS
For l arge val ues of N and D, the anal yt i c r esul t presented i n Secti on
5 i s i n i ts present f orm computat i onal l y i nf easi bl e. The growth of computa
t i on ti me i s governed by two f actors. Fi r st , the probabi l i ty t hat a bot tom
posi t i on i s eval uated must be cal cul ated f or each bot tom posi t i on i n the
compl ete t ree, aD- f ol d nested summati on f or D > 2. Second, the expressi on
f or thi s probabi l i ty i s i n the f orm of a recurrence rel at i on ( Lemma 5. 3)
whi ch reduces the i ntegral to a D-2- f ol d nested summat i on of eval uat i ons of
the beta f unct i on and bi nomi al coef f i ci ent s. The number of nest ed summat i ons
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
48/56
- 43-
BRANCHI NG FACTOR (N)
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
49/56
- 44-
f or the compl ete t ree i s thus 2D- 2. Thesi mpl i f i cati onof theanal yt i cal
resul t to a form f or whi ch thecomputati on eff or t grows at a si gni f i cantl y
sl ower rate remai ns anopen probl em.
I n thehope ofprovi di ng some resul t s ofpracti cal val ue, wepresent
the empi r i cal observat i ons whi ch f ol l ow. The set ofdata poi nt s upon whi ch
the empi r i cal observat i ons arebased were obtai ned i npart f rom theanal yt i cal
f ormul at i on and i npart f romaMont e Car l o si mul at i onof theal pha- betaal
gor i thm. I n the si mul at i on the stat i c val ues f or the l eaf nodes of thetrees
were drawn f romauni f orm randomprobabi l i t y di str i but i on of i ntegers i n the
35
i nterval (0, 2 - 1) . Thesampl e meanand standard devi ati on were obtai ned
from theresul ts of 1000i t erat i ons of theal pha- beta al gor i thm f or each
si zeof the tree. The sampl e mean t hus l i es wi t hi n the i nterval x + Rx^
N, D N, D
at the 95$conf i dence l evel , where x D i s thet rue meanand 0.008 < R < . 013
f or thepoi nt s col l ected i n the si mul at i on. Therat i o of sampl e st andard
devi at i on tosampl e meanwascomputed f or 173poi nt s (thepoi nt s der i ved f rom
the anal yti c f ormul at i on were al so si mul ated to obtai n thei r sampl e st andardde
vi at i ons) , and al l of t hese rat i os l i e i n the i nterval ( . 120, . 215) .
The val uesof l ogE[ NBP ] as a f uncti onof l og N f or f i xed D are
observed to beapproxi matel y a st rai ght l i ne (Fi gure 5. 1) . A l east squares
f i t of a str ai ght l i ne to these data gi ves anapproxi mati on whose root mean
square rel at i ve er ror i sabout . 004 f or theval ues exami ned. Thecor res
pondi ng approxi mati on to theexpect ed number ofbot tomposi t i ons takesthe
L
f orm E[ NBPN D l ^# N >wi t h an RMS rel at i ve error ofapproxi matel y. 015.
Furthermore, theval ues areobserved to beapproxi matel y l i near wi t h
respect to D. A l east squares f i t of a str ai ght l i ne to the
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
50/56
- 45-
val ues yi el ds t he approxi mat i on 1^ . 720D + . 227, wi t h an RMS rel at i veerror of approxi matel y . 007.
Tabl e 7. 1:
Depth1 1. 00
2 1. 12
3 1. 30
4 1. 39
5 1.51
6 1. 59
7 1. 67
8 1.71
9 1. 73
I t i s of i nterest to note that the growth rate f or the al pha- beta al gor i thm
( . 720D) i s about mi dway between t hat of perf ect order i ng (0. 5D) and mi ni max
search ( D) . An accurate si mpl e approxi mat i on to the val ues i s not read
i l y apparent . The val ues of f or D=l , 2, . . . , 9 are f ound i n Tabl e 7. 1. The
val ues l i e i n the range [1, 2] .
Thi s empi r i cal anal ysi s of the data avai l abl e to us suggest s an approxi
mat i on of the form E[ NBP^D l N# 7 2 0 D + # 2 7 7
. The l i mi ted number and
arbi t rary sel ecti on of the data poi nt s used i n thi s anal ysi s prevent us f rom
attachi ng hi gh conf i dence t o thi s approxi mat i on f or the general case, al
though f or the poi nt s f romwhi ch i t i s der i ved t he approxi mat i on i s excel l ent .
We do note t hat the approxi mati on agrees wi t h the boundary case D = 1, f or
72 0D + 27 7 QQ7whi ch E[ NBPN - N N * - W , and agrees f ai r l y wel l wi t h
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
51/56
- 46-
the boundary case N 1 f or whi ch E[NBP^ ] K .
Sl agl e and Di xon [1969] def i ne a measure of the rel at i ve ef f i ci ency
of a t ree- searchi ng al gor i thm:
l og NBPDR s ,
X l Q gm*m
where NBP *- s the expected number of bot t omposi t i ons exami ned i n a mi ni max
search and NBPx
i s the expected number of bottomposi t i ons exami ned by al
gori thmx.
The val ue of DR l i es between 0 and 1. As an exampl e of the i nterpre
tat i on of DR, DR .6 i ndi cates that the al gor i thmunder consi derat i on can
be used t o search a tree of depth 5 wi t h about the same ef f ort as that r e
qui red by t he mi ni max al gor i thm to search a t ree of depth 3. Usi ng the
empi r i cal l y der i ved approxi mat i on,
277 l o g *DDR Q w . 720 +
1
zL
+ -Ma-j 3w D D l og N
277For l arge N, DR Q w . 720 + - -r - .
Qf-P D
For the search wi t h per f ect order i ng [Sl agl e and Di xon, 1969] ,
D R
1 , l og 2D R P0 2+ D l og N *
For l arge N, DRp Q M j .
The depth rat i o DR i s useful as a measure of the ef f i ci ency of a t ree
searchi ng al gor i thmrel at i ve to the mi ni max al gor i thm. However , the ex
pected number of bot tomposi t i ons exami ned by t he al pha- beta al gor i thmpro
vi des a much t i ghter upper bound f or the expected perf ormance of a good tree-
searchi ng al gor i thm than does the number of bot tomposi t i ons exami ned by the
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
52/56
- 47-
mi ni max al gor i thm. Hence, i t woul d be more desi rabl e to redef i neDRsuch
that the perf ormance of the al pha- beta al gor i thm rather than the mi ni max
al gor i thm i s used as the standard of compar i son, i . e. ,
* l og NBPxDR s
xl og NBP
Qf-P
8. CONCLUSI ONS
We have proven that the probabi l i ty of exami nganode P(i^) inagame
tree wi t h cH3 pruni ngi s
Pr{i k}= - f A^( z ) dB ( z ) =fj^^ ^(z)>
>
where ( z) and ( z) are the di st r i but i on f unct i onsofcKi^) and PCi^)
respect i vel y. The i ntegral may be eval uated exact l y usi ng Eqn. 5. 6 and
Lemma 5. 3. Thi s f ormul a i s used to compute the expected val ueof the
number of bot tom posi t i ons to be eval uated i nat ree of arbi t rary (but f i xed)
depth and branchi ng f actor .
For l arge val ues ofDandNLemma 5. 3 i s not computat i onal l y f easi bl e
and so we empi r i cal l y f i t the f ol l owi ng curve toaset ofsi mul at i on poi nt s:
E t N B P ^ y r 7 2 0 1 * - 2 " ,
where i sacoef f i ci ent i nthe i nterval [ 1, 2] dependi ng on dept h. Thi s
shows that the depth rat i o as def i nedbySl agl e and Di xon [1969] f or a-P
i s about
277
DR
o,-P - 7 2 0+ ^'irfor large N
-
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
53/56
- 48-
We i nvest i gate t he def i ci enci es of the model wi t h respect to correl a
t i on and possi bl e equal i t y of bot tomposi t i on val ues and demonst rate that
hi gher correl at i on reduces the number of bot tomposi t i ons, as does equal i ty
of bot tomposi t i on val ues (Fi gures 6. 2 and 6, 3) .
A number of i nterest i ng probl ems remai n to be sol ved i n the anal ysi s
of the al pha- beta al gor i thm: The si mpl i f i cat i on of the anal yt i cal expressi on
to a f ormwi t h a smal l er computat i onal growth rate than i ndi cated by Lemma
5. 3 i s an open quest i on. I t woul d al so be usef ul to f i nd an anal yt i cal ex
pressi on f or the var i ance of the number of bot tomposi t i ons.
Extensi on of the model to more general game t rees woul d be an i nter
esti ng goal . The range const rai nt may be rel axed, as shown i n Sect i on 5.
Anal ysi s of thi s model i s consi derabl y more compl i cated than the model we
chose.
The present model i s i nadequate f or model l i ng var i at i ons of the search
strategy such as f i xed order i ng, dynami c order i ng, and aspi rat i on l evel s,
because the model assumes i ndependence of the underl yi ng r andomvari abl es.
One possi bl e extensi on of the model to encompass these requi rements mi ght
be to assi gn a randomnumber to each branch t hroughout the t r ee, and l et
the f i nal eval uat i on of the bot tomposi t i ons be the sumof the val ues of
i t s predecessor . Thi s woul d l ead to an i ntui t i vel y appeal i ng stati c eval ua
t i on functi on that woul d i nt roduce a measure of correl at i on i nto the t ree.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
54/56
- 49-
APPENDI X: NOTATI ON
a k( i d) kth- l evel al pha val ue, where k=0, 2, . . . , LdJ
A, . ( x) di str i but i on f unct i on ofa, _ ( i j ) ; d > k
>
A-? (x) di str i but i on f unct i on of a( i , )a
a( i d) i ax{a0( i d) , a2( i d) , . . . , a( i ) }
e
e
obk( i d) kth- l evel bet a val ue, where k=1, 3, . . . , LdJ
B, . (x) di str i but i on f unct i on of b, ( i , ) ; d > kk , 1k+l k d
B-? (x) di st r i but i on f uncti on of P( i , )a
aP( i d) mi n{b1( i d) , b3( i d) , . . . , b( i }
L J e
P( a, b) (i+b)t h e B 6 t a f u n c t i o n
D depth of game tree
F( x) the survi vor f unct i on, i . e. , F( x) = 1-F(x)
i d i , i 2, , i . Let i g be the empty vector .
1 k j
I k( j rj 2, . . . , j k) J n Tn( u, k- n+1)
0 n=l
L k j o 2
111
N branchi ng f actor of game t ree
p( i d) a node at l evel d i n the game tree wi t h i ndex i d # Number
of el ements i n vector i ndi cates depth of node i n the t ree
For exampl e, p( i ) *-s a l eaf node.
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
55/56
- 50-
P k ()
D-k+ N- 2
V k - 2
v. - k
i f i = 1m
i f k < D-m
i f k = D-m
i f k > D-m
T(f , k)
1 - [T(f , k- 1)]
N
i f k - 0
i f k > 0
v( i d) val ue of p( i , ) . Thi s i s the backed- up val ue unl essa
d D, i n whi ch case p( i d> i s a l eaf node and we
use the l eaf node' s stat i c val ue.
Vd( x ) cumul at i ve di st r i but i on f uncti on of v( i )
7/27/2019 Analysis of the Alpha-beta Pruning Algorithm
56/56
References
Bogen, R. A. et al . MACSYMA Users Manual , Proj ect MAC, MI T (September 1972)
Gi l l ogl y, J . J o , "The Technol ogy Chess Program, 11 Art i f i ci al I ntel l i gence 3( 1972) , 145- 163,
Ni l sson, N. J . , Probl em Sol vi ng Methods i n Ar t i f i ci al I ntel l i gence, McGraw-Hi l l ( 1971) .
Parzen, E. , Modern Probabi l i t y Theory and I ts Appl i cat i ons, Wi l ey and Sons,I nc. , N. Y. ( 1960) .
Samuel , A. L. , "Some Studi es i n Machi ne Learni ng Usi ng t he Game of CheckersI BM J ournal 3, ( 1959) , 211- 229.
Shannon, C. E c , "Programmi ng a Computer f or Pl ayi ng Chess,11 Phi l . Mag. 7th
ser i es, V. 41, N. 314 ( 1950) , 256- 275.
Sl agl e, J . R. , "Game Trees, m and n Mi ni maxi ng, and the m and n Al pha- BetaProcedure, 11Al Group Rep. No. 3, UCRL- 4671, Lawrence Radi at i on Laboratory,Uni versi ty of Cal i f orni a ( November , 1963) .
Sl agl e, J . R. and J . K. Di xon, "Exper i ments wi t h Some Programs that SearchGame Tr ees, " J . ACM 16, 2 (Apr i l , 1969) , 189- 207.