From: ianfab Date: Fri, 10 Aug 2018 22:32:14 +0000 (+0200) Subject: Use negative piece values for antichess-like variants X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=86be0ae9b3ae0ff5b9cc5a8bf10c1d4e35ff46f8;p=fairystockfish.git Use negative piece values for antichess-like variants giveaway STC LLR: 7.17 (-2.94,2.94) [0.00,10.00] Total: 234 W: 231 L: 2 D: 1 http://35.161.250.236:6543/tests/view/5b6e12d56e23db0fbab0dc73 losers STC LLR: 0.00 (-2.94,2.94) [0.00,10.00] Total: 1342 W: 1071 L: 271 D: 0 http://35.161.250.236:6543/tests/view/5b6e12f06e23db0fbab0dc76 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index a9c8269..e009ba5 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -921,6 +921,13 @@ namespace { // the position object (material + piece square tables) and the material // imbalance. Score is computed internally from the white point of view. Score score = pos.captures_to_hand() ? pos.psq_score() / 2 : pos.psq_score(); + // For antichess-like variants, use negative piece values + if ( ( pos.extinction_value() == VALUE_MATE + && pos.extinction_piece_types().find(ALL_PIECES) != pos.extinction_piece_types().end()) + || pos.bare_king_value() == VALUE_MATE) + score = -score / 4; + if (T) + Trace::add(MATERIAL, score); score += me->imbalance() + pos.this_thread()->contempt; // Probe the pawn hash table @@ -962,7 +969,6 @@ namespace { // In case of tracing add all remaining individual evaluation terms if (T) { - Trace::add(MATERIAL, pos.psq_score()); Trace::add(IMBALANCE, me->imbalance()); Trace::add(PAWN, pe->pawn_score(WHITE), pe->pawn_score(BLACK)); Trace::add(MOBILITY, mobility[WHITE], mobility[BLACK]);