X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=23ab62ec5ab178123612d14fea547c3e36daad06;hp=3d9c44324405f77afd200bda162e41e779e3133d;hb=57a3334322df005d567fc7db9afef82c495df83d;hpb=afe75571d8da37c8b4dab760ae13ac62a1688853 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 3d9c4432..23ab62ec 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -477,7 +477,7 @@ namespace { // Transform the kingDanger units into a Score, and substract it from the evaluation if (kingDanger > 0) - score -= make_score(std::min(kingDanger * kingDanger / 4096, 2 * int(BishopValueMg)), 0); + score -= make_score(kingDanger * kingDanger / 4096, 0); } // King tropism: firstly, find squares that opponent attacks in our king flank @@ -720,10 +720,9 @@ namespace { // ...count safe + (behind & safe) with a single popcount. int bonus = popcount((Us == WHITE ? safe << 32 : safe >> 32) | (behind & safe)); - bonus = std::min(16, bonus); int weight = pos.count(Us) - 2 * ei.pe->open_files(); - return make_score(bonus * weight * weight / 18, 0); + return make_score(bonus * weight * weight / 16, 0); }