Kunstig Intelligens til Brætspillet Taiji - Danmarks Tekniske Universitet
Kunstig Intelligens til Brætspillet Taiji - Danmarks Tekniske Universitet Kunstig Intelligens til Brætspillet Taiji - Danmarks Tekniske Universitet
104 Bilag A 419 420 421 422 423 424 425 // s a e t t e r s c o r e n f o r en node t i l −’ u e n d e l i g ’ 426 p r i v a t e Node setScoreMin ( Node n ) { 427 n . a = −tModel . maxScore ; 428 r e t u r n ( n ) ; 429 } 430 // s a e t t e r s c o r e n f o r en node t i l ” u e n d e l i g ” 431 p r i v a t e Node setScoreMax ( Node n ) { 432 n . a = tModel . maxScore ; 433 r e t u r n ( n ) ; 434 } 435 436 // u d s k r i v e r v a e r d i e r n e paa f o r a e l d r e n e t i l en Node 437 p r i v a t e void p r i n t P a r S c o r e ( Node n ) { 438 System . out . p r i n t (”AB p r i n t P a r S c o r e d=”+n . d+” n . par s c o r e s : ”) ; 439 f o r ( i n t i =0; i 1) { 465 i f ( b ) { 466 f o r ( i n t i =0; i Root . c h i l d r e n . get ( i ) . a ) {
A.1 AITaijiAlphaBeta.java 105 468 n=Root . c h i l d r e n . get ( i ) ; 469 } 470 } 471 } 472 i f ( ! b ) { 473 f o r ( i n t i =0; i
- Page 64 and 65: 54 Optimering af Minimax Figur 5.4:
- Page 66 and 67: 56 Optimering af Minimax som et uni
- Page 68 and 69: 58 Optimering af Minimax Det er der
- Page 70 and 71: 60 Optimering af Minimax klarer sig
- Page 72 and 73: 62 Optimering af Minimax IF v < m T
- Page 74 and 75: 64 Optimering af Minimax er tilfæl
- Page 76 and 77: 66 Optimering af Minimax Figur 5.9:
- Page 78 and 79: 68 Optimering af Minimax vigtigt at
- Page 80 and 81: 70 Optimering af Minimax
- Page 82 and 83: 72 Begrænsning af antallet af unde
- Page 84 and 85: 74 Begrænsning af antallet af unde
- Page 86 and 87: 76 Begrænsning af antallet af unde
- Page 88 and 89: 78 Test og sammenligning af de impl
- Page 90 and 91: 80 Test og sammenligning af de impl
- Page 92 and 93: 82 Test og sammenligning af de impl
- Page 94 and 95: 84 Test og sammenligning af de impl
- Page 96 and 97: 86 Test og sammenligning af de impl
- Page 98 and 99: 88 Test og sammenligning af de impl
- Page 100 and 101: 90 Test og sammenligning af de impl
- Page 102 and 103: 92 Konklusion selv n˚a igennem et
- Page 104 and 105: 94 Konklusion
- Page 106 and 107: 96 Bilag A 19 20 // i n i t i a l i
- Page 108 and 109: 98 Bilag A 120 nodes [ p [ 0 ] ] [
- Page 110 and 111: 100 Bilag A 218 i f ( n . a > beta
- Page 112 and 113: 102 Bilag A 319 p [2]= nodes [ p [
- Page 116 and 117: 106 Bilag A 517 n . wr = tModel . n
- Page 118 and 119: 108 Bilag A 61 } 62 } 63 64 // c h
- Page 120 and 121: 110 Bilag A 155 b [ c +1][ r −1]
- Page 122 and 123: 112 Bilag A 251 b [ c −1][ r −1
- Page 124 and 125: 114 Bilag A 347 r e = placePieceMax
- Page 126 and 127: 116 Bilag A 443 r e = placePieceMax
- Page 128 and 129: 118 Bilag A 537 b [ c +1][ r −1]
- Page 130 and 131: 120 Bilag A 633 b [ c −1][ r −1
- Page 132 and 133: 122 Bilag A 729 beta = r e [ 2 ] ;
- Page 134 and 135: 124 Bilag A 825 beta = r e [ 2 ] ;
- Page 136 and 137: 126 Bilag A 916 i f ( n . a > v ) 9
- Page 138 and 139: 128 Bilag A 997 Root . wc=0; // tMo
- Page 140 and 141: 130 Bilag A 1097 n . bc = tModel .
- Page 142 and 143: 132 Bilag A 93 i f ( rowEnd >= tMod
- Page 144 and 145: 134 Bilag A 192 alpha = n . a ; 193
- Page 146 and 147: 136 Bilag A 291 } 292 293 // Min−
- Page 148 and 149: 138 Bilag A 391 n . c h i l d r e n
- Page 150 and 151: 140 Bilag A 493 i f ( Root . c h i
- Page 152 and 153: 142 Bilag A 593 r e t u r n ( n ) ;
- Page 154 and 155: 144 Bilag A 90 b [ c ] [ r ] = 0 ;
- Page 156 and 157: 146 Bilag A 185 // System . out . p
- Page 158 and 159: 148 Bilag A 280 } 281 282 // f l y
- Page 160 and 161: 150 Bilag A 377 // i f ( tTree . ma
- Page 162 and 163: 152 Bilag A 481 } 482 r e t u r n (
A.1 AI<strong>Taiji</strong>AlphaBeta.java 105<br />
468 n=Root . c h i l d r e n . get ( i ) ;<br />
469 }<br />
470 }<br />
471 }<br />
472 i f ( ! b ) {<br />
473 f o r ( i n t i =0; i