Skip to content

Commit fc17d0d

Browse files
R-Pelegmcostalba
authored andcommitted
Increase passed bonus for having more pieces
Passed both short TC: LLR: 2.95 (-2.94,2.94) [-1.50,4.50] Total: 36463 W: 7575 L: 7365 D: 21523 And long TC: LLR: 2.97 (-2.94,2.94) [0.00,6.00] Total: 2953 W: 564 L: 446 D: 1943 bench: 3846852
1 parent 27f2ce8 commit fc17d0d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/evaluate.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,9 +872,16 @@ Value do_evaluate(const Position& pos, Value& margin) {
872872
{
873873
if (pos.non_pawn_material(Them) <= KnightValueMg)
874874
ebonus += ebonus / 4;
875+
875876
else if (pos.pieces(Them, ROOK, QUEEN))
876877
ebonus -= ebonus / 4;
877878
}
879+
880+
// Increase the bonus if we have more non-pawn pieces
881+
if (pos.count<ALL_PIECES>( Us) - pos.count<PAWN>( Us) >
882+
pos.count<ALL_PIECES>(Them) - pos.count<PAWN>(Them))
883+
ebonus += ebonus / 4;
884+
878885
score += make_score(mbonus, ebonus);
879886

880887
}

0 commit comments

Comments
 (0)