diff --git a/src/position.cpp b/src/position.cpp index 88ef25d2..1b2defa5 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1151,6 +1151,11 @@ int Position::see(Move m) const { return do_see(m, 0); } +/// Position::see_asymm() takes tempi into account. +/// If the side who initiated the capturing sequence does the last capture, +/// he loses a tempo. In this case if the result is below asymmThreshold +/// the capturing sequence is considered bad. + int Position::see_asymm(Move m, int asymmThreshold) const { return do_see(m, asymmThreshold); @@ -1234,7 +1239,9 @@ int Position::do_see(Move m, int asymmThreshold) const { } while (stmAttackers); - // FIXME: Document + // If we are doing asymmetric SEE evaluation and the same side does the first + // and the last capture, he loses a tempo and gain must be at least worth "asymmThreshold". + // If not, we replace the score with a very low value, before negamaxing. if (Asymmetric) { for (int i = 0; i < slIndex ; i += 2) diff --git a/src/position.h b/src/position.h index 2ad9294f..0951b466 100644 --- a/src/position.h +++ b/src/position.h @@ -161,7 +161,6 @@ public: int see(Move m) const; int see_sign(Move m) const; int see_asymm(Move m, int asymmThreshold) const; - template int do_see(Move m, int asymmThreshold) const; //FIXME: private!! // Accessing hash keys Key key() const; @@ -195,6 +194,7 @@ private: // Helper functions void do_castle(Square kfrom, Square kto, Square rfrom, Square rto); + template int do_see(Move m, int asymmThreshold) const; template Bitboard hidden_checkers() const; // Computing hash keys from scratch (for initialization and debugging) diff --git a/src/search.cpp b/src/search.cpp index 1abe022a..5abbafbc 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1225,7 +1225,8 @@ split_point_start: // At split points actual search starts from here continue; } - // Prune moves with negative or equal SEE + // Prune moves with negative or equal SEE. + // Also prune moves with positive SEE where capturing loses a tempo and SEE < beta - futilityBase. if ( futilityBase < beta && depth < DEPTH_ZERO && pos.see_asymm(move, beta - futilityBase) <= 0)