summaryrefslogtreecommitdiff
path: root/src/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/script.c')
-rwxr-xr-xsrc/script.c45
1 files changed, 44 insertions, 1 deletions
diff --git a/src/script.c b/src/script.c
index 142b42c..0bc09e4 100755
--- a/src/script.c
+++ b/src/script.c
@@ -59,6 +59,11 @@ typedef struct _SUITE_COUNTERS
UINT64 u64TotalBetaCutoffsOnFirstMove;
UINT64 u64TotalCounterMoveTries;
UINT64 u64TotalCounterMoveHits;
+ UINT64 u64TotalLeftoverTries;
+ UINT64 u64TotalLeftoverAlpha;
+ UINT64 u64TotalLeftoverFH;
+ UINT64 u64TotalCMEvidenceTries[CM_EVIDENCE_BUCKETS];
+ UINT64 u64TotalCMEvidenceFH[CM_EVIDENCE_BUCKETS];
double dSigmaEBF; // sum of per-problem nodes^(1/depth)
ULONG uEBFCount; // number of problems with depth > 0
double dAverageTimeToSolution;
@@ -420,6 +425,19 @@ Return value:
g_Options.u64CounterMoveTries;
g_SuiteCounters.u64TotalCounterMoveHits +=
g_Options.u64CounterMoveHits;
+ g_SuiteCounters.u64TotalLeftoverTries +=
+ g_Options.u64LeftoverTries;
+ g_SuiteCounters.u64TotalLeftoverAlpha +=
+ g_Options.u64LeftoverAlpha;
+ g_SuiteCounters.u64TotalLeftoverFH +=
+ g_Options.u64LeftoverFH;
+ for (v = 0; v < CM_EVIDENCE_BUCKETS; v++)
+ {
+ g_SuiteCounters.u64TotalCMEvidenceTries[v] +=
+ g_Options.u64CMEvidenceTries[v];
+ g_SuiteCounters.u64TotalCMEvidenceFH[v] +=
+ g_Options.u64CMEvidenceFH[v];
+ }
}
else
{
@@ -448,6 +466,8 @@ Return value:
" avg. eff. branching : %5.3f\n"
" counter move hit %% : %5.2f percent (%"
COMPILER_LONGLONG_UNSIGNED_FORMAT " tries)\n"
+ " leftover : %5.2f%% alpha, %5.2f%% FH (%"
+ COMPILER_LONGLONG_UNSIGNED_FORMAT " tries)\n"
" script time : %6.1f sec\n\n",
g_SuiteCounters.uCorrect,
g_SuiteCounters.uIncorrect,
@@ -467,8 +487,31 @@ Return value:
(100.0 * (double)g_SuiteCounters.u64TotalCounterMoveHits /
((double)g_SuiteCounters.u64TotalCounterMoveTries + 1.0)),
g_SuiteCounters.u64TotalCounterMoveTries,
+ (100.0 * (double)g_SuiteCounters.u64TotalLeftoverAlpha /
+ ((double)g_SuiteCounters.u64TotalLeftoverTries + 1.0)),
+ (100.0 * (double)g_SuiteCounters.u64TotalLeftoverFH /
+ ((double)g_SuiteCounters.u64TotalLeftoverTries + 1.0)),
+ g_SuiteCounters.u64TotalLeftoverTries,
(SystemTimeStamp() - dSuiteStart));
-
+
+ // Countermove evidence calibration -- FH% per evidence bucket,
+ // an ongoing check that COUNTERMOVE_EVIDENCE_THRESHOLD (chess.h)
+ // is still well-calibrated as the engine/data evolve.
+ {
+ static const ULONG uCMEvidenceFloors[CM_EVIDENCE_BUCKETS] =
+ { 0, 1, 100, 1000, 10000, 100000, 1000000 };
+ Trace("\ncountermove evidence calibration:\n");
+ for (v = 0; v < CM_EVIDENCE_BUCKETS; v++)
+ {
+ Trace(" evidence >= %8lu : %5.2f%% FH (%"
+ COMPILER_LONGLONG_UNSIGNED_FORMAT " tries)\n",
+ uCMEvidenceFloors[v],
+ (100.0 * (double)g_SuiteCounters.u64TotalCMEvidenceFH[v] /
+ ((double)g_SuiteCounters.u64TotalCMEvidenceTries[v] + 1.0)),
+ g_SuiteCounters.u64TotalCMEvidenceTries[v]);
+ }
+ }
+
// Histogram stuff
if (g_SuiteCounters.uTotal > 0) {
uMax = g_SuiteCounters.uHistogram[0];