ctde_v0.run_ctde_sweep¶
run_ctde_sweep
¶
Increment-1 permutation sweep — does labor-division (roles) + anti-overlap break the v0 huddle (coverage collapses to ~7% while agents clump for trivial 100% connectivity)?
The I1 permutation (8 configs), with index / edge-content / compass left at their v0 defaults for now:
role_picker {off, expl_relay} # homogeneous goal head vs a learned role head
x mechanism {action_mask, soft_lambda} # the mission-safety axis x anti_overlap {off, on} # subtract same_step_overlap from the reward = 8 configs.
Sharded for parallel CPU workers (this experiment is CPU-only — do NOT run on the
GPU server): run_ctde_sweep.py <shard> <nshards> runs the configs where
global_index % nshards == shard and appends each result to its OWN
results/ctde_<name>.jsonl (combine the files for reporting). Resumable: a
config already present in ANY results/ctde_*.jsonl is skipped, so a re-launch
never redoes work. Every run saves the full §5 config (config.py) alongside
its metrics, so any result is reproducible.
Per config we log the FINAL-iteration: coverage%, connectivity%, aux-λ₂ accuracy, controller-valid%, episode reward, and the role split (explorer / relay fraction).
JAX_PLATFORMS=cpu /Users/bijanmehr/Project.Zymera/zymera_lab/.venv/bin/python -u ctde_v0/run_ctde_sweep.py 0 1 # single worker, all 8 configs
Tunables via env vars (so the runner stays argv-compatible with run_grid.py): CTDE_ITERS (default 50) · CTDE_ROLLOUTS (8) · CTDE_GRID (16) · CTDE_NAGENTS (4) · CTDE_HORIZON (100) · CTDE_SEED (0) · CTDE_AO_WEIGHT (1.0)
build_config
¶
build_config(role_picker, mechanism, anti_overlap)
One full §5 config for a permutation cell (defaults = the 16×16/4 v0 slice; index / edge-content / compass stay at v0 defaults for now).
Source code in experiments/ctde_v0/run_ctde_sweep.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |
build_grid
¶
build_grid()
The 8 permutation cells, each a dict the runner can name + skip by key.
Source code in experiments/ctde_v0/run_ctde_sweep.py
103 104 105 106 107 108 109 | |
run_config
¶
run_config(cell)
Train one permutation cell to iters and return its result record
(final-iter metrics + the full saved config). Errors are captured, not raised,
so one bad cell never kills the shard.
Source code in experiments/ctde_v0/run_ctde_sweep.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |