[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] score_3_16.1
From: |
Portela Fernand |
Subject: |
[gnugo-devel] score_3_16.1 |
Date: |
Fri, 17 Jan 2003 23:25:50 +0100 |
There is currently a good number of inconsistencies regarding score
estimation. Following patch fixes a couple bugs and (hopefully) makes the
code consistent, e.g. the pair of parameters is everywhere (&upper, &lower)
The bugs (passing lower_bound instead of score to review_move_reasons)
probably weren't having a very large impact, but they most probably pushed
GG to play sometimes differently when having white.
Specifically, there's a single FAIL in the regressions, strategy:226
In the traces:
Before :
Score estimate: W 23.50 to B 53.50
^^^^^^^^-------------------> GG believes to be ahead
F5: owl attack/defend for F3
F5: owl attack/defend for G4
F5: owl attack/defend for E4
F5: 19.05 - change in territory
F5: 3.68 - strategic effect on E6
F5: 9.36 - strategic effect on G6
F5: 0.68 - strategic bonus for E4
F5: 0.98 - strategic bonus for G4
F5: 1.32 - strategic bonus for F3
F5: 3.15 - total followup value, added 3.15 as territorial followup
F5: 1.57 - added due to followup (3.15) and reverse followup values (0.00)
F5: 5.78 - shape (shape values +2.00(2) -0.00(0), shape factor 1.158)
F5: 0.20 - connects strings (connect value 2, shape factor 0.040)
Move generation values F5 to 42.62
S3: owl attack/defend for Q4
S3: 34.06 - change in territory
S3: 5.67 - total followup value, added 5.67 as territorial followup
S3: 2.83 - added due to followup (5.67) and reverse followup values (0.00)
S3: 0.20 - connects strings (connect value 2, shape factor 0.040)
Move generation values S3 to 37.10
After (with some more details) :
Score estimate: B 53.50 to W 23.50
^^^^^^^^-----------------> GG thinks now to be way behind
F5: owl attack/defend for F3
F5: owl attack/defend for G4
F5: owl attack/defend for E4
F5: 19.05 - change in territory
F5: 5.73 - G6 strategic attack/defend
F5: 2.25 - E6 strategic attack/defend
F5: 3.25 - E4 cut/connect strategic value
F5: 6.25 - F3 cut/connect strategic value
F5: 7.24 - F3 cut/connect strategic value
F5: 3.76 - E4 cut/connect strategic value
F5: 4.67 - G4 cut/connect strategic value
F5: 4.67 - G4 cut/connect strategic value
F5: 5.41 - G4 cut/connect strategic value
F5: 2.63 - E6 cut/connect strategic value
F5: 6.69 - G6 cut/connect strategic value
F5: 2.63 - strategic effect on E6
F5: 6.69 - strategic effect on G6
F5: 0.34 - strategic bonus for E4
F5: 0.49 - strategic bonus for G4
F5: 0.66 - strategic bonus for F3
F5: 3.15 - total followup value, added 3.15 as territorial followup
F5: 1.57 - added due to followup (3.15) and reverse followup values (0.00)
F5: 4.95 - shape (shape values +2.00(2) -0.00(0), shape factor 1.158)
F5: 0.20 - connects strings (connect value 2, shape factor 0.040)
Move generation values F5 to 36.58
S3: owl attack/defend for Q4
S3: 34.06 - change in territory
S3: 5.67 - total followup value, added 5.67 as territorial followup
S3: 2.83 - added due to followup (5.67) and reverse followup values (0.00)
S3: 0.20 - connects strings (connect value 2, shape factor 0.040)
Move generation values S3 to 37.10
Notice the drops in the strategic valuations for F5. In conclusion,
the fail is due to the fact that connections are more valued when being
ahead than when being behind. This also points out that the score estimation
policy probably needs some revisions : W isn't so far behind since either
groups can be saved (but not both of course)
/nando
- score estimation inconsistencies and bugs fixed
Index: engine/aftermath.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/aftermath.c,v
retrieving revision 1.40
diff -u -r1.40 aftermath.c
--- engine/aftermath.c 2 Jan 2003 00:23:28 -0000 1.40
+++ engine/aftermath.c 17 Jan 2003 20:11:50 -0000
@@ -806,7 +806,7 @@
* we are behind, we have to play more daringly.
*/
if (level >= 8) {
- estimate_score(&lower_bound, &upper_bound);
+ estimate_score(&upper_bound, &lower_bound);
if (verbose || showscore) {
if (lower_bound == upper_bound)
gprintf("\nScore estimate: %s %f\n",
@@ -850,7 +850,7 @@
gg_assert(stackp == 0);
/* Review the move reasons and estimate move values. */
- if (review_move_reasons(move, &val, color, 0.0, lower_bound, NULL))
+ if (review_move_reasons(move, &val, color, 0.0, score, NULL))
TRACE("Move generation likes %1m with value %f\n", *move, val);
gg_assert(stackp == 0);
Index: engine/genmove.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/genmove.c,v
retrieving revision 1.62
diff -u -r1.62 genmove.c
--- engine/genmove.c 2 Jan 2003 00:23:28 -0000 1.62
+++ engine/genmove.c 17 Jan 2003 20:11:51 -0000
@@ -351,7 +351,7 @@
* we are behind, we have to play more daringly.
*/
if (level >= 8) {
- estimate_score(&lower_bound, &upper_bound);
+ estimate_score(&upper_bound, &lower_bound);
if (verbose || showscore) {
if (lower_bound == upper_bound)
gprintf("\nScore estimate: %s %f\n",
@@ -429,7 +429,7 @@
/* Review the move reasons and estimate move values. */
if (review_move_reasons(move, &val, color,
- pure_threat_value, lower_bound, allowed_moves))
+ pure_threat_value, score, allowed_moves))
TRACE("Move generation likes %1m with value %f\n", *move, val);
gg_assert(stackp == 0);
time_report(1, "review move reasons", NO_MOVE, 1.0);
Index: engine/interface.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/interface.c,v
retrieving revision 1.36
diff -u -r1.36 interface.c
--- engine/interface.c 2 Jan 2003 00:23:28 -0000 1.36
+++ engine/interface.c 17 Jan 2003 20:11:51 -0000
@@ -335,7 +335,7 @@
float
gnugo_estimate_score(float *upper, float *lower)
{
- return estimate_score(lower, upper);
+ return estimate_score(upper, lower);
}
Index: interface/play_ascii.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/interface/play_ascii.c,v
retrieving revision 1.33
diff -u -r1.33 play_ascii.c
--- interface/play_ascii.c 3 Jan 2003 18:23:42 -0000 1.33
+++ interface/play_ascii.c 17 Jan 2003 20:11:52 -0000
@@ -446,7 +446,7 @@
/* Generate computer move. */
move_val = gnugo_genmove(&i, &j, gameinfo->to_move);
if (showscore) {
- gnugo_estimate_score(&lower_bound, &upper_bound);
+ gnugo_estimate_score(&upper_bound, &lower_bound);
current_score_estimate = (int) ((lower_bound + upper_bound) / 2.0);
}
Index: interface/play_gmp.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/interface/play_gmp.c,v
retrieving revision 1.18
diff -u -r1.18 play_gmp.c
--- interface/play_gmp.c 2 Jan 2003 00:23:29 -0000 1.18
+++ interface/play_gmp.c 17 Jan 2003 20:11:53 -0000
@@ -215,7 +215,7 @@
/* play_gmp() does not return to main(), therefore the score
* writing code is here.
*/
- score = gnugo_estimate_score(&lower_bound, &upper_bound);
+ score = gnugo_estimate_score(&upper_bound, &lower_bound);
sgfWriteResult(sgftree.root, score, 1);
sgffile_output(&sgftree);
Index: interface/play_solo.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/interface/play_solo.c,v
retrieving revision 1.23
diff -u -r1.23 play_solo.c
--- interface/play_solo.c 2 Jan 2003 00:23:29 -0000 1.23
+++ interface/play_solo.c 17 Jan 2003 20:11:53 -0000
@@ -113,7 +113,7 @@
/* Two passes and it's over. (EMPTY == BOTH) */
gnugo_who_wins(EMPTY, stdout);
- score = gnugo_estimate_score(&lower_bound, &upper_bound);
+ score = gnugo_estimate_score(&upper_bound, &lower_bound);
sgfWriteResult(sgftree.root, score, 1);
sgffile_output(&sgftree);
@@ -232,7 +232,7 @@
if (!strcmp(scoringmode, "aftermath"))
score = aftermath_compute_score(next, komi, &score_tree);
else
- score = gnugo_estimate_score(&lower_bound, &upper_bound);
+ score = gnugo_estimate_score(&upper_bound, &lower_bound);
if (score < 0.0) {
sprintf(text, "Black wins by %1.1f points\n", -score);
- [gnugo-devel] score_3_16.1,
Portela Fernand <=