From 9f86d18f1dd76eb1395f42deeafac834688ffffd Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sun, 7 Mar 2010 15:55:28 +0100 Subject: [PATCH] t->score: Fix up several bugs --- uct/tree.h | 4 ++-- uct/walk.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/uct/tree.h b/uct/tree.h index 8b6406c..78acaaa 100644 --- a/uct/tree.h +++ b/uct/tree.h @@ -95,8 +95,8 @@ struct tree { * based on leaf node depth. */ float extra_komi; - /* Information on average score at the game end, white wins => - * positive. */ + /* Information on average score at the game end (from black's + * perspective). */ /* N.B.: Some users may need average score carried over from previous * move to initialize. Thus, this information is NOT zeroed on node * promotion, you are responsible for zeroing it for yourself if you diff --git a/uct/walk.c b/uct/walk.c index fdd0337..b0fc107 100644 --- a/uct/walk.c +++ b/uct/walk.c @@ -435,7 +435,7 @@ uct_playout(struct uct *u, struct board *b, enum stone player_color, struct tree assert(n == t->root || n->parent); if (result != 0) { - stats_add_result(&t->score, result, 1); + stats_add_result(&t->score, result / 2, 1); float rval = scale_value(u, b, result); u->policy->update(u->policy, t, n, node_color, player_color, amaf, rval); -- 2.11.4.GIT