mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 19:49:14 +00:00
Remove use of half-ply reductions from LMR, Null-move, IID and
Singular extensions. STC: ELO: 3.80 +-3.1 (95%) LOS: 99.2% Total: 19727 W: 4190 L: 3974 D: 11563 LTC: LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 7647 W: 1356 L: 1214 D: 5077 Bench: 6545733 Resolves #55
This commit is contained in:
parent
7ed15af371
commit
ea9c424bba
1 changed files with 6 additions and 10 deletions
|
@ -127,17 +127,14 @@ void Search::init() {
|
||||||
{
|
{
|
||||||
double pvRed = 0.00 + log(double(hd)) * log(double(mc)) / 3.00;
|
double pvRed = 0.00 + log(double(hd)) * log(double(mc)) / 3.00;
|
||||||
double nonPVRed = 0.33 + log(double(hd)) * log(double(mc)) / 2.25;
|
double nonPVRed = 0.33 + log(double(hd)) * log(double(mc)) / 2.25;
|
||||||
Reductions[1][1][hd][mc] = int8_t( pvRed >= 1.0 ? pvRed * int(ONE_PLY) : 0);
|
Reductions[1][1][hd][mc] = int8_t( pvRed >= 1.0 ? pvRed+0.5: 0)*int(ONE_PLY);
|
||||||
Reductions[0][1][hd][mc] = int8_t(nonPVRed >= 1.0 ? nonPVRed * int(ONE_PLY) : 0);
|
Reductions[0][1][hd][mc] = int8_t(nonPVRed >= 1.0 ? nonPVRed+0.5: 0)*int(ONE_PLY);
|
||||||
|
|
||||||
Reductions[1][0][hd][mc] = Reductions[1][1][hd][mc];
|
Reductions[1][0][hd][mc] = Reductions[1][1][hd][mc];
|
||||||
Reductions[0][0][hd][mc] = Reductions[0][1][hd][mc];
|
Reductions[0][0][hd][mc] = Reductions[0][1][hd][mc];
|
||||||
|
|
||||||
if (Reductions[0][0][hd][mc] > 2 * ONE_PLY)
|
if (Reductions[0][0][hd][mc] >= 2 * ONE_PLY)
|
||||||
Reductions[0][0][hd][mc] += ONE_PLY;
|
Reductions[0][0][hd][mc] += ONE_PLY;
|
||||||
|
|
||||||
else if (Reductions[0][0][hd][mc] > 1 * ONE_PLY)
|
|
||||||
Reductions[0][0][hd][mc] += ONE_PLY / 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init futility move count array
|
// Init futility move count array
|
||||||
|
@ -565,8 +562,7 @@ namespace {
|
||||||
assert(eval - beta >= 0);
|
assert(eval - beta >= 0);
|
||||||
|
|
||||||
// Null move dynamic reduction based on depth and value
|
// Null move dynamic reduction based on depth and value
|
||||||
Depth R = 3 * ONE_PLY
|
Depth R = (3 + (depth / 8 )) * ONE_PLY
|
||||||
+ depth / 4
|
|
||||||
+ std::min(int(eval - beta) / PawnValueMg, 3) * ONE_PLY;
|
+ std::min(int(eval - beta) / PawnValueMg, 3) * ONE_PLY;
|
||||||
|
|
||||||
pos.do_null_move(st);
|
pos.do_null_move(st);
|
||||||
|
@ -633,7 +629,7 @@ namespace {
|
||||||
&& (PvNode || ss->staticEval + 256 >= beta))
|
&& (PvNode || ss->staticEval + 256 >= beta))
|
||||||
{
|
{
|
||||||
Depth d = depth - 2 * ONE_PLY - (PvNode ? DEPTH_ZERO : depth / 4);
|
Depth d = depth - 2 * ONE_PLY - (PvNode ? DEPTH_ZERO : depth / 4);
|
||||||
|
d = (d / 2) * 2; // Round to nearest full-ply
|
||||||
ss->skipNullMove = true;
|
ss->skipNullMove = true;
|
||||||
search<PvNode ? PV : NonPV, false>(pos, ss, alpha, beta, d, true);
|
search<PvNode ? PV : NonPV, false>(pos, ss, alpha, beta, d, true);
|
||||||
ss->skipNullMove = false;
|
ss->skipNullMove = false;
|
||||||
|
@ -735,7 +731,7 @@ moves_loop: // When in check and at SpNode search starts from here
|
||||||
Value rBeta = ttValue - int(depth);
|
Value rBeta = ttValue - int(depth);
|
||||||
ss->excludedMove = move;
|
ss->excludedMove = move;
|
||||||
ss->skipNullMove = true;
|
ss->skipNullMove = true;
|
||||||
value = search<NonPV, false>(pos, ss, rBeta - 1, rBeta, depth / 2, cutNode);
|
value = search<NonPV, false>(pos, ss, rBeta - 1, rBeta, (depth / 4) * 2, cutNode);
|
||||||
ss->skipNullMove = false;
|
ss->skipNullMove = false;
|
||||||
ss->excludedMove = MOVE_NONE;
|
ss->excludedMove = MOVE_NONE;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue