From: Marco Costalba Date: Sat, 20 Jul 2013 13:26:52 +0000 (+0200) Subject: Revert "Fix critical SEE bug (take 2)" X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=9207baed653224dce3d695ac76cc08a0e941bdbb Revert "Fix critical SEE bug (take 2)" This reverts commit 3e95800814d For some reason it fails the short TC test: LLR: -2.96 (-2.94,2.94) Total: 20033 W: 4214 L: 4265 D: 11554 bench: 4769737 --- diff --git a/src/position.cpp b/src/position.cpp index cecdcbf8..8ea3f00a 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1195,12 +1195,6 @@ 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++; @@ -1211,6 +1205,15 @@ int Position::see(Move m, int asymmThreshold) const { 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