Skip to content

Commit

Permalink
Tuned values for mid and end game passed pawns.
Browse files Browse the repository at this point in the history
STC :
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 22691 W: 4468 L: 4228 D: 13995

LTC :
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 13620 W: 2216 L: 2023 D: 9381

Bench: 8384669

Resolves #391
  • Loading branch information
DiscanX authored and glinscott committed Aug 9, 2015
1 parent 1aae35b commit f4ace94
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/evaluate.cpp
Expand Up @@ -146,6 +146,17 @@ namespace {
S(0, 0), S(0, 0), S(107, 138), S(84, 122), S(114, 203), S(121, 217)
};

// PassedPawnsBonusMg[Rank] and PassedPawnsBonusEg[Rank]
//contains bonuses for midgame and endgame for passed pawns according to
//the rank of the pawn.
const Value PassedPawnsBonusMg[6] = {
V(0), V(1), V(34), V(90), V(214), V(328)
};

const Value PassedPawnsBonusEg[6] = {
V(7), V(14), V(37), V(63), V(134), V(189)
};

const Score ThreatenedByHangingPawn = S(40, 60);

// Assorted bonuses and penalties used by evaluation
Expand Down Expand Up @@ -567,8 +578,8 @@ namespace {
int r = relative_rank(Us, s) - RANK_2;
int rr = r * (r - 1);

// Base bonus based on rank
Value mbonus = Value(17 * rr), ebonus = Value(7 * (rr + r + 1));
Value mbonus = PassedPawnsBonusMg[r],
ebonus = PassedPawnsBonusEg[r];

if (rr)
{
Expand Down

0 comments on commit f4ace94

Please sign in to comment.