Merge branch 'master' into clusterMergeMaster11

fixes minor conflicts.
This commit is contained in:
Joost VandeVondele
2020-09-17 19:17:37 +02:00
43 changed files with 1336 additions and 894 deletions
+3 -2
View File
@@ -172,7 +172,8 @@ namespace {
if (token == "go" || token == "eval")
{
if (Cluster::is_root())
cerr << "\nPosition: " << cnt++ << '/' << num << endl;
cerr << "\nPosition: " << cnt++ << '/' << num << " (" << pos.fen() << ")" << endl;
if (token == "go")
{
go(pos, is, states);
@@ -214,7 +215,7 @@ namespace {
double b = (((bs[0] * m + bs[1]) * m + bs[2]) * m) + bs[3];
// Transform eval to centipawns with limited range
double x = Utility::clamp(double(100 * v) / PawnValueEg, -1000.0, 1000.0);
double x = std::clamp(double(100 * v) / PawnValueEg, -1000.0, 1000.0);
// Return win rate in per mille (rounded to nearest)
return int(0.5 + 1000 / (1 + std::exp((a - x) / b)));