1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00

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
This commit is contained in:
Alain SAVARD 2016-01-03 14:15:29 +00:00 committed by Joona Kiiski
parent 9eceb894ac
commit 1de97337c2

View file

@ -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)];