diff options
| author | Scott Gasch <[email protected]> | 2026-10-09 14:18:52 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-10-09 14:18:52 -0700 |
| commit | fbdcb9d76dd2444d8bc631331eaeb9435cc247f8 (patch) | |
| tree | 602ab360462d6f23188ba51f962c4abb2dc6c7e5 /src/root.c | |
| parent | 73b4afb12abf7cc442831dea42b41b63a2ce07be (diff) | |
* Grab bag of eval.c changes.
* Don't bother not hashing when moves are pruned.
* Prune moves move librerally with LMP.
Inexplicably, this is slightly shallower than HEAD (despite pruning
MORE). It may be because it is slightly slower.
It consistently beats HEAD in match_play.py though (3x now).
Diffstat (limited to 'src/root.c')
| -rw-r--r-- | src/root.c | 74 |
1 files changed, 0 insertions, 74 deletions
@@ -508,80 +508,6 @@ Return value: } Trace("\n"); } - // 2026-10-03: percentages added, each against the count of nodes of - // THAT TYPE (u64NodeTypeCount, incremented in CommonSearchInit), - // not against total nodes -- dividing by total nodes understates - // every rate by whatever share of the tree is some other type. - // - // 2026-10-03: this line now measures what its name says. Three - // separate defects were fixed to get there, all of which had been - // inflating it: - // 1. Denominator was total nodes, not nodes of that type. - // 2. Qsearch was included (~84% of the tree) -- a qsearch - // stand-pat that beats beta looks like "ALL failed high" while - // being the most ordinary event there. Now excluded from both - // numerator (QSearch's copy of the counters was deleted) and - // denominator (u64NodeTypeCount is incremented in Search() - // only). - // 3. Nodes short-circuited by CommonSearchInit reached the - // counters without ever having been typed for that visit, and - // were scored against a stale eNodeType -- which produced an - // impossible "106.2% of PV nodes". Now guarded by - // fNodeTypedThisVisit. - // And a fourth in the fail-low test itself: it compared against the - // IN-PLACE-RAISED iAlpha rather than iInitialAlpha, so every node - // that successfully raised alpha was counted as a fail-low (the PV - // row read 99.1%). See search.c's comment at the counters. - { - double dPV = (double)ctx->sCounters.tree.u64NodeTypeCount[NODE_PV] + 1.0; - double dCUT = (double)ctx->sCounters.tree.u64NodeTypeCount[NODE_CUT] + 1.0; - double dALL = (double)ctx->sCounters.tree.u64NodeTypeCount[NODE_ALL] + 1.0; - - Trace("Node-type surprises: PV failed high/low=%llu (%.1f%% of %.0f PV " - "nodes), ALL failed high=%llu (%.1f%% of %.0f ALL nodes), " - "CUT failed low=%llu (%.1f%% of %.0f CUT nodes).\n" - " (full-width nodes only; qsearch excluded from both " - "numerator and denominator)\n", - ctx->sCounters.tree.u64PVNodeSurprised, - 100.0 * (double)ctx->sCounters.tree.u64PVNodeSurprised / dPV, dPV - 1.0, - ctx->sCounters.tree.u64AllNodeFailedHigh, - 100.0 * (double)ctx->sCounters.tree.u64AllNodeFailedHigh / dALL, dALL - 1.0, - ctx->sCounters.tree.u64CutNodeFailedLow, - 100.0 * (double)ctx->sCounters.tree.u64CutNodeFailedLow / dCUT, dCUT - 1.0); - - // Qsearch half, plus the PVS identity cross-check it exists to - // make possible: every CUT node that fails low forces its ALL - // parent to fail high, and that parent cannot have had an - // earlier child fail low (it would have cut off first), so the - // two should run ~1:1 ACROSS BOTH POPULATIONS. Any residual is - // ALL nodes resolved with no child searched at all -- - // recognizer/EGTB fail-highs and null-move cutoffs. - { - double dQPV = (double)ctx->sCounters.tree.u64QNodeTypeCount[NODE_PV] + 1.0; - double dQCUT = (double)ctx->sCounters.tree.u64QNodeTypeCount[NODE_CUT] + 1.0; - double dQALL = (double)ctx->sCounters.tree.u64QNodeTypeCount[NODE_ALL] + 1.0; - UINT64 u64AllFH = ctx->sCounters.tree.u64AllNodeFailedHigh + - ctx->sCounters.tree.u64QNodeSurprise[NODE_ALL]; - UINT64 u64CutFL = ctx->sCounters.tree.u64CutNodeFailedLow + - ctx->sCounters.tree.u64QNodeSurprise[NODE_CUT]; - - Trace(" qsearch half: PV=%llu (%.1f%% of %.0f), ALL fh=%llu " - "(%.1f%% of %.0f), CUT fl=%llu (%.1f%% of %.0f)\n", - ctx->sCounters.tree.u64QNodeSurprise[NODE_PV], - 100.0 * (double)ctx->sCounters.tree.u64QNodeSurprise[NODE_PV] / dQPV, - dQPV - 1.0, - ctx->sCounters.tree.u64QNodeSurprise[NODE_ALL], - 100.0 * (double)ctx->sCounters.tree.u64QNodeSurprise[NODE_ALL] / dQALL, - dQALL - 1.0, - ctx->sCounters.tree.u64QNodeSurprise[NODE_CUT], - 100.0 * (double)ctx->sCounters.tree.u64QNodeSurprise[NODE_CUT] / dQCUT, - dQCUT - 1.0); - Trace(" PVS identity (should be ~1:1): CUT-fails-low=%llu vs " - "ALL-fails-high=%llu ratio=%.2f\n", - u64CutFL, u64AllFH, - (double)u64AllFH / ((double)u64CutFL + 1.0)); - } - } #endif if (ctx->sCounters.egtb.uProbes > 0) { |
