@@ -1129,10 +1129,10 @@ void Position::undo_null_move() {
11291129
11301130
11311131// / Position::see() is a static exchange evaluator: It tries to estimate the
1132- // / material gain or loss resulting from a move. There are three versions of
1133- // / this function: One which takes a destination square as input, one takes a
1134- // / move, and one which takes a 'from' and a 'to' square. The function does
1135- // / not yet understand promotions captures .
1132+ // / material gain or loss resulting from a move. Parameter 'asymmThreshold' takes
1133+ // / tempi into account. If the side who initiated the capturing sequence does the
1134+ // / last capture, he loses a tempo and if the result is below 'asymmThreshold'
1135+ // / the capturing sequence is considered bad .
11361136
11371137int Position::see_sign (Move m) const {
11381138
@@ -1147,22 +1147,7 @@ int Position::see_sign(Move m) const {
11471147 return see (m);
11481148}
11491149
1150- int Position::see (Move m) const {
1151- return do_see<false >(m, 0 );
1152- }
1153-
1154- // / Position::see_asymm() takes tempi into account.
1155- // / If the side who initiated the capturing sequence does the last capture,
1156- // / he loses a tempo. In this case if the result is below asymmThreshold
1157- // / the capturing sequence is considered bad.
1158-
1159- int Position::see_asymm (Move m, int asymmThreshold) const
1160- {
1161- return do_see<true >(m, asymmThreshold);
1162- }
1163-
1164- template <bool Asymmetric>
1165- int Position::do_see (Move m, int asymmThreshold) const {
1150+ int Position::see (Move m, int asymmThreshold) const {
11661151
11671152 Square from, to;
11681153 Bitboard occupied, attackers, stmAttackers;
@@ -1240,16 +1225,13 @@ int Position::do_see(Move m, int asymmThreshold) const {
12401225 } while (stmAttackers);
12411226
12421227 // If we are doing asymmetric SEE evaluation and the same side does the first
1243- // and the last capture, he loses a tempo and gain must be at least worth "asymmThreshold".
1244- // If not, we replace the score with a very low value, before negamaxing.
1245- if (Asymmetric)
1246- {
1247- for (int i = 0 ; i < slIndex ; i += 2 )
1248- {
1228+ // and the last capture, he loses a tempo and gain must be at least worth
1229+ // 'asymmThreshold', otherwise we replace the score with a very low value,
1230+ // before negamaxing.
1231+ if (asymmThreshold)
1232+ for (int i = 0 ; i < slIndex; i += 2 )
12491233 if (swapList[i] < asymmThreshold)
1250- swapList[i] = - QueenValueMg * 16 ;
1251- }
1252- }
1234+ swapList[i] = - QueenValueMg * 16 ;
12531235
12541236 // Having built the swap list, we negamax through it to find the best
12551237 // achievable score from the point of view of the side to move.
0 commit comments