X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=755e22d85a7c9317d2682f5838fda4b6bfd6a11c;hp=982befa35dacf71960f2d1bea539c7eccd2eb297;hb=6a6fd0b5f51046d09ee1f2377ef14c6aad611b18;hpb=431c3ac485386cc10413fc8a3c7d338dcc71602d diff --git a/src/position.cpp b/src/position.cpp index 982befa3..755e22d8 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1,7 +1,7 @@ /* Stockfish, a UCI chess playing engine derived from Glaurung 2.1 Copyright (C) 2004-2008 Tord Romstad (Glaurung author) - Copyright (C) 2008-2013 Marco Costalba, Joona Kiiski, Tord Romstad + Copyright (C) 2008-2014 Marco Costalba, Joona Kiiski, Tord Romstad Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -614,7 +614,7 @@ bool Position::pseudo_legal(const Move m) const { } -/// Position::move_gives_check() tests whether a pseudo-legal move gives a check +/// Position::gives_check() tests whether a pseudo-legal move gives a check bool Position::gives_check(Move m, const CheckInfo& ci) const { @@ -1011,10 +1011,7 @@ void Position::undo_null_move() { /// Position::see() is a static exchange evaluator: It tries to estimate the -/// material gain or loss resulting from a move. Parameter 'asymmThreshold' takes -/// tempi into account. If the side who initiated the capturing sequence does the -/// last capture, he loses a tempo and if the result is below 'asymmThreshold' -/// the capturing sequence is considered bad. +/// material gain or loss resulting from a move. int Position::see_sign(Move m) const { @@ -1029,7 +1026,7 @@ int Position::see_sign(Move m) const { return see(m); } -int Position::see(Move m, int asymmThreshold) const { +int Position::see(Move m) const { Square from, to; Bitboard occupied, attackers, stmAttackers; @@ -1096,15 +1093,6 @@ int Position::see(Move m, int asymmThreshold) const { } while (stmAttackers); - // If we are doing asymmetric SEE evaluation and the same side does the first - // and the last capture, it loses a tempo and gain must be at least worth - // 'asymmThreshold', otherwise we replace the score with a very low value, - // before negamaxing. - if (asymmThreshold) - for (int i = 0; i < slIndex; i += 2) - if (swapList[i] < asymmThreshold) - swapList[i] = - QueenValueMg * 16; - // Having built the swap list, we negamax through it to find the best // achievable score from the point of view of the side to move. while (--slIndex)