Skip to content

Commit

Permalink
File based passed pawn bonus
Browse files Browse the repository at this point in the history
Add file based bonus for passed pawns. Values tuned by SPSA.

STC:
LLR: 3.33 (-2.94,2.94) [0.00,5.00]
Total: 36889 W: 6805 L: 6507 D: 23577

LTC:
LLR: 2.97 (-2.94,2.94) [0.00,5.00]
Total: 32301 W: 5101 L: 4858 D: 22342

Bench: 8073614

Resolves #436
  • Loading branch information
locutus2 authored and zamar committed Oct 3, 2015
1 parent 9f5b31c commit 83e19fb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/evaluate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ namespace {
{ V(7), V(14), V(37), V(63), V(134), V(189) }
};

// PassedFile[File] contains a bonus according to the file of a passed pawn.
const Score PassedFile[] = {
S( 14, 13), S( 2, 5), S(-3, -4), S(-19, -14),
S(-19, -14), S(-3, -4), S( 2, 5), S( 14, 13)
};

const Score ThreatenedByHangingPawn = S(40, 60);

// Assorted bonuses and penalties used by evaluation
Expand Down Expand Up @@ -652,7 +658,7 @@ namespace {
if (pos.count<PAWN>(Us) < pos.count<PAWN>(Them))
ebonus += ebonus / 4;

score += make_score(mbonus, ebonus);
score += make_score(mbonus, ebonus) + PassedFile[file_of(s)];
}

if (DoTrace)
Expand Down

0 comments on commit 83e19fb

Please sign in to comment.