forked from ms609/TreeSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagent-e.md.tmp
More file actions
101 lines (80 loc) · 4.6 KB
/
Copy pathagent-e.md.tmp
File metadata and controls
101 lines (80 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Agent E — Progress Log
## Current Task
- **Status:** PARKED — T-289 Stage 4 queued as SLURM 16621426 on Hamilton (~5h)
### T-289 Stage 4 — multi-dataset PR validation — DISPATCHED (2026-03-28)
Stage 3 confirmed: MISSING criterion (sel=2), c=5, d=5% gives mean −14.7 steps
vs baseline at 180t/60s (10 seeds). Applied to large preset. Stage 4 now tests
generalisation across 5 matrices (131–206t) at 60s and 120s.
**Changes committed (b8b9f831):**
- `R/MaximizeParsimony.R`: large preset now includes
`pruneReinsertCycles=5, pruneReinsertDrop=0.05, pruneReinsertSelection=2`
- `AGENTS.md`: large preset table updated
- `dev/benchmarks/bench_pr_stage4_validation.R`: Stage 4 script (200 runs)
- `dev/benchmarks/t289e_stage4_hamilton.sh`: SLURM script
**Stage 4 design:**
- 5 datasets: mbank_X30754 (180t), project4133 (131t), project3701 (146t),
project804 (173t), syab07205 (206t)
- 2 configs: baseline (no PR), pr_large (c=5, d=5%, MISSING)
- 2 budgets: 60s, 120s; 10 seeds; 200 total runs
- SLURM 16621426, ~5h wall time
**Resume:** poll results when job completes, analyse per-dataset and
per-budget PR benefit. If consistent improvement, T-289 is done.
If any dataset regresses, investigate.
### S-RED Area 4 — Parallelism & RNG — DONE (2026-03-27)
Reviewed ts_rng.h/.cpp (110 lines) and ts_parallel.h/.cpp (732 lines).
ts_driven.cpp covered in E-003 (see below).
**No bugs found.** Thread safety correct throughout.
Observations (non-bugs):
- fuse_round holds pool mutex across entire tree_fuse() call (O(n) TBR
exchanges). Workers block for full fuse duration. Performance only.
- Multiple workers may trigger fuse_round at the same `replicates_done`
checkpoint due to relaxed read races. Redundant fuse (harmless).
- Lines 323-325 in main polling loop: empty if-block, dead code.
- Verbosity Rprintf acquires pool mutex via status(). If fuse_round holds
the lock, interrupt/timeout polling is delayed by fuse duration.
- ts_rng.h serial/parallel dispatch verified correct in all paths.
### S-RED Focus 4 — ts_driven.cpp review — DONE (2026-03-27)
Reviewed ts_driven.cpp (1054 lines) and ts_driven.h (322 lines) in full.
Focus areas per AGENTS.md: cross-replicate constraint tightening, outer
cycle loop, and features added since T-189.
**Bugs fixed (committed to cpp-search):**
1. **`unsuccessful_reps` not reset on fuse improvement** (`ts_driven.cpp`
line ~923). When inter-replicate fusing found a better score, the
perturb-stop counter was not cleared. Meanwhile `last_improved_rep`
*was* updated by fuse. This inconsistency could cause `perturb_stop`
to fire prematurely when fusing is still productive. Low severity
(factor defaults 0; limit = n_tips × factor is high when enabled),
but logically wrong. Fixed by adding `unsuccessful_reps = 0;` in the
fuse-improvement branch.
2. **`DrivenResult::perturb_stop` flag missing** (`ts_driven.h`).
T-276 ("print convergence summary") explicitly lists perturb_stop as
a convergence indicator. Added the field and set it at the stopping
site in `driven_search()`.
3. **Stale NNI-perturb comment** (step 4b, `ts_driven.cpp`). Opening
sentence said "Skip when constraints are active" but the code passes
`cd` through `nni_perturb_search()` and has been safe under constraints
for several tasks. Replaced with accurate one-liner.
**Other observations (no fix needed):**
- `consensus_constrain = true` with 0 unanimous splits calls
`extract_consensus_splits()` every replicate (performance, not
correctness). consensus_constrain defaults to false; low priority.
- `timed_out = true` is set for both timeout and user interrupt — no
distinction in DrivenResult. Acceptable for now; T-276 can note this
in summary text ("search interrupted/timed out").
- `score_tree()` called at top of each outer cycle for improvement
comparison — minor overhead, by design.
- MPT enumeration uses user constraint `cd` only (not auto_cd) — by
design: enumeration should be unconstrained.
- Outer cycle reset logic correct; `score_before_cycle` / `score_after_cycle`
correctly bound the improvement check.
- Adaptive level, ratchet taper, consensus constraint tightening, and
adaptive start bandit logic all look correct.
### Previous work
### ASAN vector OOB fix — DONE (2026-03-26)
- Root cause: total_words == 0 when all characters are parsimony-uninformative
- Fix: early returns in TBR, SPR, NNI, drift, ratchet, collapsed-flags
- Commit: 6505803f on cpp-search
### S-COORD Round 27 — DONE
- Fixed R 4.1 `%||%` compat bug in `test-ts-anneal.R` (58fc2552)
### T-265 — RESOLVED (scoring method confound)
### Previous: S-RED Focus 8, T-261+T-262, T-255, T-260