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

Rank threats on pinned pawns

Add for pinned pawns half of the standard rank based threat bonus.

STC:
LLR: 2.97 (-2.94,2.94) [0.00,5.00]
Total: 44010 W: 9987 L: 9635 D: 24388
http://tests.stockfishchess.org/tests/view/5b58aa780ebc5902bdb88c7a

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 29475 W: 5089 L: 4847 D: 19539
http://tests.stockfishchess.org/tests/view/5b58b56c0ebc5902bdb88f37

Closes https://github.com/official-stockfish/Stockfish/pull/1701

Bench: 4503866
This commit is contained in:
Stefan Geschwentner 2018-07-26 01:28:37 +02:00 committed by Stéphane Nicolet
parent ae98927885
commit a4eda3056e

View file

@ -540,6 +540,9 @@ namespace {
score += ThreatByMinor[type_of(pos.piece_on(s))];
if (type_of(pos.piece_on(s)) != PAWN)
score += ThreatByRank * (int)relative_rank(Them, s);
else if (pos.blockers_for_king(Them) & s)
score += ThreatByRank * (int)relative_rank(Them, s) / 2;
}
b = weak & attackedBy[Us][ROOK];
@ -549,6 +552,9 @@ namespace {
score += ThreatByRook[type_of(pos.piece_on(s))];
if (type_of(pos.piece_on(s)) != PAWN)
score += ThreatByRank * (int)relative_rank(Them, s);
else if (pos.blockers_for_king(Them) & s)
score += ThreatByRank * (int)relative_rank(Them, s) / 2;
}
if (weak & attackedBy[Us][KING])