From f3926cbb1a0685300151b86b84366977aa6352b7 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Mon, 12 Oct 2009 16:18:27 +0200 Subject: [PATCH] stats_merge(): Merge only if we contribute any playouts --- stats.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stats.h b/stats.h index 78d463e..cdc80dc 100644 --- a/stats.h +++ b/stats.h @@ -28,7 +28,8 @@ stats_add_result(struct move_stats *s, float result, int playouts) static inline void stats_merge(struct move_stats *dest, struct move_stats *src) { - stats_add_result(dest, src->value, src->playouts); + if (src->playouts > 0) + stats_add_result(dest, src->value, src->playouts); } static inline void -- 2.11.4.GIT