From 76777b663a5f5a2dcfaafa19c15d02d11c401bdf Mon Sep 17 00:00:00 2001 From: protonspring Date: Tue, 16 Apr 2019 08:12:47 -0600 Subject: [PATCH] Calculate passedCount real-time #2099 This is a non-functional simplification which removes the passedCount variable in pawns. STC LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 27982 W: 6227 L: 6118 D: 15637 http://tests.stockfishchess.org/tests/view/5cb3cdd30ebc5925cf017025 Combo STC LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 17368 W: 3925 L: 3795 D: 9648 http://tests.stockfishchess.org/tests/view/5cb3d3510ebc5925cf01709a Non functional test. --- src/pawns.cpp | 1 - src/pawns.h | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pawns.cpp b/src/pawns.cpp index 7e29f506..4c2ff391 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -164,7 +164,6 @@ Entry* probe(const Position& pos) { e->key = key; e->scores[WHITE] = evaluate(pos, e); e->scores[BLACK] = evaluate(pos, e); - e->passedCount= popcount(e->passedPawns[WHITE] | e->passedPawns[BLACK]); return e; } diff --git a/src/pawns.h b/src/pawns.h index 5f5411f6..96ed4149 100644 --- a/src/pawns.h +++ b/src/pawns.h @@ -38,7 +38,7 @@ struct Entry { Bitboard passed_pawns(Color c) const { return passedPawns[c]; } Bitboard pawn_attacks_span(Color c) const { return pawnAttacksSpan[c]; } int weak_unopposed(Color c) const { return weakUnopposed[c]; } - int passed_count() const { return passedCount; } + int passed_count() const { return popcount(passedPawns[WHITE] | passedPawns[BLACK]); }; int pawns_on_same_color_squares(Color c, Square s) const { return pawnsOnSquares[c][bool(DarkSquares & s)]; @@ -66,7 +66,6 @@ struct Entry { int weakUnopposed[COLOR_NB]; int castlingRights[COLOR_NB]; int pawnsOnSquares[COLOR_NB][COLOR_NB]; // [color][light/dark squares] - int passedCount; }; typedef HashTable Table; -- 2.39.2