Skip to content

ctde_v0.run_lag_t3b

run_lag_t3b

T3b — connectivity-control test, crossed over critic × scale × terrain (the finalized T3 plan).

The question (same as T3): which dual-update controller actually HOLDS the global-λ₂ target θ without collapsing coverage — soft (fixed weight) vs lagrangian (monotone dual) vs PID (responsive dual)? λ₂ = true team algebraic connectivity, computed centrally by the trainer and folded into the REWARD only (CTDE; agents never observe it; NEVER a hard action mask). We sweep θ so it BINDS.

WHAT'S DIFFERENT FROM run_lag_t3 (why this file): * CRITIC crossed: {setpool, setattn} — the two count-invariant critics T4 found scale-resilient (conv, the fixed-N baseline, degrades with N, so it's dropped here). * SCALE crossed: 24²/6 (→ gaius, light tier) AND 32²/10 (→ balthar, heavy tier). * TERRAIN: rooms = the CHALLENGING env where connectivity binds -> FULL 6-controller sweep; open = the free-connectivity BASELINE -> reduced to the lagrangian arms only (on open every controller trivially satisfies λ₂≥θ, so a full sweep there is wasted compute). * soft_th7 added -> a clean 3 controllers × 2 thresholds grid (the original T3 lacked soft@0.7).

PLAN (96 units): rooms(6 ctrl) + open(2 ctrl) = 8 controller-conditions × {setpool,setattn} × 3 seeds = 48 per scale × {24²,32²} = 96 total -> 48 heavy 32² (balthar) + 48 light 24² (gaius).

METRICS (in each run's history.json): dual_lambda_next = λ(t) (does the dual rise to enforce θ?), connectivity_real = λ₂(t) (does realised connectivity converge to θ?), coverage_pct. Verdict: which controller holds θ (esp. the hard θ=0.7) at least coverage cost, consistent across critic+scale.

# see the whole plan, launch nothing:
PYTHONPATH=.:../../../FiedlerValueEstimation ~/ZymeraLab/.venv/bin/python         -m ctde_v0.run_lag_t3b --tier heavy --dry-run
# balthar (32²/10, one at a time -> jobs 1):
PYTHONPATH=.:../../../FiedlerValueEstimation ~/ZymeraLab/.venv/bin/python         -m ctde_v0.run_lag_t3b --tier heavy --out runs_t3b --seeds 3 --iters 8000 --rollouts 16 --jobs 1
# gaius  (24²/6, packed -> jobs 3):
PYTHONPATH=.:../../../FiedlerValueEstimation ~/ZymeraLab/.venv/bin/python         -m ctde_v0.run_lag_t3b --tier light --out runs_t3b --seeds 3 --iters 8000 --rollouts 16 --jobs 3

===>>> This launcher LAUNCHES REAL TRAINING; run it deliberately. <<<===

Unit

Unit(uid, run_dir, rung, seed, extra)

One train_ctde run at a given rung. FRESH (no warm-start, no deps).

Source code in experiments/ctde_v0/run_lag_t3b.py
72
73
74
75
76
77
78
def __init__(self, uid, run_dir, rung, seed, extra):
    self.uid = uid
    self.run_dir = run_dir
    self.rung = rung                     # (grid, n_agents, comm_r)
    self.seed = seed
    self.extra = extra
    self.proc = None