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

Tweak again chain pawn bonus

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
This commit is contained in:
Marco Costalba 2013-10-22 17:47:16 +02:00
parent f86d2aee29
commit 2c825294ec

View file

@ -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] = {
@ -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);
@ -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);
@ -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;