Skip to content

Commit

Permalink
Fix small LMR bug
Browse files Browse the repository at this point in the history
Bench: 2174294
  • Loading branch information
SzilBalazs committed Aug 10, 2023
1 parent cc9902b commit 4e5c57e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/search/search_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ namespace search {
Depth D = std::clamp(depth - R, 1, depth - 1);
score = -search<NON_PV_NODE>(D, -alpha - 1, -alpha, ss + 1);

if (score > alpha && R > 0) {
if (score > alpha && D < depth - 1) {
score = -search<NON_PV_NODE>(depth - 1, -alpha - 1, -alpha, ss + 1);
}
} else if (non_pv_node || made_moves != 0) {
Expand Down

0 comments on commit 4e5c57e

Please sign in to comment.