Permalink
Browse files

In non-PV IID don't call evaluate when in check

Was a long standing hidden bug from Glaurung times,
triggered only now that we enable IID at non PV nodes.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
  • Loading branch information...
1 parent 14c3da5 commit 0d88b832e38430e0add9c8298458569b23e102a7 @mcostalba committed Dec 15, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/search.cpp
View
@@ -1435,7 +1435,7 @@ namespace {
// Go with internal iterative deepening if we don't have a TT move
if (UseIIDAtNonPVNodes && ttMove == MOVE_NONE && depth >= 8*OnePly &&
- evaluate(pos, ei, threadID) >= beta - IIDMargin)
+ !isCheck && evaluate(pos, ei, threadID) >= beta - IIDMargin)
{
search(pos, ss, beta, Min(depth/2, depth-2*OnePly), ply, false, threadID);
ttMove = ss[ply].pv[ply];

0 comments on commit 0d88b83

Please sign in to comment.