RCS file: /home/arend/Go/gnugo-rsync/gnugo/engine/value_moves.c,v
retrieving revision 1.171
diff -u -p -r1.171 value_moves.c
|
|
|
estimate_strategical_value(int pos, int |
| 2977 | 2977 | || (owl_move_reason_known(pos, aa) |
| 2978 | 2978 | && dragon[aa].status == CRITICAL) |
| 2979 | 2979 | || move_reason_known(pos, SEMEAI_MOVE, aa)) { |
| | 2980 | float excess_value; |
| | 2981 | int our_dragon = (color == worm[aa].color); |
| | 2982 | float dragon_ter_val = 2 * DRAGON2(aa).strategic_size; |
| | 2983 | |
| | 2984 | if ((our_dragon && defense_move_known(pos, aa) == WIN) |
| | 2985 | || (!our_dragon && attack_move_known(pos, aa) == WIN)) { |
| | 2986 | excess_value = dragon_ter_val - move[pos].territorial_value; |
| | 2987 | if (excess_value > 0.0) { |
| | 2988 | /* We haven't counted all the territorial value, the most probably |
| | 2989 | * because of ko situations - repair it here. |
| | 2990 | * FIXME: We should count values of all ko threats to know how |
| | 2991 | * much we really gain. As for now 0.75 factor is used. */ |
| | 2992 | excess_value *= 0.75; |
| | 2993 | TRACE(" %1m: %f - territory underestimation bonus for %1m\n", pos, |
| | 2994 | excess_value, aa); |
| | 2995 | tot_value += excess_value; |
| | 2996 | } |
| | 2997 | } |
| | 2998 | |
| 2980 | 2999 | /* But if the strategical value was larger than the territorial |
| 2981 | 3000 | * value (e.g. because connecting to strong dragon) we award the |
| 2982 | 3001 | * excess value as a bonus. |
| 2983 | 3002 | */ |
| 2984 | | float excess_value = (dragon_value[aa] - |
| 2985 | | 2 * DRAGON2(aa).strategic_size); |
| | 3003 | excess_value = (dragon_value[aa] - dragon_ter_val); |
| 2986 | 3004 | if (excess_value > 0.0) { |
| 2987 | 3005 | TRACE(" %1m: %f - strategic bonus for %1m\n", pos, excess_value, aa); |
| 2988 | 3006 | tot_value += excess_value; |