diff options
| author | Scott Gasch <[email protected]> | 2026-10-05 13:05:34 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-10-05 13:05:34 -0700 |
| commit | bb7cdcda4c8c30ad0ed71d0f60427daf05977b24 (patch) | |
| tree | 99a5a3f9fa6edcced73d966df0af07274ff67962 /src/search.c | |
| parent | 5d9a5cf4036d07252e81d51e78e6dd36e65c9275 (diff) | |
New telemetry.
Diffstat (limited to 'src/search.c')
| -rw-r--r-- | src/search.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/search.c b/src/search.c index ee055a4..ccaae74 100644 --- a/src/search.c +++ b/src/search.c @@ -458,6 +458,7 @@ Search(IN SEARCHER_THREAD_CONTEXT *ctx, INT iPositionalExtend = 0; INT iExtend; ULONG uNextDepth; + ULONG uNullR; ULONG uLegalMoves = 0; FLAG fIsLeftoverMove = FALSE; // Stamped once below, right after this node's own Eval() call and @@ -631,7 +632,8 @@ Search(IN SEARCHER_THREAD_CONTEXT *ctx, (!IS_CHECKING_MOVE(mvLast) && (FALSE == pi->fInCheck))); // Prepare next depth for nullmove and hashtable lookup - uNextDepth = uDepth - SelectNullmoveRFactor(ctx, uDepth) - ONE_PLY; + uNullR = SelectNullmoveRFactor(ctx, uDepth); + uNextDepth = uDepth - uNullR - ONE_PLY; if (uNextDepth > MAX_DEPTH_PER_SEARCH) uNextDepth = 0; // Check the transposition table. This may give us a cutoff @@ -862,13 +864,22 @@ Search(IN SEARCHER_THREAD_CONTEXT *ctx, iImprovement, uNextDepth)) { + ULONG uNullRBucket = uNullR / ONE_PLY; + if (uNullRBucket >= NULL_R_BUCKETS) + { + uNullRBucket = NULL_R_BUCKETS - 1; + } +#ifdef PERF_COUNTERS + INC(ctx->sCounters.tree.u64NullMoveTriesByR[uNullRBucket]); +#endif if (TryNullmovePruning(ctx, &fThreat, iAlpha, iBeta, uNextDepth, &iPositionalExtend, - &iScore)) + &iScore, + uNullRBucket)) { if (iScore > iBeta) { @@ -1407,6 +1418,12 @@ Search(IN SEARCHER_THREAD_CONTEXT *ctx, #endif } } +#ifdef PERF_COUNTERS + if (TRUE == fThisMoveEFPPruned) + { + INC(ctx->sCounters.tree.u64EFPPruned); + } +#endif // If neither LMP nor EFP fired, we are going to search below // this move. But if the move is very late, we might reduce |
