Bonus for pawn scrifice which create passed pawn

STC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 16752 W: 3141 L: 2944 D: 10667

LTC:
LLR: 3.34 (-2.94,2.94) [0.00,5.00]
Total: 33928 W: 4544 L: 4300 D: 25084

Bench: 5639223

Closes #1092
This commit is contained in:
Stefan Geschwentner
2017-05-07 20:38:03 -07:00
committed by Joona Kiiski
parent 25296547d0
commit 69ec09bd4b
2 changed files with 10 additions and 3 deletions
+3 -3
View File
@@ -618,7 +618,7 @@ namespace {
{
Square s = pop_lsb(&b);
assert(!(pos.pieces(PAWN) & forward_bb(Us, s)));
assert(!(pos.pieces(Them, PAWN) & forward_bb(Us, s + pawn_push(Us))));
bb = forward_bb(Us, s) & (ei.attackedBy[Them][ALL_PIECES] | pos.pieces(Them));
score -= HinderPassedPawn * popcount(bb);
@@ -675,8 +675,8 @@ namespace {
} // rr != 0
// Scale down bonus for candidate passers which need more than one
// pawn push to become passed.
if (!pos.pawn_passed(Us, s + pawn_push(Us)))
// pawn push to become passed or have a pawn in front of them.
if (!pos.pawn_passed(Us, s + pawn_push(Us)) || (pos.pieces(PAWN) & forward_bb(Us, s)))
mbonus /= 2, ebonus /= 2;
score += make_score(mbonus, ebonus) + PassedFile[file_of(s)];