Skip to content

Commit

Permalink
Tweak again chain pawn bonus
Browse files Browse the repository at this point in the history
This is the first chain bonus version
from Ralph that also passed both

Short TC:
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 23460 W: 4727 L: 4556 D: 14177

And long TC:
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 31858 W: 5497 L: 5240 D: 21121

And performed better against current
committed version, always at 60secs:

LLR: -2.94 (-2.94,2.94) [-3.00,3.00]
Total: 26301 W: 4477 L: 4580 D: 17244

This test was done by Leonid.

bench: 8455956
  • Loading branch information
mcostalba committed Oct 22, 2013
1 parent f86d2ae commit 2c82529
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions src/pawns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,14 @@ namespace {

// Pawn chain membership bonus by file
const Score ChainMember[FILE_NB][RANK_NB] = {
{ S(0, 0), S(14, 0), S(16, 4), S(18, 9), S(56, 56), S(104, 208), S(236, 472) },
{ S(0, 0), S(16, 0), S(18, 5), S(20, 10), S(60, 60), S(108, 216), S(240, 480) },
{ S(0, 0), S(16, 0), S(18, 5), S(20, 10), S(60, 60), S(108, 216), S(240, 480) },
{ S(0, 0), S(17, 0), S(19, 6), S(22, 11), S(66, 66), S(118, 236), S(254, 508) },
{ S(0, 0), S(17, 0), S(19, 6), S(22, 11), S(66, 66), S(118, 236), S(254, 508) },
{ S(0, 0), S(16, 0), S(18, 5), S(20, 10), S(60, 60), S(108, 216), S(240, 480) },
{ S(0, 0), S(16, 0), S(18, 5), S(20, 10), S(60, 60), S(108, 216), S(240, 480) },
{ S(0, 0), S(14, 0), S(16, 4), S(18, 9), S(56, 56), S(104, 208), S(236, 472) }
};
{ S(0, 0), S(14, 0), S(16, 4), S(18, 9), S(28, 28), S(52, 104), S(118, 236) },
{ S(0, 0), S(16, 0), S(18, 5), S(20, 10), S(30, 30), S(54, 108), S(120, 240) },
{ S(0, 0), S(16, 0), S(18, 5), S(20, 10), S(30, 30), S(54, 108), S(120, 240) },
{ S(0, 0), S(17, 0), S(19, 6), S(22, 11), S(33, 33), S(59, 118), S(127, 254) },
{ S(0, 0), S(17, 0), S(19, 6), S(22, 11), S(33, 33), S(59, 118), S(127, 254) },
{ S(0, 0), S(16, 0), S(18, 5), S(20, 10), S(30, 30), S(54, 108), S(120, 240) },
{ S(0, 0), S(16, 0), S(18, 5), S(20, 10), S(30, 30), S(54, 108), S(120, 240) },
{ S(0, 0), S(14, 0), S(16, 4), S(18, 9), S(28, 28), S(52, 104), S(118, 236) }};

// Candidate passed pawn bonus by rank
const Score CandidatePassed[RANK_NB] = {
Expand Down Expand Up @@ -98,7 +97,6 @@ namespace {
Bitboard b;
Square s;
File f;
Rank r;
bool passed, isolated, doubled, opposed, chain, backward, candidate;
Score value = SCORE_ZERO;
const Square* pl = pos.list<PAWN>(Us);
Expand All @@ -119,7 +117,6 @@ namespace {
assert(pos.piece_on(s) == make_piece(Us, PAWN));

f = file_of(s);
r = relative_rank(Us, s);

// This file cannot be semi-open
e->semiopenFiles[Us] &= ~(1 << f);
Expand Down Expand Up @@ -184,11 +181,11 @@ namespace {
value -= Backward[opposed][f];

if (chain)
value += opposed ? ChainMember[f][r] / 2 : ChainMember[f][r];
value += ChainMember[f][relative_rank(Us, s)];

if (candidate)
{
value += CandidatePassed[r];
value += CandidatePassed[relative_rank(Us, s)];

if (!doubled)
e->candidatePawns[Us] |= s;
Expand Down

0 comments on commit 2c82529

Please sign in to comment.