From fc17d0de7748b68bddc5cd7f97a6c15ebc7adaac Mon Sep 17 00:00:00 2001 From: Reuven Peleg Date: Thu, 12 Sep 2013 16:20:53 +0300 Subject: [PATCH] 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 --- src/evaluate.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 42f7addf..a16fc359 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -872,9 +872,16 @@ Value do_evaluate(const Position& pos, Value& margin) { { if (pos.non_pawn_material(Them) <= KnightValueMg) ebonus += ebonus / 4; + else if (pos.pieces(Them, ROOK, QUEEN)) ebonus -= ebonus / 4; } + + // Increase the bonus if we have more non-pawn pieces + if (pos.count( Us) - pos.count( Us) > + pos.count(Them) - pos.count(Them)) + ebonus += ebonus / 4; + score += make_score(mbonus, ebonus); } -- 2.39.2