From 6e402e52d738309aac50fa397deaa668f6a63aee Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Wed, 20 Mar 2013 00:23:43 +0900 Subject: [PATCH] uct_playout(): Add comment warning about the result number mess, I got caught up in it myself again --- uct/walk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/uct/walk.c b/uct/walk.c index 501f2a5..a5715ed 100644 --- a/uct/walk.c +++ b/uct/walk.c @@ -534,6 +534,12 @@ uct_playout(struct uct *u, struct board *b, enum stone player_color, struct tree b2.komi += round(u->dynkomi->persim(u->dynkomi, &b2, t, n)); } + /* !!! !!! !!! + * ALERT: The "result" number is extremely confusing. In some parts + * of the code, it is from white's perspective, but here positive + * number is black's win! Be VERY CAREFUL. + * !!! !!! !!! */ + if (passes >= 2) { /* XXX: No dead groups support. */ floating_t score = board_official_score(&b2, NULL); -- 2.11.4.GIT