X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fevaluate.cpp;h=54216b97206b24cab5b90ba18601a3e9d5801df9;hb=4c4cb185aaaa0b3175ca35ab6473f17e9ec64055;hp=728990680f6a1ac9e6fdd8df0e88a29ee327c7b3;hpb=9b80897657bde99cfb6568d8bd3386c3999f22c4;p=stockfish diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 72899068..54216b97 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -155,8 +155,9 @@ Value Eval::evaluate(const Position& pos) { int material = pos.non_pawn_material(stm) - pos.non_pawn_material(~stm) + 126 * (pos.count(stm) - pos.count(~stm)); - // Blend optimism with nnue complexity and (semi)classical complexity + // Blend optimism and eval with nnue complexity and material imbalance optimism += optimism * (nnueComplexity + abs(material - nnue)) / 512; + nnue -= nnue * (nnueComplexity + abs(material - nnue)) / 32768; v = ( nnue * (915 + npm + 9 * pos.count()) + optimism * (154 + npm + pos.count())) / 1024;