RCS file: /cvsroot/gnugo/gnugo/engine/dragon.c,v
retrieving revision 1.160
diff -u -r1.160 dragon.c
|
|
|
|
| 726 | 726 | set_eyevalue(&dragon2[d].genus, 0, 0, 0, 0); |
| 727 | 727 | |
| 728 | 728 | dragon2[d].semeais = 0; |
| | 729 | dragon2[d].semeai_defense_code = 0; |
| 729 | 730 | dragon2[d].semeai_defense_point = NO_MOVE; |
| | 731 | dragon2[d].semeai_attack_code = 0; |
| 730 | 732 | dragon2[d].semeai_attack_point = NO_MOVE; |
| 731 | 733 | dragon2[d].owl_attack_point = NO_MOVE; |
| 732 | 734 | dragon2[d].owl_attack_code = 0; |
| … |
… |
|
| 1573 | 1575 | } |
| 1574 | 1576 | if (dd->status == CRITICAL && d2->semeais) { |
| 1575 | 1577 | if (d2->semeai_defense_point) |
| 1576 | | gprintf("... semeai defense move at %1m\n", d2->semeai_defense_point); |
| | 1578 | gprintf("... semeai defense move at %1m, result code %s\n", |
| | 1579 | d2->semeai_defense_point, |
| | 1580 | result_to_string(d2->semeai_defense_code)); |
| 1577 | 1581 | if (d2->semeai_attack_point) |
| 1578 | | gprintf("... semeai attack move at %1m\n", d2->semeai_attack_point); |
| | 1582 | gprintf("... semeai attack move at %1m, result code %s\n", |
| | 1583 | d2->semeai_attack_point, |
| | 1584 | result_to_string(d2->semeai_attack_code)); |
| 1579 | 1585 | } |
| 1580 | 1586 | gprintf("... neighbors"); |
| 1581 | 1587 | for (k = 0; k < d2->neighbors; k++) { |
| … |
… |
|
| 2509 | 2515 | gfprintf(outfile, "owl_attack_kworm %1m\n", d2->owl_attack_kworm); |
| 2510 | 2516 | gfprintf(outfile, "owl_defense_kworm %1m\n", d2->owl_defense_kworm); |
| 2511 | 2517 | gfprintf(outfile, "semeais %d\n", d2->semeais); |
| | 2518 | gfprintf(outfile, "semeai_defense_code %d\n", d2->semeai_defense_code); |
| 2512 | 2519 | gfprintf(outfile, "semeai_defense_point %1m\n", d2->semeai_defense_point); |
| 2513 | 2520 | gfprintf(outfile, "semeai_defense_certain %d\n", |
| 2514 | 2521 | d2->semeai_defense_certain); |
| 2515 | 2522 | gfprintf(outfile, "semeai_defense_target %1m\n", |
| 2516 | 2523 | d2->semeai_defense_target); |
| | 2524 | gfprintf(outfile, "semeai_attack_code %d\n", d2->semeai_attack_code); |
| 2517 | 2525 | gfprintf(outfile, "semeai_attack_point %1m\n", d2->semeai_attack_point); |
| 2518 | 2526 | gfprintf(outfile, "semeai_attack_certain %d\n", d2->semeai_attack_certain); |
| 2519 | 2527 | gfprintf(outfile, "semeai_attack_target %1m\n", d2->semeai_attack_target); |
RCS file: /cvsroot/gnugo/gnugo/engine/liberty.h,v
retrieving revision 1.256
diff -u -r1.256 liberty.h
|
|
|
|
| 887 | 887 | int surround_size; /* Size of the surrounding area */ |
| 888 | 888 | |
| 889 | 889 | int semeais; /* number of semeais in which the dragon is involved */ |
| | 890 | int semeai_defense_code ;/* Result code for semeai defense. */ |
| 890 | 891 | int semeai_defense_point;/* Move found by semeai code to rescue dragon */ |
| 891 | 892 | int semeai_defense_certain; |
| 892 | 893 | int semeai_defense_target; /* The opponent dragon involved in the semeai */ |
| | 894 | int semeai_attack_code ; /* Result code for semeai attack. */ |
| 893 | 895 | int semeai_attack_point; /* Move found by semeai code to kill dragon */ |
| 894 | 896 | int semeai_attack_certain; |
| 895 | 897 | int semeai_attack_target; /* The opponent dragon involved in the semeai */ |
RCS file: /cvsroot/gnugo/gnugo/engine/semeai.c,v
retrieving revision 1.77
diff -u -r1.77 semeai.c
|
|
|
|
| 210 | 210 | update_status(DRAGON(d1).origin, CRITICAL, CRITICAL); |
| 211 | 211 | else if (best_attack == 0 && attack_certain) |
| 212 | 212 | update_status(DRAGON(d1).origin, ALIVE, ALIVE); |
| | 213 | dragon2[d1].semeai_defense_code = best_defense; |
| 213 | 214 | dragon2[d1].semeai_defense_point = defense_move; |
| 214 | 215 | dragon2[d1].semeai_defense_certain = defense_certain; |
| 215 | 216 | gg_assert(board[semeai_defense_target] == OTHER_COLOR(board[dragon2[d1].origin])); |
| 216 | 217 | dragon2[d1].semeai_defense_target = semeai_defense_target; |
| | 218 | dragon2[d1].semeai_attack_code = best_attack; |
| 217 | 219 | dragon2[d1].semeai_attack_point = attack_move; |
| 218 | 220 | dragon2[d1].semeai_attack_certain = attack_certain; |
| 219 | 221 | dragon2[d1].semeai_attack_target = semeai_attack_target; |
| … |
… |
|
| 284 | 286 | defend_move, str, opponent); |
| 285 | 287 | dragon2[d].semeais++; |
| 286 | 288 | update_status(str, CRITICAL, CRITICAL); |
| | 289 | dragon2[d].semeai_defense_code = resulta; |
| 287 | 290 | dragon2[d].semeai_defense_point = defend_move; |
| 288 | 291 | dragon2[d].semeai_defense_certain = certain; |
| 289 | 292 | gg_assert(board[opponent] == OTHER_COLOR(board[dragon2[d].origin])); |
| … |
… |
|
| 296 | 299 | owl_analyze_semeai_after_move(defend_move, OTHER_COLOR(color), |
| 297 | 300 | str, opponent, &resulta, NULL, |
| 298 | 301 | NULL, 1, NULL, 0); |
| 299 | | if (resulta != WIN) |
| | 302 | if (resulta != WIN) { |
| | 303 | dragon2[d].semeai_attack_code = REVERSE_RESULT(resulta); |
| 300 | 304 | dragon2[d].semeai_attack_point = defend_move; |
| | 305 | } |
| 301 | 306 | else { |
| 302 | 307 | int k; |
| 303 | 308 | int libs[MAXLIBS]; |
| … |
… |
|
| 308 | 313 | str, opponent, &resulta, NULL, |
| 309 | 314 | NULL, 1, NULL, 0); |
| 310 | 315 | if (resulta != WIN) { |
| | 316 | dragon2[d].semeai_attack_code = REVERSE_RESULT(resulta); |
| 311 | 317 | dragon2[d].semeai_attack_point = libs[k]; |
| 312 | 318 | break; |
| 313 | 319 | } |
| … |
… |
|
| 317 | 323 | DEBUG(DEBUG_SEMEAI, |
| 318 | 324 | "No move to attack in semeai (%1m vs %1m), seki assumed.\n", |
| 319 | 325 | str, opponent); |
| | 326 | dragon2[d].semeai_attack_code = 0; |
| 320 | 327 | dragon2[d].semeai_attack_point = NO_MOVE; |
| 321 | 328 | update_status(str, ALIVE, ALIVE_IN_SEKI); |
| 322 | 329 | } |
| … |
… |
|
| 382 | 389 | defend_move, str, opponent); |
| 383 | 390 | dragon2[d].semeais++; |
| 384 | 391 | update_status(str, CRITICAL, CRITICAL); |
| | 392 | dragon2[d].semeai_defense_code = resulta; |
| 385 | 393 | dragon2[d].semeai_defense_point = defend_move; |
| 386 | 394 | dragon2[d].semeai_defense_certain = certain; |
| 387 | 395 | gg_assert(board[opponent] == OTHER_COLOR(board[dragon2[d].origin])); |
| … |
… |
|
| 394 | 402 | owl_analyze_semeai_after_move(defend_move, OTHER_COLOR(color), |
| 395 | 403 | str, opponent, &resulta, NULL, |
| 396 | 404 | NULL, 1, NULL, 0); |
| 397 | | if (resulta != WIN) |
| | 405 | if (resulta != WIN) { |
| | 406 | dragon2[d].semeai_attack_code = REVERSE_RESULT(resulta); |
| 398 | 407 | dragon2[d].semeai_attack_point = defend_move; |
| | 408 | } |
| 399 | 409 | else { |
| 400 | 410 | int k; |
| 401 | 411 | int libs[MAXLIBS]; |
| … |
… |
|
| 406 | 416 | str, opponent, &resulta, NULL, |
| 407 | 417 | NULL, 1, NULL, 0); |
| 408 | 418 | if (resulta != WIN) { |
| | 419 | dragon2[d].semeai_attack_code = REVERSE_RESULT(resulta); |
| 409 | 420 | dragon2[d].semeai_attack_point = libs[k]; |
| 410 | 421 | break; |
| 411 | 422 | } |
| … |
… |
|
| 415 | 426 | DEBUG(DEBUG_SEMEAI, |
| 416 | 427 | "No move to attack in semeai (%1m vs %1m), seki assumed.\n", |
| 417 | 428 | str, opponent); |
| | 429 | dragon2[d].semeai_attack_code = 0; |
| 418 | 430 | dragon2[d].semeai_attack_point = NO_MOVE; |
| 419 | 431 | update_status(str, ALIVE, ALIVE_IN_SEKI); |
| 420 | 432 | } |