Skip to content

T-208: Fix random_topology_tree ignoring constraints#219

Closed
ms609 wants to merge 1 commit intocpp-searchfrom
feature/fix-random-tree-constraint
Closed

T-208: Fix random_topology_tree ignoring constraints#219
ms609 wants to merge 1 commit intocpp-searchfrom
feature/fix-random-tree-constraint

Conversation

@ms609
Copy link
Owner

@ms609 ms609 commented Mar 24, 2026

Agent G.

Bug: When adaptiveStart=TRUE (thorough preset) and constraints active, the bandit could select RANDOM_TREE, which calls random_topology_tree() without ConstraintData. The resulting starting tree may violate constraints, causing TBR to block all constraint-relevant moves (cn=-1). Could return constraint-violating trees.

Fix: Fall back to random_wagner_tree(tree, ds, cd) when RANDOM_TREE is selected and cd->active is true. Preserves random-start exploration intent while respecting constraints.

Test: Added adaptiveStart + constraint test (8 replicates, 4 target hits).

GHA: Run 23506900264 — PASS (Ubuntu ARM64 + Windows).

…e (T-208)

When adaptiveStart=TRUE and constraints are active, the bandit could
select RANDOM_TREE, which calls random_topology_tree() without
constraint data. The resulting starting tree may violate constraints,
causing TBR to block all constraint-relevant moves (cn=-1).

Fix: fall back to random_wagner_tree(tree, ds, cd) when RANDOM_TREE
is selected and cd->active is true. This preserves the random-start
exploration intent while respecting topological constraints.

Test: added adaptiveStart + constraint test (8 replicates).
ms609 added a commit that referenced this pull request Mar 24, 2026
ms609 added a commit that referenced this pull request Mar 24, 2026
…t A)

- T-182: Fixed codoc + spelling → GHA PASS → PR #221.
- T-207: Fixed codoc + spelling + CI → GHA PASS → PR #222.
- T-208: Already PR #219 (Agent G), cleaned up.
@ms609
Copy link
Owner Author

ms609 commented Mar 25, 2026

Superceded by random_constrained_tree. Test to be cherry-picked for T-0212.

@ms609 ms609 closed this Mar 25, 2026
ms609 added a commit that referenced this pull request Mar 25, 2026
Verifies all output trees satisfy constraints when adaptiveStart=TRUE
forces RANDOM_TREE strategy with active constraints. Tests the
random_constrained_tree() polytomy-resolution path on cpp-search.

PR #219 is now superseded (its code fix replaced by
random_constrained_tree on cpp-search); this preserves its test.
@ms609 ms609 deleted the feature/fix-random-tree-constraint branch March 25, 2026 05:35
ms609 added a commit that referenced this pull request Mar 25, 2026
- Close T-208 (cherry-picked to cpp-search, PR #219 closed)
- Close T-211 (conservative-only impact, not worth fixing)
- Add T-213 (impose_constraint, PARKED) and T-214 (multi-split bug)
- Update T-212 status (tests committed, new GHA after heredoc fix)
- Remove stray EOF heredoc artifacts from completed-tasks.md
- Add S-PR to standing tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant