RCS file: /cvsroot/gnugo/gnugo/engine/aftermath.c,v
retrieving revision 1.60
diff -u -r1.60 aftermath.c
|
|
|
|
| 93 | 93 | * 4. Extend an invincible string towards an opponent string or an own |
| 94 | 94 | * non-invincible string. |
| 95 | 95 | * 5. Split a big eyespace of an alive own dragon without invincible |
| 96 | | * strings into smaller pieces. |
| | 96 | * strings into smaller pieces. Do not play self-atari here. |
| 97 | 97 | * 6. Play a liberty of a dead opponent dragon. |
| 98 | 98 | * |
| 99 | 99 | * Steps 2--4 are interleaved to try to optimize the efficiency of the |
| … |
… |
|
| 437 | 437 | if (board[pos] != EMPTY || distance[pos] != -1) |
| 438 | 438 | continue; |
| 439 | 439 | |
| | 440 | /* Do not play self-atari here. */ |
| | 441 | if (is_self_atari(pos, color)) |
| | 442 | continue; |
| | 443 | |
| 440 | 444 | memset(mx, 0, sizeof(mx)); |
| 441 | 445 | |
| 442 | 446 | for (k = 0; k < 8; k++) { |
RCS file: /cvsroot/gnugo/gnugo/engine/dragon.c,v
retrieving revision 1.161
diff -u -r1.161 dragon.c
|
|
|
|
| 310 | 310 | if (ON_BOARD(str) && board[str] != EMPTY) |
| 311 | 311 | dragon[str] = dragon[dragon[str].origin]; |
| 312 | 312 | |
| | 313 | identify_thrashing_dragons(); |
| | 314 | |
| 313 | 315 | /* Owl threats. */ |
| 314 | 316 | for (str = BOARDMIN; str < BOARDMAX; str++) |
| 315 | 317 | if (ON_BOARD(str) |
| … |
… |
|
| 329 | 331 | int acode = DRAGON2(str).owl_attack_code; |
| 330 | 332 | int dcode = DRAGON2(str).owl_defense_code; |
| 331 | 333 | int defense_point, second_defense_point; |
| 332 | | |
| | 334 | |
| 333 | 335 | if (get_level() >= 8 |
| 334 | 336 | && !disable_threat_computation |
| 335 | 337 | && (owl_threats |
| … |
… |
|
| 418 | 420 | semeai(); |
| 419 | 421 | time_report(2, " semeai module", NO_MOVE, 1.0); |
| 420 | 422 | |
| 421 | | identify_thrashing_dragons(); |
| 422 | | |
| 423 | 423 | /* Count the non-dead dragons. */ |
| 424 | 424 | lively_white_dragons = 0; |
| 425 | 425 | lively_black_dragons = 0; |
RCS file: /cvsroot/gnugo/gnugo/engine/owl.c,v
retrieving revision 1.249
diff -u -r1.249 owl.c
|
|
|
|
| 2050 | 2050 | * attack with this move. |
| 2051 | 2051 | * |
| 2052 | 2052 | * If the move is suicide for us, try to find a backfilling |
| 2053 | | * move to play instead. |
| | 2053 | * move to play instead. Do this also if the move is a |
| | 2054 | * send-two-return-one sacrifice. |
| 2054 | 2055 | */ |
| 2055 | 2056 | const char *name = "defense move"; |
| 2056 | 2057 | |
| 2057 | | if (is_suicide(dpos, other)) { |
| | 2058 | if (is_suicide(dpos, other) || send_two_return_one(dpos, other)) { |
| 2058 | 2059 | int dpos2; |
| 2059 | 2060 | for (k = 0; k < 4; k++) { |
| 2060 | 2061 | if (board[dpos + delta[k]] == other |
RCS file: /cvsroot/gnugo/gnugo/engine/value_moves.c,v
retrieving revision 1.168
diff -u -r1.168 value_moves.c
|
|
|
|
| 95 | 95 | /* Do some thresholding. */ |
| 96 | 96 | if (fewlibs > 4) |
| 97 | 97 | fewlibs = 4; |
| | 98 | if (to_move && is_ko(pos, color, NULL) && fewlibs > 1) |
| | 99 | fewlibs = 1; |
| 98 | 100 | if (fewlibs == 0 && own_strings == 1) |
| 99 | 101 | own_strings = 0; |
| 100 | 102 | |
| … |
… |
|
| 160 | 162 | for (ii = BOARDMIN; ii < BOARDMAX; ii++) { |
| 161 | 163 | if (!ON_BOARD(ii)) |
| 162 | 164 | continue; |
| | 165 | |
| | 166 | /* Don't consider send-two-return-one moves here. */ |
| | 167 | if (send_two_return_one(ii, color)) |
| | 168 | continue; |
| 163 | 169 | |
| 164 | 170 | for (k = 0; k < MAX_REASONS; k++) { |
| 165 | 171 | int r = move[ii].reason[k]; |
| … |
… |
|
| 3141 | 3147 | + move[pos].reverse_followup_value); |
| 3142 | 3148 | } |
| 3143 | 3149 | |
| 3144 | | tot_value += 0.05 * move[pos].secondary_value; |
| | 3150 | tot_value += soft_cap(0.05 * move[pos].secondary_value, 0.4); |
| 3145 | 3151 | if (move[pos].secondary_value != 0.0) |
| 3146 | | TRACE(" %1m: %f - secondary\n", pos, 0.05 * move[pos].secondary_value); |
| | 3152 | TRACE(" %1m: %f - secondary\n", pos, |
| | 3153 | soft_cap(0.05 * move[pos].secondary_value, 0.4)); |
| 3147 | 3154 | |
| 3148 | 3155 | if (move[pos].numpos_shape + move[pos].numneg_shape > 0) { |
| 3149 | 3156 | /* shape_factor has already been computed. */ |
RCS file: /cvsroot/gnugo/gnugo/engine/worm.c,v
retrieving revision 1.71
diff -u -r1.71 worm.c
|
|
|
|
| 832 | 832 | for (k = 0; k < liberties; k++) { |
| 833 | 833 | int pos = libs[k]; |
| 834 | 834 | if (!attack_move_known(pos, str)) { |
| 835 | | /* Try to attack on the liberty. */ |
| 836 | | if (trymove(pos, other, "make_worms", str)) { |
| | 835 | /* Try to attack on the liberty. Don't consider |
| | 836 | * send-two-return-one moves. |
| | 837 | */ |
| | 838 | if (!send_two_return_one(pos, other) |
| | 839 | && trymove(pos, other, "make_worms", str)) { |
| 837 | 840 | if (board[str] == EMPTY || attack(str, NULL)) { |
| 838 | 841 | if (board[str] == EMPTY) |
| 839 | 842 | dcode = 0; |