Gmes of No Chne 4 MSRI Pulitions Volume 63, 2015 Evluting territories of Go positions with pturing res TEIGO NAKAMURA In nlysing pturing res, or semeis, we hve een fousing on the method to find whih plyer wins the re so fr, euse whether to win or to lose the pturing re lrgely ffets the territory sore nd it somtimes n deide the outome of the gme. But in order to evlute the stte of the gme properly, we usully hve to ount the territory sore preisely regrdless of whih plyer wins the re. Sometimes the loser of pturing re hs good moves lthough the moves don t ffet the sttus of winning or losing the re. In this pper, we propose method for evluting territory sore in eh deomposed sugme of pturing re onsidering the sttus of the winner of the re. 1. Introdution Comintoril gme theory hs een pplied to mny kinds of existing gmes nd hs produed mny exellent results. In the se of the gme of Go, pplitions of CGT hve een foused on endgmes [Berlekmp nd Wolfe 1994; Berlekmp 1996; Müller et l. 1996; Nkmur nd Berlekmp 2003; Spight 2003] nd eyespe vlues [Lndmn 1996] so fr. But it n e pplied to ny situtions tht involve ounting. Reently, we developed new genre of pplition of CGT to Go, tht is, to ount lierties in pturing res [Nkmur 2003; Nkmur 2009; Nkmur 2006]. Cpturing res, or semei is prtiulr kind of life nd deth prolem in whih two djent opposing groups re eh fighting to pture the opponent s group. A plyer s strength in Go depends on their skills in winning pturing res s well s opening nd endgme skills. In order to win omplited pturing re, vrious tehniques in ounting lierties, tking wy the opponent s lierties, nd extending self-lierties, re required in ddition to rod nd deep reding. Humn expert plyers usully ount lierties for eh prt of the loks involved in semei, sum them, nd deide the outome. A position of pturing res n lso e deomposed into independent supositions, s in the ses of endgmes nd eyespes, nd we n pply CGT to nlyse the pturing res. We propose Keywords: none. 195
196 TEIGO NAKAMURA method of nlysing pturing res tht hve no shred lierty or hve only simple shred lierties, nd then, using omintoril gme vlues of externl lierties, give n evlution formul to find the outome of the pturing res. Pst methods of nlysing pturing res hve foused on wys to find whih plyer wins the re, euse winning or losing the pturing re lrgely ffets the territory sore nd sometimes it n deide the outome of the gme. But in order to evlute the stte of the gme properly, we usully hve to ount the territory sore preisely regrdless of whih plyer wins the re. Sometimes the loser of pturing re hs good moves lthough the moves don t ffet the sttus of winning or losing the re. In this pper, we propose method for evluting territory sore in eh deomposed sugme of pturing re tht tkes into ount the sttus of the winner of the re. 2. Anlysing pturing res using CGT 2.1. How to deide the winner. In order to model pturing res, we define the Lierty Counting Gme (LCG), whih hs the sme rules s Go exept for soring. I riefly explin LCG elow. More detils n e found in [Nkmur 2003; Nkmur 2009; Nkmur 2006]. In LCG, the terminl sore is silly the numer of lierties of essentil loks, 1 ut it is extly the numer of opponent s moves tht re required to tke wy ll the lierties of essentil loks. By onvention, Blk is Left nd White is Right, Blk sores re positive nd White sores re negtive. Figure 1 shows some exmples of CGT vlues of LCGs. In prt (), White s essentil lok 2 hs three lierties, ut Blk nnot diretly ttk White s externl lierty, euse if he simply fills the lierty, Blk s ttking lok gets to e () 4 () {3 0} () {4 0} Figure 1. CGT vlues of LCGs. 1 A lok of onneted stones involved in pturing re is lled n essentil lok, if pturing the lok immeditely deides the re. 2 The lok of irled stone denotes n essentil lok. In this exmple, the irled lok is not involved in semei, ut in LCG we just ount lierties of essentil loks.
EVALUATING TERRITORIES OF GO POSITIONS WITH CAPTURING RACES 197 Figure 2. Left: n exmple prolem. Right: its nlysis using CGT. in tri, nd White n pture Blk s three stones y plying to nd White s essentil lok eomes live. So, Blk needs to spend one move to protet prior to ttk. Generlly, lierty sores in externl lierty regions re greter thn or equl to the numer of lierties of essentil loks. In prt () of the figure, if White plys first, the sore is zero, ut if Blk plys to first, the numer of lierties eomes 3. In (), Blk n onnet his two stones of n essentil lok nd neutrl lok plying to d nd the sore eomes 4, if he plys first. Figure 2, left, is n exmple semei prolem. The right side of the figure shows n nlysis of eh sugme. The upper left sugme is {4 0}, the upper right sugme is {6 {4 0}} nd the lower sugme is 7. We ool these sugmes y two degrees nd otin 2, 4 nd 7, respetively. The totl vlue is 1 nd it is inomprle to 1. If Blk plys first, he n round the vlue up to 0 nd wins the re y one move. If White plys first, he n round the vlue down to 2 nd wins the re y three moves. So the first plyer wins the re of Figure 2. The Blk s only winning move is move. After sequene of Blk, White nd Blk, the numer of lierties of Blk s essentil lok is 8 nd the numer of lierties of White s essentil lok is 7 nd Blk definitely wins the re y one move. On the other hnd, White hs two winning moves of move nd move. After White, even if Blk moves to, White n win the re y two moves. 3 Alterntively, fter White for his first move, move nd move re mii nd White n win the re y three moves. In onsequene, White loses one lierty ount in semei ompred to White. But this loss is not only in lierty ount ut lso in territory sore. We will disuss the territory sore involved in semeis in the next setion. 3 We ssume the winner should ply the lst move in showing how mny moves hed, even if he doesn t need to ply ny moves to win. In this se, we tke White s extr move into ount.
198 TEIGO NAKAMURA Figure 3. Two winning sequenes for white. 2.2. Territory sores. Figure 3, left, shows winning sequene for White fter White in 2. Blk s 13 stones of the essentil lok re ound to e ptured eventully. White hs six territory points in the upper left suregion, one point in the upper right suregion nd 26 points s pturing Blk s 13 stones. Blk hs no territory points euse ll the empty points in the lower suregion re dme. So the totl is 33 points for White. In Figure 2, right, on the other hnd, if White nd Blk re plyed fter White 1, the resulting position is identil to the position of the left prt of the figure nd the totl is lso 33 points. But if Blk plys the move, Blk n redue White s territory points lthough the move doesn t hnge the sttus of the pturing re. After Blk, White s territory sore is 32 (= 6+26) points. So Blk s move tkes wy one White s territory point ompred with the se of White. 4 If White plys oth the move nd the move in Figure 3, right, the totl sore inreses to 35 points. 5 Generlly, this kind of phenomen in pturing res is lled semedori. As in the ove nlysis in terms of territory sore, if we serh ll the possile winning sequenes of n entire pturing re fter we nlyse the sttus of the pturing re, we n figure out the finl territory sore. But the proedure is not effiient euse of omintoril explosion. In the next setion, we will show method to evlute territory sore on eh sugme nd to omine it tking into ount the sttus of pturing res nd semedori. 4 This redution is lso ginst Figure 3, left. 5 White s moves of nd ut off Blk s three stones in the upper right region nd the territory sore of the upper right suregion eomes 1 + 10 = 11. Sine the numer of stones of Blk s essentil lok is 9, the totl sore is 6 + 11 + 18 = 35.
EVALUATING TERRITORIES OF GO POSITIONS WITH CAPTURING RACES 199 3. Evluting territory sores of sugmes involved in pturing res For eh sugme we introdue three uxiliry gmes in order to evlute, without full serh, the territory sore of position involved in pturing res: G l : The Lierty Counting Gme (LCG). G win : A gme whose sore is prtil territory sore, ssuming tht the defender (plyer who owns the essentil lok in the region) is the winner of the entire pturing re. G lose : A gme whose sore is prtil territory sore, ssuming tht the defender (plyer who owns the essentil lok in the region) is the loser of the entire pturing re. We use G l to deide the sttus of the pturing re. Either G win or G lose re used to evlute the territory sore ording to the sttus of the pturing re. Although eh sugme should e independent in Comintoril Gme Theory, some sugmes my depend on eh other in the gme of Go. Müller proposed frmework of Conditionl Comintoril Gme (CCG) to desrie gmes with some dependeny [Müller 2003]. 3.1. Conditionl Comintoril Gme. The Conditionl Comintoril Gme (CCG) is desried s follows. G def = { L 1 C 1, L 2 C 2, L 3 C 3,... R 1 D 1, R 2 D 2, R 3 D 3,... }. Here L i is gme to whih Left moves from G nd R i is gme to whih Right moves from G. Eh C i nd D i is some kind of predite to hek eh move is legl or not using glol informtion. For our purposes, we n desrie G win nd G lose s gme of CCG using G l s the onditionl predites. 3.2. Territory sores of sugmes. We show some sugmes of pturing res nd their orresponding gmes of G l, G win nd G lose in Tle 1. The Territory sore is the points of territory other thn the essentil lok in eh region. For exmple, G lose of the sugme A is { 4 6}. We lulte the vlue s follows. If White uts off Blk s one stone, White s territory sore eomes six points in the region. On the other hnd, if Blk onnets the stone nd the essentil lok, White hs to ply four more moves in this region in order to to pture Blk s lok. So, White s territory sore eomes four points, tht is, two ptured stone, other thn the essentil lok, nd two territory points.
200 TEIGO NAKAMURA lierty sore G l ooled vlue territory sore G win G lose ooled vlue seline A 4 0 2 0 6 4 6 5 7 B 6 4 0 4 0 1 11 8 9 11 9 13 C 0 4 2 8 0 8 6 7 9 D 0 2 6 2 13 6 0 13 12 10 12 14 E 7 7 0 0 0 7 F 5 9 7 8 0 8 6 7 14 G 5 8 6 1 2 6 0 6 5 5 1 2 12 H 8 4 2 0 2 0 6 9 12 8 10 11 12 11 13 I 6 3 1 2 3 4 0 1 2 8 15 13 14 15 14 1 4 17 J 3 0 1 1 2 0 2 5 4 5 4 1 2 6 A B C D E F G H I J Tle 1. Evlution of lierty nd territory for sugmes A J. The seline olumn mens the se where we ssume tht the suregion is not involved in semei nd the opponent s essentil lok is lredy ded. The territory sore of the ded essentil lok is exluded from the seline vlue. A formul to lulte the ooled vlue of G lose is Cool(G lose, 1) = seline vlue + Cool(G l, 2), (1) Cool(G, t) eing the gme G ooled y t degrees. Formul (1) works s follows: The winner of pturing res hs to fill ll the lierties of the opponent s essentil lok nd pture it eventully. In se of semedori,
EVALUATING TERRITORIES OF GO POSITIONS WITH CAPTURING RACES 201 the lierty filling moves re plyed in his territory region. The numer of lierty filling moves equls to the numer of lierty ount of the opponent s essentil lok in the suregion. The moves redue his own territory points nd we need to sutrt the numer from the seline of the territory points. The winner s own territory region is the suregion of G lose nd the numer of lierty ount G l is the numer of lierties of opponent s essentil lok, so positive nd negtive re reversed. Consequently we should dd the seline nd the ooled vlue of G l in order to tke into ount the redution. We n evlute the territory sore tking into ount the winner of the pturing re s follows. Figure 2, left, is n exmple position of pturing re omined A, B nd E in Tle 1. If White plys first, White n win the re nd the totl territory sore is the sum of G lose of A, G lose of B nd G win of E. The ooled vlue of the totl is 5 + 9 + 0 = 14. Considering the numer of stones of eh essentil lok, tht is, Blk s nine stones nd White s six stones, we n figure out the finl sore is 14 18 = 32. On the other hnd, if Blk plys first, the sitution is more omplited. The totl territory sore is the sum of G win of A, G win of B nd G lose of E. White s moves in the region of A nd B n e effetive ttking moves to Blk s essentil lok nd the sttus of the pturing re n e hnged. In tht se, whether White s ttking moves nd Blk s responses re good or d should e evluted in terms of not only the gin in territory points in G win ut lso the result of G l s the ondition of CCG t the highest priority. As result, White is sente in terms of the sttus of the pturing re fter Blk s move in Figure 2, so Blk hs to respond the move immeditely. In onsequene, G win of B eomes 1 from {0 { 1 11}} nd the finl sore is 1. If two sugmes hve the sme property of G l, we n ompre them in terms of territory. G l of the sugme A nd G l of the sugme C hve the sme infinitesiml prt of. So, in se tht Blk is the winner, we ompre G win of A with G lose of C nd it will turn out tht A is hotter thn C. On the ontrry, in se tht White is the winner, we ompre G lose of A with G win of C nd it will turn out tht C is hotter thn A. We n lso ompre B with D euse G l of B nd G l of D hve the sme infinitesiml prt of. In se tht Blk is the winner, we ompre G win of B with G lose of D nd it will turn out
202 TEIGO NAKAMURA tht B is preferred to D. On the ontrry, in se tht White is the winner, we ompre G lose of B with G win of D nd it will turn out tht D is hotter thn B. 3.3. More exmples. We n omine sugmes A, B, C nd D in Tle 1, dd some extr lierties nd onstrut semei prolems tht hve sme lierty ounts. For exmple, ll the semei gmes of A + B 7, A + D 1, C + B 3 nd C + D + 3 hve the sme lierty ount of 1, euse (1) A + B 7 = 2 + 4 7 = 1, (2) A + D 1 = 2 2 1 = 1, (3) C + B 3 = 2 + 4 3 = 1, (4) C + D + 3 = 2 2 + 3 = 1. Although we n onlude tht first plyer wins for ll the semei gmes, it is not esy to figure out the optiml pth in terms of territory sore for eh of the semei gmes from (1) to (4). Figure 4 shows the nonil gme tree of. But it s not true in semei gmes of the sum of G l s. It s enough for the ttker to win the re, euse whether to win or to lose usully mkes ig differene in territory sores nd he doesn t need to gin extr lierties t the risk of losing territory sores. Cnoniliztion proess for semei gmes my prune some effetive rnh in terms of territory sore. Figure 5 shows the gme tree of the semei gmes from (1) to (4). Hevy lines denote winning pths in semeis for eh plyer nd numers t the lef nodes re the lierty sore. Boxed numers under the lef nodes denote the territory sore for eh of semei gmes nd itli numers in hevy oxes men the nodes should e seleted in terms of territory sore y priority. For exmple, in semei gme (1), if Blk plys first, Blk should ply move. At this point, White is sente nd Blk hs to respond move immeditely. The territory sore eomes 1 s desried in Setion 3.2. But if White plys first, White 0 = + 0 0 0 0 0 0 0 0 Figure 4. Cnonil gme tree of.
EVALUATING TERRITORIES OF GO POSITIONS WITH CAPTURING RACES 203-1 3 1: -1 2: 12 3: 7 4: 20 3 1 1 1 3 1: -14 2: 7 3: -8 3 4: 13 1: -15 2: 0 3: -9 4: 6 7 1: -17 2: -6 3: -11 4: 0 1 3 3 7 1: -15 1: -15 2: -4 2: 0 3: -3 3: -9 4: 8 4: 6 Figure 5. Gme tree of 1 semei. will e preferred to. Then nd re mii nd the sore will e 15. In se of the semei gme (3), White s optiml move is different from the ove se. White should ply move nd the hilled territory sore eomes 9. If we give some more lierties for Blk, the sitution will e hnged s shown in Figures 6 nd 7. 4 1: -1 2: 12 3: 7 4: 20 4 0 0 2 2 1: -6 2: 7 3: 6 4: 19 1: -14 2: 7 3: -8 4: 13 2 6 2 2 2 6 1: -15 1: -15 2: -4 2: 0 3: -3 3: -9 4: 8 4: 6 Figure 6. Gme tree of semei. 4. Summry We proposed method for evluting territory sore in eh deomposed sugme of pturing re onsidering the sttus of the winner of the re. We introdued three different kinds of gmes, G l, G lose nd G win, for eh sugme nd showed
204 TEIGO NAKAMURA 1 5 1: -1 2: 12 3: 7 4: 20 5 1 1 3 1 1: 0 2: 13 3: 8 4: 21 1: -6 2: 7 3: 6 4: 19 1 5 3 1 1 5 1: -15 1: -15 2: -4 2: 0 3: -3 3: -9 4: 8 4: 6 Figure 7. Gme tree of 1 semei. method to evlute territory sore of position involved in pturing res without entire serh. G lose n e lulted from G l using the formul (1), ut it is diffiult to evlute G win in omintion with other sugmes euse the noniliztion proess for G l my prune some effetive rnh in terms of territory sore. So future work inludes how to selet good moves in G win for eh plyers effiiently keeping the sttus of the entire semeis. Aknowledgements This reserh is prtilly supported y Hyo Nkym Foundtion for Siene & Tehnology nd Culture Grnt (H17-A7). The si ide for pplying Comintoril Gme Theory to pturing res of Go me into my mind in the summer of 2001, when I visited Berkeley to study CGT nd its pplition to the gme of Go with Professor Berlekmp nd his reserh group. I m very grteful to Professor Elwyn Berlekmp, Willim Frser nd Willim Spight for their kind dvie nd useful suggestions then. I lso thnk Professor Rihrd Nowkowski for his kind dvie nd enourgement. Referenes [Berlekmp 1996] E. Berlekmp, The eonomist s view of omintoril gmes, pp. 365 405 in Gmes of no hne (Berkeley, CA, 1994), edited y R. J. Nowkowski, Mth. Si. Res. Inst. Pul. 29, Cmridge Univ. Press, 1996. [Berlekmp nd Wolfe 1994] E. Berlekmp nd D. Wolfe, Mthemtil Go: Chilling gets the lst point, A K Peters, Wellesley, MA, 1994.
EVALUATING TERRITORIES OF GO POSITIONS WITH CAPTURING RACES 205 [Lndmn 1996] H. A. Lndmn, Eyespe vlues in Go, pp. 227 257 in Gmes of no hne (Berkeley, CA, 1994), edited y R. J. Nowkowski, Mth. Si. Res. Inst. Pul. 29, Cmridge Univ. Press, Cmridge, 1996. [Müller 2003] M. Müller, Conditionl omintoril gmes nd their pplition to nlyzing pturing res in Go, Inform. Si. 154:3-4 (2003), 189 202. [Müller et l. 1996] M. Müller, E. Berlekmp, nd W. Spight, Generlized thermogrphy: Algorithms, implementtion, nd pplition to Go endgmes, TR 96 030, Interntionl Computer Siene Institute, 1996, http://iteseerx.ist.psu.edu/viewdo/summry?doi=10.1.1.34.6699. [Nkmur 2003] T. Nkmur, Counting lierties in pturing res using omintoril gme theory, IPSJ SIG-GI 2003 GI 9 5 2003:35 (2003), 27 34. In Jpnese. [Nkmur 2006] T. Nkmur, On nlysing pturing res using omintoril gme theory, pp. 1 16 in Proeedings of the 4th Interntionl Conferene on Bduk, Kore Bduk Assoition, Bduk, 2006. [Nkmur 2009] T. Nkmur, Counting lierties in Go pturing res, pp. 177 196 in Gmes of no hne 3, edited y M. H. Alert nd R. J. Nowkowski, Mth. Si. Res. Inst. Pul. 56, Cmridge: Cmridge University Press, 2009. [Nkmur nd Berlekmp 2003] T. Nkmur nd E. Berlekmp, Anlysis of omposite orridors, pp. 213 229 in Computers nd gmes (Edmonton, 2002), edited y J. Sheffer et l., Leture Notes in Computer Siene 2883, Springer, Berlin, 2003. [Spight 2003] W. L. Spight, Evluting Kos in neutrl thret environment: Preliminry results, pp. 413 428 in Computers nd gmes (Edmonton, 2002), edited y J. Sheffer et l., Leture Notes in Computer Siene 2883, Springer, Berlin, 2003. teigo@i.kyuteh..jp Deprtment of Artifiil Intelligene, Kyushu Institute of Tehnology, 680-4 Kwzu Iizuk, Fukuok 820-8502, Jpn