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

Simplify unstoppable condition

STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 86389 W: 15165 L: 15153 D: 56071

LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 98143 W: 12311 L: 12288 D: 73544

Bench: 5437987
This commit is contained in:
Jonathan Calovski 2016-12-12 05:57:02 +11:00 committed by Marco Costalba
parent a47bbca0ea
commit 589049a0e5

View file

@ -197,7 +197,7 @@ namespace {
const Score WeakQueen = S(50, 10);
const Score Hanging = S(48, 27);
const Score ThreatByPawnPush = S(38, 22);
const Score Unstoppable = S( 0, 20);
const Score Unstoppable = S( 0, 45);
const Score PawnlessFlank = S(20, 80);
const Score HinderPassedPawn = S( 7, 0);
const Score ThreatByRank = S(16, 3);
@ -855,12 +855,11 @@ Value Eval::evaluate(const Position& pos) {
// If both sides have only pawns, score for potential unstoppable pawns
if (!pos.non_pawn_material(WHITE) && !pos.non_pawn_material(BLACK))
{
Bitboard b;
if ((b = ei.pi->passed_pawns(WHITE)) != 0)
score += Unstoppable * int(relative_rank(WHITE, frontmost_sq(WHITE, b)));
if (ei.pi->passed_pawns(WHITE))
score += Unstoppable;
if ((b = ei.pi->passed_pawns(BLACK)) != 0)
score -= Unstoppable * int(relative_rank(BLACK, frontmost_sq(BLACK, b)));
if (ei.pi->passed_pawns(BLACK))
score -= Unstoppable;
}
// Evaluate space for both sides, only during opening