Skip to content

Commit

Permalink
Fix currentMove bug
Browse files Browse the repository at this point in the history
Orig vs Master: +15 elo 887.5 - 812.5 (1700 games, finished) [4CPU]

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
  • Loading branch information
zamar authored and mcostalba committed Nov 23, 2009
1 parent 16acf57 commit 93c9f34
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/search.cpp
Expand Up @@ -1135,7 +1135,7 @@ namespace {
moveIsCheck = pos.move_is_check(move, ci);
captureOrPromotion = pos.move_is_capture_or_promotion(move);

movesSearched[moveCount++] = ss[ply].currentMove = move;
movesSearched[moveCount++] = move;

// Decide the new search depth
ext = extension(pos, move, true, captureOrPromotion, moveIsCheck, singleReply, mateThreat, &dangerous);
Expand All @@ -1160,6 +1160,9 @@ namespace {

newDepth = depth - OnePly + ext;

// Update current move
ss[ply].currentMove = move;

// Make and search the move
pos.do_move(move, st, ci, moveIsCheck);

Expand Down Expand Up @@ -1434,7 +1437,7 @@ namespace {
moveIsCheck = pos.move_is_check(move, ci);
captureOrPromotion = pos.move_is_capture_or_promotion(move);

movesSearched[moveCount++] = ss[ply].currentMove = move;
movesSearched[moveCount++] = move;

// Decide the new search depth
ext = extension(pos, move, false, captureOrPromotion, moveIsCheck, singleReply, mateThreat, &dangerous);
Expand All @@ -1460,6 +1463,9 @@ namespace {

newDepth = depth - OnePly + ext;

// Update current move
ss[ply].currentMove = move;

// Futility pruning
if ( useFutilityPruning
&& !dangerous
Expand Down

0 comments on commit 93c9f34

Please sign in to comment.