mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
Simplify futility margins formula
New formula mathces the old formula until d = 45
Test code:
int main() {
for(int d=1; d<=45; d++)
{
int a = int(log(double(d * d) / 2) / log(2.0) + 1.001);
int b = int(2.9 * log(double(d)));
if (a != b) std::cout << d << std::endl;
}
return 0;
}
bench: 8455956
This commit is contained in:
committed by
Marco Costalba
parent
2c825294ec
commit
fbfce2132a
@@ -150,7 +150,7 @@ void Search::init() {
|
|||||||
|
|
||||||
// Init futility margins array
|
// Init futility margins array
|
||||||
for (d = 1; d < 16; ++d) for (mc = 0; mc < 64; ++mc)
|
for (d = 1; d < 16; ++d) for (mc = 0; mc < 64; ++mc)
|
||||||
FutilityMargins[d][mc] = Value(112 * int(log(double(d * d) / 2) / log(2.0) + 1.001) - 8 * mc + 45);
|
FutilityMargins[d][mc] = Value(112 * int(2.9 * log(double(d))) - 8 * mc + 45);
|
||||||
|
|
||||||
// Init futility move count array
|
// Init futility move count array
|
||||||
for (d = 0; d < 32; ++d)
|
for (d = 0; d < 32; ++d)
|
||||||
|
|||||||
Reference in New Issue
Block a user