diff -N -r -u -X .ignore gnugo-copy/config.vc gnugo/config.vc
|
old
|
new
|
|
| 30 | 30 | /* GAIN/LOSS codes. Disabled by default. */ |
| 31 | 31 | #define EXPERIMENTAL_OWL_EXT 0 |
| 32 | 32 | |
| | 33 | /* Disable unneeded things. 0 standard. */ |
| | 34 | #define FINAL_RELEASE 0 |
| | 35 | |
| 33 | 36 | /* Define as 1 to use the grid optimisation, or 2 to run it in self-test mode |
| 34 | 37 | */ |
| 35 | 38 | #define GRID_OPT 1 |
diff -N -r -u -X .ignore gnugo-copy/engine/value_moves.c gnugo/engine/value_moves.c
|
old
|
new
|
|
| 2981 | 2981 | || (owl_move_reason_known(pos, aa) |
| 2982 | 2982 | && dragon[aa].status == CRITICAL) |
| 2983 | 2983 | || move_reason_known(pos, SEMEAI_MOVE, aa)) { |
| | 2984 | float excess_value; |
| | 2985 | int our_dragon = (color == worm[aa].color); |
| | 2986 | float dragon_ter_val = 2 * DRAGON2(aa).strategic_size; |
| | 2987 | |
| | 2988 | if ((our_dragon && defense_move_known(pos, aa) == WIN) |
| | 2989 | || (!our_dragon && attack_move_known(pos, aa) == WIN)) { |
| | 2990 | excess_value = dragon_ter_val - move[pos].territorial_value; |
| | 2991 | if (excess_value > 0.0) { |
| | 2992 | /* We haven't counted all the territorial value, the most probably |
| | 2993 | * because of ko situations - repair it here. |
| | 2994 | * FIXME: We should count values of all ko threats to know how |
| | 2995 | * much we really gain. As for now 0.75 factor is used. */ |
| | 2996 | excess_value *= 0.75; |
| | 2997 | TRACE(" %1m: %f - territory underestimation bonus for %1m\n", pos, |
| | 2998 | excess_value, aa); |
| | 2999 | tot_value += excess_value; |
| | 3000 | } |
| | 3001 | } |
| | 3002 | |
| 2984 | 3003 | /* But if the strategical value was larger than the territorial |
| 2985 | 3004 | * value (e.g. because connecting to strong dragon) we award the |
| 2986 | 3005 | * excess value as a bonus. |
| 2987 | 3006 | */ |
| 2988 | | float excess_value = (dragon_value[aa] - |
| 2989 | | 2 * DRAGON2(aa).strategic_size); |
| | 3007 | excess_value = (dragon_value[aa] - dragon_ter_val); |
| 2990 | 3008 | if (excess_value > 0.0) { |
| 2991 | 3009 | TRACE(" %1m: %f - strategic bonus for %1m\n", pos, excess_value, aa); |
| 2992 | 3010 | tot_value += excess_value; |
diff -N -r -u -X .ignore gnugo-copy/engine/worm.c gnugo/engine/worm.c
|
old
|
new
|
|
| 1734 | 1734 | } |
| 1735 | 1735 | |
| 1736 | 1736 | |
| | 1737 | /* Find stones, that could live for sure, if player (color) moves |
| | 1738 | * first. |
| | 1739 | */ |
| | 1740 | |
| 1737 | 1741 | void |
| 1738 | 1742 | get_lively_stones(int color, signed char safe_stones[BOARDMAX]) |
| 1739 | 1743 | { |
| … |
… |
|
| 1741 | 1745 | memset(safe_stones, 0, BOARDMAX * sizeof(*safe_stones)); |
| 1742 | 1746 | for (pos = BOARDMIN; pos < BOARDMAX; pos++) |
| 1743 | 1747 | if (IS_STONE(board[pos]) && worm[pos].origin == pos) { |
| 1744 | | if ((stackp == 0 && worm[pos].attack_codes[0] == 0) || !attack(pos, NULL) |
| | 1748 | if ((!stackp && !worm[pos].attack_codes[0]) |
| | 1749 | || (stackp && !attack(pos, NULL)) |
| 1745 | 1750 | || (board[pos] == color |
| 1746 | | && ((stackp == 0 && worm[pos].defense_codes[0] != 0) |
| 1747 | | || find_defense(pos, NULL)))) |
| | 1751 | && ((!stackp && worm[pos].defense_codes[0] == WIN) |
| | 1752 | || (stackp && find_defense(pos, NULL) == WIN)))) |
| 1748 | 1753 | mark_string(pos, safe_stones, 1); |
| 1749 | 1754 | } |
| 1750 | 1755 | } |
diff -N -r -u -X .ignore gnugo-copy/regression/arb.tst gnugo/regression/arb.tst
|
old
|
new
|
|
| 66 | 66 | # Defend against a combination attack. |
| 67 | 67 | loadsgf games/arb/game03.sgf 109 |
| 68 | 68 | 232 reg_genmove black |
| 69 | | #? [M9|M10|L10|L11] |
| | 69 | #? [M9|M10|M11|L10|L11] |
| 70 | 70 | |
| 71 | 71 | loadsgf games/arb/game04.sgf 43 |
| 72 | 72 | 233 reg_genmove black |
diff -N -r -u -X .ignore gnugo-copy/regression/nngs4.tst gnugo/regression/nngs4.tst
|
old
|
new
|
|
| 249 | 249 | #C13 looks correct here /evand |
| 250 | 250 | loadsgf games/nngs/gnugo-3.3.10-niki-200210281349.sgf 144 |
| 251 | 251 | 610 reg_genmove white |
| 252 | | #? [C13|D13] |
| | 252 | #? [C13|D13|B14] |
| 253 | 253 | |
| 254 | 254 | #New failure (3.3.20) |
| 255 | 255 | #pull out the stones /evand |