mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Simplify Reduction Formula
Formula now only contains one coefficient. Making it much easier to tune. STC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 187443 W: 34858 L: 35028 D: 117557 LTC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 88329 W: 11982 L: 11953 D: 64394 Bench: 7521394 Resolves #591
This commit is contained in:
parent
d5ba8e827d
commit
45a309d92e
1 changed files with 15 additions and 14 deletions
|
@ -179,21 +179,22 @@ namespace {
|
||||||
|
|
||||||
void Search::init() {
|
void Search::init() {
|
||||||
|
|
||||||
const double K[][2] = {{ 0.799, 2.281 }, { 0.484, 3.023 }};
|
const bool PV=true;
|
||||||
|
|
||||||
for (int pv = 0; pv <= 1; ++pv)
|
|
||||||
for (int imp = 0; imp <= 1; ++imp)
|
for (int imp = 0; imp <= 1; ++imp)
|
||||||
for (int d = 1; d < 64; ++d)
|
for (int d = 1; d < 64; ++d)
|
||||||
for (int mc = 1; mc < 64; ++mc)
|
for (int mc = 1; mc < 64; ++mc)
|
||||||
{
|
{
|
||||||
double r = K[pv][0] + log(d) * log(mc) / K[pv][1];
|
double r = log(d) * log(mc) / 2;
|
||||||
|
if (r < 0.80)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (r >= 1.5)
|
Reductions[!PV][imp][d][mc] = int(std::round(r)) * ONE_PLY;
|
||||||
Reductions[pv][imp][d][mc] = int(r) * ONE_PLY;
|
Reductions[PV][imp][d][mc] = std::max(Reductions[!PV][imp][d][mc] - ONE_PLY, DEPTH_ZERO);
|
||||||
|
|
||||||
// Increase reduction when eval is not improving
|
// Increase reduction for non-PV nodes when eval is not improving
|
||||||
if (!pv && !imp && Reductions[pv][imp][d][mc] >= 2 * ONE_PLY)
|
if (!imp && Reductions[!PV][imp][d][mc] >= 2 * ONE_PLY)
|
||||||
Reductions[pv][imp][d][mc] += ONE_PLY;
|
Reductions[!PV][imp][d][mc] += ONE_PLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int d = 0; d < 16; ++d)
|
for (int d = 0; d < 16; ++d)
|
||||||
|
|
Loading…
Add table
Reference in a new issue