mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 08:37:44 +00:00
Score unopposed weak pawns only if majors
Do not use the opposed flag for scoring backward and isolated pawns in pawns.cpp, instead give a S(5,25) bonus for each opponent unopposed weak pawns when we have a rook or a queen on the board. STC run stopped after 113188 games: LLR: 1.63 (-2.94,2.94) [0.00,5.00] Total: 113188 W: 20804 L: 20251 D: 72133 http://tests.stockfishchess.org/tests/view/59b58e4d0ebc5916ff64b12e LTC: LLR: 2.95 (-2.94,2.94) [0.00,5.00] Total: 66673 W: 8672 L: 8341 D: 49660 http://tests.stockfishchess.org/tests/view/59b902580ebc5916ff64b231 This is Alain Savard's idea, just with a different bonus. Original patch there: green STC, http://tests.stockfishchess.org/tests/view/597dcd2b0ebc5916ff64a09b yellow LTC, http://tests.stockfishchess.org/tests/view/597ea69e0ebc5916ff64a0e6 Bench: 6259498
This commit is contained in:
committed by
Marco Costalba
parent
21926ce2d8
commit
043a469f83
+7
-2
@@ -162,8 +162,8 @@ namespace {
|
||||
// supported by a pawn. If the minor piece occupies an outpost square
|
||||
// then score is doubled.
|
||||
const Score Outpost[][2] = {
|
||||
{ S(22, 6), S(33, 9) }, // Knight
|
||||
{ S( 9, 2), S(14, 4) } // Bishop
|
||||
{ S(22, 6), S(36,12) }, // Knight
|
||||
{ S( 9, 2), S(15, 5) } // Bishop
|
||||
};
|
||||
|
||||
// RookOnFile[semiopen/open] contains bonuses for each rook when there is no
|
||||
@@ -214,6 +214,7 @@ namespace {
|
||||
const Score ThreatBySafePawn = S(182,175);
|
||||
const Score ThreatByRank = S( 16, 3);
|
||||
const Score Hanging = S( 48, 27);
|
||||
const Score WeakUnopposedPawn = S( 5, 25);
|
||||
const Score ThreatByPawnPush = S( 38, 22);
|
||||
const Score HinderPassedPawn = S( 7, 0);
|
||||
const Score TrappedBishopA1H1 = S( 50, 50);
|
||||
@@ -593,6 +594,10 @@ namespace {
|
||||
score += ThreatByKing[more_than_one(b)];
|
||||
}
|
||||
|
||||
// Bonus for opponent unopposed weak pawns
|
||||
if (pos.pieces(Us, ROOK, QUEEN))
|
||||
score += WeakUnopposedPawn * pe->weak_unopposed(Them);
|
||||
|
||||
// Find squares where our pawns can push on the next move
|
||||
b = shift<Up>(pos.pieces(Us, PAWN)) & ~pos.pieces();
|
||||
b |= shift<Up>(b & TRank3BB) & ~pos.pieces();
|
||||
|
||||
Reference in New Issue
Block a user