X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=d741b2ef1b3ef0078cd550e010ba58c94924d3ba;hp=597dff2b0fb6c70413889f3a63cfba35f354eaa5;hb=ab5cd8340f2f7f8730aa7c77476edf4a98a166e4;hpb=11483fe6d942a4fee6fa272f72251d6b6d6d7454 diff --git a/src/pawns.cpp b/src/pawns.cpp index 597dff2b..d741b2ef 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -66,6 +66,12 @@ namespace { #undef S #undef V + + /// evaluate() calculates a score for the static pawn structure of the given position. + /// We cannot use the location of pieces or king in this function, as the evaluation + /// of the pawn structure will be stored in a small cache for speed reasons, and will + /// be re-used even when the pieces have moved. + template Score evaluate(const Position& pos, Pawns::Entry* e) { @@ -170,6 +176,7 @@ namespace { namespace Pawns { + /// Pawns::probe() looks up the current position's pawns configuration in /// the pawns hash table. It returns a pointer to the Entry if the position /// is found. Otherwise a new Entry is computed and stored there, so we don't