From 073d71a36b7229f481af6e3c5205830b27b362a2 Mon Sep 17 00:00:00 2001 From: Linmiao Xu Date: Mon, 12 Dec 2022 16:55:39 -0500 Subject: [PATCH] [tools] Fix castling moves counting towards # captures in gather_statistics (#4283) --- src/tools/stats.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/stats.cpp b/src/tools/stats.cpp index bdf240f8..48b7800a 100644 --- a/src/tools/stats.cpp +++ b/src/tools/stats.cpp @@ -650,7 +650,7 @@ namespace Stockfish::Tools::Stats { m_total += 1; - if (!pos.empty(to_sq(move))) + if (!pos.empty(to_sq(move)) && type_of(move) != CASTLING) m_capture += 1; if (type_of(move) == CASTLING)