Add TNT-style transient autoconstraint (default OFF, opt-in)#271
Open
ms609 wants to merge 4 commits into
Open
Conversation
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…t-in)
Add `transientAutoconst` (+ `transientAutoconstMinReps`): a per-replicate
TNT-style autoconstraint, distinct from the rigid `consensusConstrain`.
Each replicate constrains its early stages (initial TBR + first sectorial
pass) by the strict consensus of previous replicates' pool trees
intersected with its own Wagner start, then RELEASES the constraint before
ratchet/drift/late-sectorial/final-TBR. The first replicate of each hit is
left unconstrained ("hits are totally independent"). It refreshes per
replicate and never permanently locks a split, so it guides early search
without entrenching a basin (the rigid path can lock splits that forbid the
optimum).
map_constraint_nodes matches a rooted node subtree exactly, so a split
whose tip-0-free clade is not a rooted clade of the current tree fails to
map and would spuriously reject moves. Such splits are dropped and the
constraint rebuilt valid-by-construction; the drop scales with tree DEPTH
(~19% of splits at 62 tips, ~1% at 482 tips).
Default OFF; env kill-switch TS_NO_TRANSIENT_AUTOCONST; byte-identical to
the prior engine when off. Validated on project5432 (482t): engages with a
large, healthy constraint (~124 splits/rep) but does not help reach the
1943 optimum (clean null, no dose-response) — kept as an opt-in knob.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
transientAutoconst(+transientAutoconstMinReps) toSearchControl()— a per-replicate, TNT-style transient autoconstraint, distinct from the existing rigidconsensusConstrain. Default OFF, additive, flag-gated.Each replicate:
The first replicate of each hit (rep 0, or any rep immediately after a new best) is left unconstrained. Because the constraint refreshes every replicate and is never permanently locked, it can guide early search without entrenching a basin — unlike the rigid path, which can permanently lock splits that forbid the optimum.
Constraint-mapping fix (valid-by-construction)
map_constraint_nodesmatches a rooted node subtree exactly, so a split whose tip-0-free clade is not a rooted clade of the current tree fails to map (constraint_node == -1) and would then spuriously reject moves. Such splits are dropped and the constraint rebuilt from the mapped subset, so every enforced split maps to a real node. The unmappable fraction scales with tree depth (tip-0's ancestor count), so it is ~19% at 62 tips but only ~1% at 482 tips.Safety / no-op-when-off
constraint.TS_NO_TRANSIENT_AUTOCONST.SearchControltest suites pass unchanged.Validation (why it's opt-in, not a default)
Built and A/B-tested on
project5432(482 tips) — the corpus's lone never-reached floor (optimum 1943; TS plateaus ~1948–1949). Matched engine, matched seeds, exactthorough + sectorMax45 + tbrMaxHits20config:enforced/kept ≈ 0.99— a large, real constraint, so the result is interpretable (not a frozen artifact).Kept as a documented default-OFF opt-in knob (same disposition as other built-and-A/B'd TNT features that came up null).
🤖 Generated with Claude Code