mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
File based passed pawn bonus
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
This commit is contained in:
parent
9f5b31c21d
commit
83e19fbed5
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue