From 7896f2a2c9570392d62eb45dae3734ebd587e2c9 Mon Sep 17 00:00:00 2001 From: Jean-loup Gailly Date: Sun, 21 Feb 2010 22:48:17 +0100 Subject: [PATCH] For fast_alloc max_tree_size now includes the temp tree used for pruning. --- uct/uct.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/uct/uct.c b/uct/uct.c index 29a7dbe..51fd3f2 100644 --- a/uct/uct.c +++ b/uct/uct.c @@ -1081,6 +1081,7 @@ uct_state_init(char *arg, struct board *b) u->random_policy_chance = atoi(optval); } else if (!strcasecmp(optname, "max_tree_size") && optval) { /* Maximum amount of memory [MiB] consumed by the move tree. + * For fast_alloc it includes the temp tree used for pruning. * Default is 3072 (3 GiB). Note that if you use TM_ROOT, * this limits size of only one of the trees, not all of them * together. */ @@ -1121,6 +1122,8 @@ uct_state_init(char *arg, struct board *b) fprintf(stderr, "fast_alloc not supported with root parallelization.\n"); exit(1); } + if (u->fast_alloc) + u->max_tree_size = (100 * u->max_tree_size) / (100 + MIN_FREE_MEM_PERCENT); if (!u->prior) u->prior = uct_prior_init(NULL, b); -- 2.11.4.GIT