From 62592aa87635ae70f280458afa496d81c70e74fc Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Thu, 24 Sep 2009 05:26:48 +0200 Subject: [PATCH] prepare_move(): Don't reuse tree created for the other color --- uct/uct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uct/uct.c b/uct/uct.c index b2db9f0..712f0d8 100644 --- a/uct/uct.c +++ b/uct/uct.c @@ -213,7 +213,7 @@ prepare_move(struct engine *e, struct board *b, enum stone color, coord_t promot { struct uct *u = e->data; - if (!b->moves && u->t) { + if ((!b->moves || color != stone_other(u->t->root_color)) && u->t) { /* Stale state from last game */ tree_done(u->t); u->t = NULL; -- 2.11.4.GIT