From 0c5e89e3e19107a8b525b5a99adea0dd1740517f Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sun, 23 May 2010 14:51:15 +0100 Subject: [PATCH] Revert non-linear threats evaluation After 999 games at 1+0 Mod vs Orig +148 =712 -139 +3 ELO The added complexity doesn't seems to pay off and could even scale worst with longer TC. So revert. Signed-off-by: Marco Costalba --- src/evaluate.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index f1bfa5c6..64760d4d 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -148,10 +148,6 @@ namespace { #undef S - // Threats weights indexed by sente (side to move has a bigger weight) - const int ConcurrentThreatsWeight[2] = { 3, 15 }; - const int ThreatsWeight[2] = { 249, 267 }; - // Bonus for unstoppable passed pawns const Value UnstoppablePawnValue = Value(0x500); @@ -640,8 +636,6 @@ namespace { const Color Them = (Us == WHITE ? BLACK : WHITE); Bitboard b; - Value mg, eg; - int sente, threatCount = 0; Score bonus = make_score(0, 0); // Enemy pieces not defended by a pawn and under our attack @@ -660,20 +654,9 @@ namespace { if (b) for (PieceType pt2 = PAWN; pt2 < KING; pt2++) if (b & pos.pieces(pt2)) - { bonus += ThreatBonus[pt1][pt2]; - threatCount++; - } } - - sente = (Us == pos.side_to_move()); - - // Non linear threat evaluation. Increase threats score according to the - // number of concurrent threats and to the side to move. - mg = (mg_value(bonus) + mg_value(bonus) * ConcurrentThreatsWeight[sente] * threatCount / 256) * ThreatsWeight[sente] / 256; - eg = (eg_value(bonus) + eg_value(bonus) * ConcurrentThreatsWeight[sente] * threatCount / 256) * ThreatsWeight[sente] / 256; - - ei.value += Sign[Us] * make_score(mg, eg); + ei.value += Sign[Us] * bonus; } -- 2.39.2