mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Retire PawnSafePush bonus
PawnSafePush, with the value S(5,5) proved not "necessary" possibly due to recent changes to MobilityArea and other changes to Connected bonus. STC: LLR: 3.22 (-2.94,2.94) [-3.00,1.00] Total: 98528 W: 18757 L: 18759 D: 61012 LTC: LLR: 5.30 (-2.94,2.94) [-3.00,1.00] Total: 204194 W: 31698 L: 31734 D: 140762 Bench: 7620871 Resolves #396
This commit is contained in:
parent
600234f2e2
commit
69a1a808c8
1 changed files with 1 additions and 6 deletions
|
@ -167,7 +167,6 @@ namespace {
|
||||||
const Score Unstoppable = S( 0, 20);
|
const Score Unstoppable = S( 0, 20);
|
||||||
const Score Hanging = S(31, 26);
|
const Score Hanging = S(31, 26);
|
||||||
const Score PawnAttackThreat = S(20, 20);
|
const Score PawnAttackThreat = S(20, 20);
|
||||||
const Score PawnSafePush = S( 5, 5);
|
|
||||||
|
|
||||||
// Penalty for a bishop on a1/h1 (a8/h8 for black) which is trapped by
|
// Penalty for a bishop on a1/h1 (a8/h8 for black) which is trapped by
|
||||||
// a friendly pawn on b2/g2 (b7/g7 for black). This can obviously only
|
// a friendly pawn on b2/g2 (b7/g7 for black). This can obviously only
|
||||||
|
@ -527,7 +526,7 @@ namespace {
|
||||||
score += more_than_one(b) ? KingOnMany : KingOnOne;
|
score += more_than_one(b) ? KingOnMany : KingOnOne;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a small bonus for safe pawn pushes
|
// Bonus if some pawns can safely push and attack an enemy piece
|
||||||
b = pos.pieces(Us, PAWN) & ~TRank7BB;
|
b = pos.pieces(Us, PAWN) & ~TRank7BB;
|
||||||
b = shift_bb<Up>(b | (shift_bb<Up>(b & TRank2BB) & ~pos.pieces()));
|
b = shift_bb<Up>(b | (shift_bb<Up>(b & TRank2BB) & ~pos.pieces()));
|
||||||
|
|
||||||
|
@ -535,10 +534,6 @@ namespace {
|
||||||
& ~ei.attackedBy[Them][PAWN]
|
& ~ei.attackedBy[Them][PAWN]
|
||||||
& (ei.attackedBy[Us][ALL_PIECES] | ~ei.attackedBy[Them][ALL_PIECES]);
|
& (ei.attackedBy[Us][ALL_PIECES] | ~ei.attackedBy[Them][ALL_PIECES]);
|
||||||
|
|
||||||
if (b)
|
|
||||||
score += popcount<Full>(b) * PawnSafePush;
|
|
||||||
|
|
||||||
// Add another bonus if the pawn push attacks an enemy piece
|
|
||||||
b = (shift_bb<Left>(b) | shift_bb<Right>(b))
|
b = (shift_bb<Left>(b) | shift_bb<Right>(b))
|
||||||
& pos.pieces(Them)
|
& pos.pieces(Them)
|
||||||
& ~ei.attackedBy[Us][PAWN];
|
& ~ei.attackedBy[Us][PAWN];
|
||||||
|
|
Loading…
Add table
Reference in a new issue