From 1de97337c2d53bdff0f1c3f362d232028ef736a5 Mon Sep 17 00:00:00 2001 From: Alain SAVARD Date: Sun, 3 Jan 2016 14:15:29 +0000 Subject: [PATCH] Fine tuning of unsupported pawn penalty Adjust the unsupported pawn penalty when the pawn is supporting 2 pawns (for example g7 in f6-g7-h6) Passed STC LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 23833 W: 4384 L: 4158 D: 15291 Passed LTC LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 42711 W: 5918 L: 5655 D: 31138 Bench: 8390233 Resolves #549 --- src/pawns.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pawns.cpp b/src/pawns.cpp index 83ff4f28..52f626f1 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -42,8 +42,9 @@ namespace { // Backward pawn penalty by opposed flag const Score Backward[2] = { S(67, 42), S(49, 24) }; - // Unsupported pawn penalty, for pawns which are neither isolated or backward - const Score Unsupported = S(20, 10); + // Unsupported pawn penalty for pawns which are neither isolated or backward, + // by number of pawns it supports [less than 2 / exactly 2]. + const Score Unsupported[2] = { S(20, 10), S(25, 15) }; // Connected pawn bonus by opposed, phalanx, twice supported and rank Score Connected[2][2][2][RANK_NB]; @@ -182,7 +183,7 @@ namespace { score -= Backward[opposed]; else if (!supported) - score -= Unsupported; + score -= Unsupported[more_than_one(neighbours & rank_bb(s + Up))]; if (connected) score += Connected[opposed][!!phalanx][more_than_one(supported)][relative_rank(Us, s)]; -- 2.39.2