From 873a1b304a3f1d4354c6197c4beb31830de553db Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sat, 14 Jan 2012 23:55:59 +0100 Subject: [PATCH] Dynkomi linear_permove(): Work around assertion failure Just print a debug print until we have time to track down and properly fix the negative extra_komi issue. --- uct/dynkomi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uct/dynkomi.c b/uct/dynkomi.c index d74f5cc..86ef673 100644 --- a/uct/dynkomi.c +++ b/uct/dynkomi.c @@ -88,7 +88,9 @@ linear_permove(struct uct_dynkomi *d, struct board *b, struct tree *tree) floating_t my_value = tree_node_get_value(tree, 1, tree->root->u.value); /* We normalize komi as in komi_by_value(), > 0 when winning. */ extra_komi = komi_by_color(extra_komi, color); - assert(extra_komi >= 0); + if (extra_komi < 0 && DEBUGL(3)) + fprintf(stderr, "XXX: extra_komi %.3f < 0 (color %s tree ek %.3f)\n", extra_komi, stone2str(color), tree->extra_komi); + // assert(extra_komi >= 0); floating_t orig_komi = extra_komi; if (my_value < 0.5 && l->komi_ratchet > 0 && l->komi_ratchet != INFINITY) { -- 2.11.4.GIT