From a78a4a137aca218727c6473465c13de8ec819cf7 Mon Sep 17 00:00:00 2001 From: Jean-loup Gailly Date: Fri, 19 Nov 2010 20:02:10 +0100 Subject: [PATCH] Distributed engine: allow shared_levels=0 --- uct/slave.c | 7 +++++-- uct/uct.c | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/uct/slave.c b/uct/slave.c index fa58c71..5e5b5b9 100644 --- a/uct/slave.c +++ b/uct/slave.c @@ -529,8 +529,11 @@ uct_genmoves(struct engine *e, struct board *b, struct time_info *ti, enum stone coord_t best_coord; uct_search_result(u, b, color, pass_all_alive, played_games, s.base_playouts, &best_coord); - *stats_buf = report_incr_stats(u, stats_size); - + if (u->shared_levels) { + *stats_buf = report_incr_stats(u, stats_size); + } else { + *stats_size = 0; + } char *reply = report_stats(u, b, best_coord, keep_looking, *stats_size); return reply; } diff --git a/uct/uct.c b/uct/uct.c index b1a5a34..d7bd180 100644 --- a/uct/uct.c +++ b/uct/uct.c @@ -862,7 +862,6 @@ uct_state_init(char *arg, struct board *b) if (u->slave) { if (!u->stats_hbits) u->stats_hbits = DEFAULT_STATS_HBITS; if (!u->shared_nodes) u->shared_nodes = DEFAULT_SHARED_NODES; - if (!u->shared_levels) u->shared_levels = 1; assert(u->shared_levels * board_bits2(b) <= 8 * (int)sizeof(path_t)); } -- 2.11.4.GIT