Skip to content

Commit

Permalink
Merge pull request official-stockfish#217 from ianfab/lazy_eval
Browse files Browse the repository at this point in the history
Use lazy evaluation only for standard chess
  • Loading branch information
ddugovic committed Jan 13, 2017
2 parents bc61332 + 049df3c commit 40ee232
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/evaluate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1479,6 +1479,7 @@ Value Eval::evaluate(const Position& pos) {
// We have taken into account all cheap evaluation terms.
// If score exceeds a threshold return a lazy evaluation.
Value lazy = lazy_eval(mg_value(score), eg_value(score));
if (pos.variant() == CHESS_VARIANT)
if (lazy)
return pos.side_to_move() == WHITE ? lazy : -lazy;

Expand Down

0 comments on commit 40ee232

Please sign in to comment.