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
210 Bilag A 176 System . out . p r i n t l n ( i +” ”+n . c h i l d r e n . get ( i )+” Depth : ”+n . c h i l d r e n . get ( i ) . d+” Score ”+n . c h i l d r e n . get ( i ) . a ) ; 177 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . par+” ”+n . c h i l d r e n . get ( i ) . a+” b ”+n . c h i l d r e n . get ( i ) . bc+”,”+n . c h i l d r e n . get ( i ) . br+” w ”+n . c h i l d r e n . get ( i ) . wc+”,”+n . c h i l d r e n . get ( i ) . wr+” ”+n . c h i l d r e n . get ( i ) . c h i l d r e n +” ”+n . c h i l d r e n . get ( i ) . nodeBoard ) ; 178 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 0 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 0 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 0 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 0 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 4 ] [ 0 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 5 ] [ 0 ] ) ; 179 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 1 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 1 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 1 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 1 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 4 ] [ 1 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 5 ] [ 1 ] ) ; 180 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 2 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 2 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 2 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 2 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 4 ] [ 2 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 5 ] [ 2 ] ) ; 181 i f ( tModel . noRows > 3) { 182 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 3 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 3 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 3 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 3 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 4 ] [ 3 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 5 ] [ 3 ] ) ; 183 i f ( tModel . noRows > 4) { 184 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 4 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 5 ] [ 4 ] ) ; 185 i f ( tModel . noRows > 5) { 186 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 4 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 5 ] [ 5 ] ) ; 187 i f ( tModel . noRows > 6) { 188 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 6 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 6 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 6 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 6 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 4 ] [ 6 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 5 ] [ 6 ] ) ; 189 i f ( tModel . noRows > 7) {
A.15 TaijiPrint.java 211 190 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 7 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 7 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 7 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 7 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 4 ] [ 7 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 5 ] [ 7 ] ) ; 191 i f ( tModel . noRows > 8) { 192 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 8 ] + ” ”+ n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 8 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 8 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 8 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 4 ] [ 8 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 5 ] [ 8 ] ) ; 193 194 } 195 } 196 } 197 } 198 } 199 } 200 System . out . p r i n t l n ( ) ; 201 } 202 } 203 204 // f o r b r a e t med 7 k o l o n e r 205 p u b l i c void p r i n t C h i l d r e n 7 x ( Node n ) { 206 System . out . p r i n t l n (” t P r i n t P r i n t Children ”+n ) ; 207 f o r ( i n t i =0; i
- Page 170 and 171: 160 Bilag A 245 f o r ( i n t r =0;
- Page 172 and 173: 162 Bilag A 353 break ; 354 } 355 i
- Page 174 and 175: 164 Bilag A 94 } 95 { // H o r i s
- Page 176 and 177: 166 Bilag A 198 p r i v a t e void
- Page 178 and 179: 168 Bilag A 303 f [ 1 ] [ 0 ] [ 1 ]
- Page 180 and 181: 170 Bilag A 409 f o r ( i n t r =0;
- 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 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 232 and 233: 222 Bilag A 449 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
210 Bilag A<br />
176 System . out . p r i n t l n ( i +” ”+n . c h i l d r e n . get ( i )+” Depth : ”+n<br />
. c h i l d r e n . get ( i ) . d+” Score ”+n . c h i l d r e n . get ( i ) . a ) ;<br />
177 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . par+” ”+n . c h i l d r e n<br />
. get ( i ) . a+” b ”+n . c h i l d r e n . get ( i ) . bc+”,”+n . c h i l d r e n<br />
. get ( i ) . br+” w ”+n . c h i l d r e n . get ( i ) . wc+”,”+n .<br />
c h i l d r e n . get ( i ) . wr+” ”+n . c h i l d r e n . get ( i ) . c h i l d r e n +”<br />
”+n . c h i l d r e n . get ( i ) . nodeBoard ) ;<br />
178 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 0 ] + ”<br />
”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 0 ] + ” ”+n . c h i l d r e n .<br />
get ( i ) . nodeBoard [ 2 ] [ 0 ] + ” ”+n . c h i l d r e n . get ( i ) .<br />
nodeBoard [ 3 ] [ 0 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard<br />
[ 4 ] [ 0 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 5 ] [ 0 ] ) ;<br />
179 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 1 ] + ”<br />
”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 1 ] + ” ”+n . c h i l d r e n .<br />
get ( i ) . nodeBoard [ 2 ] [ 1 ] + ” ”+n . c h i l d r e n . get ( i ) .<br />
nodeBoard [ 3 ] [ 1 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard<br />
[ 4 ] [ 1 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 5 ] [ 1 ] ) ;<br />
180 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 2 ] + ”<br />
”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 2 ] + ” ”+n . c h i l d r e n .<br />
get ( i ) . nodeBoard [ 2 ] [ 2 ] + ” ”+n . c h i l d r e n . get ( i ) .<br />
nodeBoard [ 3 ] [ 2 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard<br />
[ 4 ] [ 2 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 5 ] [ 2 ] ) ;<br />
181 i f ( tModel . noRows > 3) {<br />
182 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard<br />
[ 0 ] [ 3 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 3 ] + ”<br />
”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 3 ] + ” ”+n .<br />
c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 3 ] + ” ”+n . c h i l d r e n .<br />
get ( i ) . nodeBoard [ 4 ] [ 3 ] + ” ”+n . c h i l d r e n . get ( i ) .<br />
nodeBoard [ 5 ] [ 3 ] ) ;<br />
183 i f ( tModel . noRows > 4) {<br />
184 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard<br />
[ 0 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard<br />
[ 1 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard<br />
[ 2 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard<br />
[ 3 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard<br />
[ 4 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard<br />
[ 5 ] [ 4 ] ) ;<br />
185 i f ( tModel . noRows > 5) {<br />
186 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) .<br />
nodeBoard [ 0 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) .<br />
nodeBoard [ 1 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) .<br />
nodeBoard [ 2 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) .<br />
nodeBoard [ 3 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) .<br />
nodeBoard [ 4 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) .<br />
nodeBoard [ 5 ] [ 5 ] ) ;<br />
187 i f ( tModel . noRows > 6) {<br />
188 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) .<br />
nodeBoard [ 0 ] [ 6 ] + ” ”+n . c h i l d r e n . get (<br />
i ) . nodeBoard [ 1 ] [ 6 ] + ” ”+n . c h i l d r e n .<br />
get ( i ) . nodeBoard [ 2 ] [ 6 ] + ” ”+n .<br />
c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 6 ] + ”<br />
”+n . c h i l d r e n . get ( i ) . nodeBoard<br />
[ 4 ] [ 6 ] + ” ”+n . c h i l d r e n . get ( i ) .<br />
nodeBoard [ 5 ] [ 6 ] ) ;<br />
189 i f ( tModel . noRows > 7) {