From 154a6f57be0da4c1265c2f492ee40cac9de28c78 Mon Sep 17 00:00:00 2001 From: Jean-loup Gailly Date: Wed, 10 Mar 2010 02:28:14 +0100 Subject: [PATCH] Distributed slave: do not clear the tree before move is committed by master. --- uct/uct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uct/uct.c b/uct/uct.c index 4aed225..c9bbc65 100644 --- a/uct/uct.c +++ b/uct/uct.c @@ -776,7 +776,7 @@ uct_genmove(struct engine *e, struct board *b, struct time_info *ti, enum stone /* Choose the best move from the tree. */ struct tree_node *best = u->policy->choose(u->policy, u->t->root, b, color, resign); if (!best) { - reset_state(u); + if (!u->slave) reset_state(u); return coord_copy(pass); } if (UDEBUGL(1)) @@ -794,7 +794,7 @@ uct_genmove(struct engine *e, struct board *b, struct time_info *ti, enum stone if (tree_node_get_value(u->t, 1, best->u.value) < u->resign_ratio && !is_pass(best->coord) && best->u.playouts > GJ_MINGAMES && u->t->extra_komi <= 1 /* XXX we assume dynamic komi == we are black */) { - reset_state(u); + if (!u->slave) reset_state(u); return coord_copy(resign); } -- 2.11.4.GIT