X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=2169a1ac8995d9d37474e6289c00302708ffd3c0;hp=65fd691ada7e3b55f8c203f3c8b76fa5fe391109;hb=b95b1a970510b74dc567824ff428362e17e39066;hpb=b14846b6d74373762280420ffc97759113cf0c0c diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 65fd691a..2169a1ac 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -837,14 +837,13 @@ namespace { // out of bounds errors. attackUnits = Min(99, Max(0, attackUnits)); - // Finally, extract the king danger score from the KingDangerTable[] array. - // Subtract the score from evaluation, and set ei.futilityMargin[]. - // The reason for storing the king danger score to futility margin - // is that the king danger scores can sometimes be very big, and that - // capturing a single attacking piece can therefore result in a score - // change far bigger than the value of the captured piece. + // Finally, extract the king danger score from the KingDangerTable[] + // array and subtract the score from evaluation. Set also ei.kingDanger[] + // value that will be used for pruning because this value can sometimes + // be very big, and so capturing a single attacking piece can therefore + // result in a score change far bigger than the value of the captured piece. ei.value -= Sign[Us] * KingDangerTable[Us][attackUnits]; - ei.futilityMargin[Us] = mg_value(KingDangerTable[Us][attackUnits]); + ei.kingDanger[Us] = mg_value(KingDangerTable[Us][attackUnits]); } }