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
222 Bilag A 449 i f ( tModel . noRows > 4) { 450 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 4 ] + ” ”+n . nodeBoard [ 1 ] [ 4 ] + ” ”+n . nodeBoard [ 2 ] [ 4 ] + ” ”+n . nodeBoard [ 3 ] [ 4 ] + ” ”+n . nodeBoard [ 4 ] [ 4 ] + ” ”+n . nodeBoard [ 5 ] [ 4 ] + ” ”+n . nodeBoard [ 6 ] [ 4 ] ) ; 451 i f ( tModel . noRows > 5) { 452 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 5 ] + ” ”+n . nodeBoard [ 1 ] [ 5 ] + ” ”+n . nodeBoard [ 2 ] [ 5 ] + ” ”+n . nodeBoard [ 3 ] [ 5 ] + ” ”+n . nodeBoard [ 4 ] [ 5 ] + ” ”+ n . nodeBoard [ 5 ] [ 5 ] + ” ”+n . nodeBoard [ 6 ] [ 5 ] ) ; 453 i f ( tModel . noRows > 6) { 454 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 6 ] + ” ”+n . nodeBoard [ 1 ] [ 6 ] + ” ”+n . nodeBoard [ 2 ] [ 6 ] + ” ”+n . nodeBoard [ 3 ] [ 6 ] + ” ”+n . nodeBoard [ 4 ] [ 6 ] + ” ”+n . nodeBoard [ 5 ] [ 6 ] + ” ”+n . nodeBoard [ 6 ] [ 6 ] ) ; 455 i f ( tModel . noRows > 7) { 456 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 7 ] + ” ”+n . nodeBoard [ 1 ] [ 7 ] + ” ”+n . nodeBoard [ 2 ] [ 7 ] + ” ”+n . nodeBoard [ 3 ] [ 7 ] + ” ”+n . nodeBoard [ 4 ] [ 7 ] + ” ”+n . nodeBoard [ 5 ] [ 7 ] + ” ”+n . nodeBoard [ 6 ] [ 7 ] ) ; 457 i f ( tModel . noRows > 8) { 458 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 8 ] + ” ”+n . nodeBoard [ 1 ] [ 8 ] + ” ”+n . nodeBoard [ 2 ] [ 8 ] + ” ”+n . nodeBoard [ 3 ] [ 8 ] + ” ”+n . nodeBoard [ 4 ] [ 8 ] + ” ”+n . nodeBoard [ 5 ] [ 8 ] + ” ”+n . nodeBoard [ 6 ] [ 8 ] ) ; 459 460 461 } 462 } 463 } 464 } 465 } 466 } 467 System . out . p r i n t l n ( ) ; 468 } 469 470 // f o r b r a e t med 8 k o l o n e r 471 p u b l i c void printNode8x ( Node n ) { 472 System . out . p r i n t l n (” t P r i n t PrintNode ”+n+” Depth : ”+n . d+” Score ”+n . a+” par ”+n . par+” w ”+n . wc+”,”+n . wr+” b ”+n . bc+”,”+n . br+” c h i l d r e n : ”+n . c h i l d r e n ) ; 473 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 0 ] + ” ”+n . nodeBoard [ 1 ] [ 0 ] + ” ”+n . nodeBoard [ 2 ] [ 0 ] + ” ”+n . nodeBoard [ 3 ] [ 0 ] + ” ”+ n . nodeBoard [ 4 ] [ 0 ] + ” ”+n . nodeBoard [ 5 ] [ 0 ] + ” ”+n . nodeBoard [ 6 ] [ 0 ] + ” ”+n . nodeBoard [ 7 ] [ 0 ] ) ; 474 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 1 ] + ” ”+n . nodeBoard [ 1 ] [ 1 ] + ” ”+n . nodeBoard [ 2 ] [ 1 ] + ” ”+n . nodeBoard [ 3 ] [ 1 ] + ” ”+ n . nodeBoard [ 4 ] [ 1 ] + ” ”+n . nodeBoard [ 5 ] [ 1 ] + ” ”+n . nodeBoard [ 6 ] [ 1 ] + ” ”+n . nodeBoard [ 7 ] [ 1 ] ) ; 475 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 2 ] + ” ”+n . nodeBoard [ 1 ] [ 2 ] + ” ”+n . nodeBoard [ 2 ] [ 2 ] + ” ”+n . nodeBoard [ 3 ] [ 2 ] + ” ”+
A.15 TaijiPrint.java 223 n . nodeBoard [ 4 ] [ 2 ] + ” ”+n . nodeBoard [ 5 ] [ 2 ] + ” ”+n . nodeBoard [ 6 ] [ 2 ] + ” ”+n . nodeBoard [ 7 ] [ 2 ] ) ; 476 i f ( tModel . noRows > 3) { 477 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 3 ] + ” ”+n . nodeBoard [ 1 ] [ 3 ] + ” ”+n . nodeBoard [ 2 ] [ 3 ] + ” ”+n . nodeBoard [ 3 ] [ 3 ] + ” ”+n . nodeBoard [ 4 ] [ 3 ] + ” ”+n . nodeBoard [ 5 ] [ 3 ] + ” ”+n . nodeBoard [ 6 ] [ 3 ] + ” ”+n . nodeBoard [ 7 ] [ 3 ] ) ; 478 i f ( tModel . noRows > 4) { 479 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 4 ] + ” ”+n . nodeBoard [ 1 ] [ 4 ] + ” ”+n . nodeBoard [ 2 ] [ 4 ] + ” ”+n . nodeBoard [ 3 ] [ 4 ] + ” ”+n . nodeBoard [ 4 ] [ 4 ] + ” ”+n . nodeBoard [ 5 ] [ 4 ] + ” ”+n . nodeBoard [ 6 ] [ 4 ] + ” ”+n . nodeBoard [ 7 ] [ 4 ] ) ; 480 i f ( tModel . noRows > 5) { 481 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 5 ] + ” ”+n . nodeBoard [ 1 ] [ 5 ] + ” ”+n . nodeBoard [ 2 ] [ 5 ] + ” ”+n . nodeBoard [ 3 ] [ 5 ] + ” ”+n . nodeBoard [ 4 ] [ 5 ] + ” ”+ n . nodeBoard [ 5 ] [ 5 ] + ” ”+n . nodeBoard [ 6 ] [ 5 ] + ” ”+n . nodeBoard [ 7 ] [ 5 ] ) ; 482 i f ( tModel . noRows > 6) { 483 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 6 ] + ” ”+n . nodeBoard [ 1 ] [ 6 ] + ” ”+n . nodeBoard [ 2 ] [ 6 ] + ” ”+n . nodeBoard [ 3 ] [ 6 ] + ” ”+n . nodeBoard [ 4 ] [ 6 ] + ” ”+n . nodeBoard [ 5 ] [ 6 ] + ” ”+n . nodeBoard [ 6 ] [ 6 ] + ” ”+n . nodeBoard [ 7 ] [ 6 ] ) ; 484 i f ( tModel . noRows > 7) { 485 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 7 ] + ” ”+n . nodeBoard [ 1 ] [ 7 ] + ” ”+n . nodeBoard [ 2 ] [ 7 ] + ” ”+n . nodeBoard [ 3 ] [ 7 ] + ” ”+n . nodeBoard [ 4 ] [ 7 ] + ” ”+n . nodeBoard [ 5 ] [ 7 ] + ” ”+n . nodeBoard [ 6 ] [ 7 ] + ” ”+n . nodeBoard [ 7 ] [ 7 ] ) ; 486 i f ( tModel . noRows > 8) { 487 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 8 ] + ” ”+n . nodeBoard [ 1 ] [ 8 ] + ” ”+n . nodeBoard [ 2 ] [ 8 ] + ” ”+n . nodeBoard [ 3 ] [ 8 ] + ” ”+n . nodeBoard [ 4 ] [ 8 ] + ” ”+n . nodeBoard [ 5 ] [ 8 ] + ” ”+n . nodeBoard [ 6 ] [ 8 ] + ” ”+n . nodeBoard [ 7 ] [ 8 ] ) ; 488 489 490 } 491 } 492 } 493 } 494 } 495 } 496 System . out . p r i n t l n ( ) ; 497 } 498 499 // f o r b r a e t med 9 k o l o n e r 500 p u b l i c void printNode9x ( Node n ) {
- Page 182 and 183: 172 Bilag A 43 p u b l i c Node cre
- Page 184 and 185: 174 Bilag A 27 whiteScore = new Sco
- Page 186 and 187: 176 Bilag A 65 bc = 1 ; 66 e l s e
- Page 188 and 189: 178 Bilag A 58 p u b l i c void mou
- Page 190 and 191: 180 Bilag A 149 S t r i n g t x t =
- Page 192 and 193: 182 Bilag A l o a d i n g the f i l
- Page 194 and 195: 184 Bilag A 7 p u b l i c AITaijiMi
- Page 196 and 197: 186 Bilag A 105 i f ( b l a c k P l
- Page 198 and 199: 188 Bilag A 211 tBoard . s e t P i
- Page 200 and 201: 190 Bilag A 315 { 316 f o r ( i n t
- Page 202 and 203: 192 Bilag A 416 { 417 //Bunden 418
- Page 204 and 205: 194 Bilag A 510 p r i v a t e boole
- Page 206 and 207: 196 Bilag A 612 } 613 614 // b e r
- Page 208 and 209: 198 Bilag A 702 } 703 704 // s a e
- Page 210 and 211: 200 Bilag A 802 p u b l i c void ne
- Page 212 and 213: 202 Bilag A 59 g . f i l l R e c t
- Page 214 and 215: 204 Bilag A 159 { 160 t h i s . set
- Page 216 and 217: 206 Bilag A 81 System . out . p r i
- Page 218 and 219: 208 Bilag A [ 1 ] [ 7 ] + ” ”+n
- Page 220 and 221: 210 Bilag A 176 System . out . p r
- Page 222 and 223: 212 Bilag A 212 System . out . p r
- Page 224 and 225: 214 Bilag A 246 System . out . p r
- Page 226 and 227: 216 Bilag A [ 8 ] [ 2 ] ) ; 277 i f
- Page 228 and 229: 218 Bilag A 326 p u b l i c void pr
- Page 230 and 231: 220 Bilag A 393 i f ( tModel . noRo
- Page 234 and 235: 224 Bilag A 501 System . out . p r
- Page 236 and 237: 226 Bilag A 30 31 tFrame = frame ;
- Page 238 and 239: 228 Bilag A 135 tFrame . tModel . s
- Page 240 and 241: 230
- Page 242 and 243: 232 Bilag B ”Introduction to Algo
- Page 244: 234
A.15 <strong>Taiji</strong>Print.java 223<br />
n . nodeBoard [ 4 ] [ 2 ] + ” ”+n . nodeBoard [ 5 ] [ 2 ] + ” ”+n . nodeBoard<br />
[ 6 ] [ 2 ] + ” ”+n . nodeBoard [ 7 ] [ 2 ] ) ;<br />
476 i f ( tModel . noRows > 3) {<br />
477 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 3 ] + ” ”+n . nodeBoard<br />
[ 1 ] [ 3 ] + ” ”+n . nodeBoard [ 2 ] [ 3 ] + ” ”+n . nodeBoard<br />
[ 3 ] [ 3 ] + ” ”+n . nodeBoard [ 4 ] [ 3 ] + ” ”+n . nodeBoard<br />
[ 5 ] [ 3 ] + ” ”+n . nodeBoard [ 6 ] [ 3 ] + ” ”+n . nodeBoard [ 7 ] [ 3 ] )<br />
;<br />
478 i f ( tModel . noRows > 4) {<br />
479 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 4 ] + ” ”+n .<br />
nodeBoard [ 1 ] [ 4 ] + ” ”+n . nodeBoard [ 2 ] [ 4 ] + ” ”+n .<br />
nodeBoard [ 3 ] [ 4 ] + ” ”+n . nodeBoard [ 4 ] [ 4 ] + ” ”+n .<br />
nodeBoard [ 5 ] [ 4 ] + ” ”+n . nodeBoard [ 6 ] [ 4 ] + ” ”+n .<br />
nodeBoard [ 7 ] [ 4 ] ) ;<br />
480 i f ( tModel . noRows > 5) {<br />
481 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 5 ] + ” ”+n .<br />
nodeBoard [ 1 ] [ 5 ] + ” ”+n . nodeBoard [ 2 ] [ 5 ] + ” ”+n<br />
. nodeBoard [ 3 ] [ 5 ] + ” ”+n . nodeBoard [ 4 ] [ 5 ] + ” ”+<br />
n . nodeBoard [ 5 ] [ 5 ] + ” ”+n . nodeBoard [ 6 ] [ 5 ] + ”<br />
”+n . nodeBoard [ 7 ] [ 5 ] ) ;<br />
482 i f ( tModel . noRows > 6) {<br />
483 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 6 ] + ” ”+n .<br />
nodeBoard [ 1 ] [ 6 ] + ” ”+n . nodeBoard [ 2 ] [ 6 ] + ”<br />
”+n . nodeBoard [ 3 ] [ 6 ] + ” ”+n . nodeBoard<br />
[ 4 ] [ 6 ] + ” ”+n . nodeBoard [ 5 ] [ 6 ] + ” ”+n .<br />
nodeBoard [ 6 ] [ 6 ] + ” ”+n . nodeBoard [ 7 ] [ 6 ] ) ;<br />
484 i f ( tModel . noRows > 7) {<br />
485 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 7 ] + ”<br />
”+n . nodeBoard [ 1 ] [ 7 ] + ” ”+n . nodeBoard<br />
[ 2 ] [ 7 ] + ” ”+n . nodeBoard [ 3 ] [ 7 ] + ” ”+n .<br />
nodeBoard [ 4 ] [ 7 ] + ” ”+n . nodeBoard<br />
[ 5 ] [ 7 ] + ” ”+n . nodeBoard [ 6 ] [ 7 ] + ” ”+n .<br />
nodeBoard [ 7 ] [ 7 ] ) ;<br />
486 i f ( tModel . noRows > 8) {<br />
487 System . out . p r i n t l n ( n . nodeBoard<br />
[ 0 ] [ 8 ] + ” ”+n . nodeBoard [ 1 ] [ 8 ] + ”<br />
”+n . nodeBoard [ 2 ] [ 8 ] + ” ”+n .<br />
nodeBoard [ 3 ] [ 8 ] + ” ”+n . nodeBoard<br />
[ 4 ] [ 8 ] + ” ”+n . nodeBoard [ 5 ] [ 8 ] + ”<br />
”+n . nodeBoard [ 6 ] [ 8 ] + ” ”+n .<br />
nodeBoard [ 7 ] [ 8 ] ) ;<br />
488<br />
489<br />
490 }<br />
491 }<br />
492 }<br />
493 }<br />
494 }<br />
495 }<br />
496 System . out . p r i n t l n ( ) ;<br />
497 }<br />
498<br />
499 // f o r b r a e t med 9 k o l o n e r<br />
500 p u b l i c void printNode9x ( Node n ) {