From c4c8aa1bd4ed386bffbc5c174fd0229d6cf43623 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sat, 29 Mar 2008 05:44:11 +0100 Subject: [PATCH] UCB1: Fix setting prior value --- uct/policy/ucb1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uct/policy/ucb1.c b/uct/policy/ucb1.c index e56a25b..710c9b0 100644 --- a/uct/policy/ucb1.c +++ b/uct/policy/ucb1.c @@ -108,7 +108,7 @@ ucb1_prior(struct uct_policy *p, struct tree *tree, struct tree_node *node, stru } if (node->playouts) - node->value = node->wins / node->playouts; + node->value = (float) node->wins / node->playouts; //fprintf(stderr, "prior: %d/%d\n", node->wins, node->playouts); } -- 2.11.4.GIT