X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fevaluate.cpp;h=b173cd3bb32b60fee4b7905996d93f83301651e1;hb=3af083a7cd9be1659f1d8a39a65e33b87608f762;hp=12a4c7bff10d15e0b73ed837e93a9d154fafda00;hpb=902309020a8ebf97a649cacfdc2dc2881b630966;p=stockfish diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 12a4c7bf..b173cd3b 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -276,7 +276,7 @@ namespace { : attacks_bb(s, pos.pieces()); if (pos.blockers_for_king(Us) & s) - b &= LineBB[pos.square(Us)][s]; + b &= line_bb(pos.square(Us), s); attackedBy2[Us] |= attackedBy[Us][ALL_PIECES] & b; attackedBy[Us][Pt] |= b; @@ -743,7 +743,6 @@ namespace { + 24 * infiltration + 51 * !pos.non_pawn_material() - 43 * almostUnwinnable - - 2 * pos.rule50_count() -110 ; Value mg = mg_value(score); @@ -857,7 +856,12 @@ namespace { } // Side to move point of view - return (pos.side_to_move() == WHITE ? v : -v) + Tempo; + v = (pos.side_to_move() == WHITE ? v : -v) + Tempo; + + // Damp down the evaluation linearly when shuffling + v = v * (100 - pos.rule50_count()) / 100; + + return v; } } // namespace