From: Marco Costalba Date: Sat, 20 Jul 2013 12:20:17 +0000 (+0200) Subject: Revert all the SEE stuff X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=2ed56f4d5f0bd70f7736abd3ef3985d7276d49cc Revert all the SEE stuff The speed up seems to introduce some functionality change. Revert to original master for now. bench: 4769737 --- diff --git a/src/position.cpp b/src/position.cpp index 3526a3d0..8ea3f00a 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -79,8 +79,6 @@ PieceType min_attacker(const Bitboard* bb, const Square& to, const Bitboard& stm if (Pt == ROOK || Pt == QUEEN) attackers |= attacks_bb(to, occupied) & (bb[ROOK] | bb[QUEEN]); - attackers &= occupied; // Remove the just found attacker - return (PieceType)Pt; } return min_attacker(bb, to, stmAttackers, occupied, attackers); @@ -1197,21 +1195,25 @@ int Position::see(Move m, int asymmThreshold) const { do { assert(slIndex < 32); - if (captured == KING) // Stop before processing a king capture - { - swapList[slIndex++] = QueenValueMg * 16; - break; - } - // Add the new entry to the swap list swapList[slIndex] = -swapList[slIndex - 1] + PieceValue[MG][captured]; slIndex++; // Locate and remove the next least valuable attacker captured = min_attacker(byTypeBB, to, stmAttackers, occupied, attackers); + attackers &= occupied; // Remove the just found attacker stm = ~stm; stmAttackers = attackers & pieces(stm); + if (captured == KING) + { + // Stop before processing a king capture + if (stmAttackers) + swapList[slIndex++] = QueenValueMg * 16; + + break; + } + } while (stmAttackers); // If we are doing asymmetric SEE evaluation and the same side does the first