Skip to content

Commit

Permalink
Use shift to divide reduction
Browse files Browse the repository at this point in the history
No functional change
bench: 1281912
  • Loading branch information
mstembera committed Nov 11, 2024
1 parent 24c5779 commit 7b1d6e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,7 @@ Value Search::Worker::qsearch(Position& pos, Stack* ss, Value alpha, Value beta)

Depth Search::Worker::reduction(bool i, Depth d, int mn, int delta) const {
int reductionScale = reductions[d] * reductions[mn];
return (reductionScale + 1239 - delta * 795 / rootDelta) / 1024 + (!i && reductionScale > 1341);
return unsigned(reductionScale + 1239 - delta * 795 / rootDelta) / 1024 + (!i && reductionScale > 1341);
}

// elapsed() returns the time elapsed since the search started. If the
Expand Down

2 comments on commit 7b1d6e8

@xu-shawn
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you try applying it instead to line 999 on top of official-stockfish#5667? This patch conflicts with the PR.

@mstembera
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok. I'll probably wait for 5667 to get merged.

Please sign in to comment.