From 03a9b3bd8d79e1677f1c74cf7d8f8036795675c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Nicolet?= Date: Sat, 18 Nov 2017 11:24:23 +0100 Subject: [PATCH] Simplify away the PawnSet[] imbalance array (#1308) Simplify away the PawnSet[] imbalance array STC: LLR: 2.94 (-2.94,2.94) [-3.00,1.00] Total: 52977 W: 9550 L: 9484 D: 33943 http://tests.stockfishchess.org/tests/view/5a06b4780ebc590ccbb8a833 LTC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 83717 W: 10599 L: 10559 D: 62559 http://tests.stockfishchess.org/tests/view/5a0aa36a0ebc590ccbb8aa99 Bench: 5340212 --- src/material.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/material.cpp b/src/material.cpp index d67b95ca..c0237e7c 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -53,11 +53,6 @@ namespace { { 101, 100, -37, 141, 268, 0 } // Queen }; - // PawnSet[pawn count] contains a bonus/malus indexed by number of pawns - const int PawnSet[] = { - 24, -32, 107, -51, 117, -9, -126, -21, 31 - }; - // QueenMinorsImbalance[opp_minor_count] is applied when only one side has a queen. // It contains a bonus/malus for the side with the queen. const int QueenMinorsImbalance[13] = { @@ -100,9 +95,9 @@ namespace { const Color Them = (Us == WHITE ? BLACK : WHITE); - int bonus = PawnSet[pieceCount[Us][PAWN]]; + int bonus = 0; - // Second-degree polynomial material imbalance by Tord Romstad + // Second-degree polynomial material imbalance, by Tord Romstad for (int pt1 = NO_PIECE_TYPE; pt1 <= QUEEN; ++pt1) { if (!pieceCount[Us][pt1]) -- 2.39.2