mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 09:39:36 +00:00
Non functional LMR rewrite.
This commit is contained in:
parent
0365b08601
commit
53c07c34bb
1 changed files with 5 additions and 7 deletions
|
@ -985,11 +985,9 @@ moves_loop: // When in check, search starts from here
|
|||
|
||||
if (captureOrPromotion) // (~5 Elo)
|
||||
{
|
||||
// Increase reduction by comparing opponent's stat score
|
||||
if ((ss-1)->statScore >= 0)
|
||||
r += ONE_PLY;
|
||||
|
||||
r -= r ? ONE_PLY : DEPTH_ZERO;
|
||||
// Decrease reduction by comparing opponent's stat score
|
||||
if ((ss-1)->statScore < 0)
|
||||
r -= ONE_PLY;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1030,10 +1028,10 @@ moves_loop: // When in check, search starts from here
|
|||
r += ONE_PLY;
|
||||
|
||||
// Decrease/increase reduction for moves with a good/bad history (~30 Elo)
|
||||
r = std::max(DEPTH_ZERO, (r / ONE_PLY - ss->statScore / 20000) * ONE_PLY);
|
||||
r -= ss->statScore / 20000 * ONE_PLY;
|
||||
}
|
||||
|
||||
Depth d = std::max(newDepth - r, ONE_PLY);
|
||||
Depth d = std::max(newDepth - std::max(r, DEPTH_ZERO), ONE_PLY);
|
||||
|
||||
value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, d, true);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue