Symptom
tau_sweep.py accepts --agents N but errors when N != 200:
$ python scripts/tau_sweep.py --seeds 5 --steps 200 --agents 50 --workers 6 --grid default
...
ValueError: archetype_mix sums to 200, but n_agents=50; they must be equal.
The archetype_mix array inside _build_config() is hardcoded to total 200, but --agents is a free parameter.
Workaround: --agents 200 works correctly.
$ python scripts/tau_sweep.py --seeds 5 --steps 200 --agents 200 --workers 6 --grid default
# → completes in 22.5s, prints τ=0 → 3.351, τ=0.05 → 1.275, τ=0.1 → 0.378 (cliff replicated)
Suggested fix
Three options:
-
Scale archetype_mix to match n_agents — multiply each archetype's count by n_agents / 200, round, fix any rounding remainder by adding to the largest bucket. Most flexible.
-
Reject --agents for tau_sweep, document the fixed N=200 — drop the CLI flag, hardcode n_agents=200 inside the script, update --help accordingly. Simpler, matches what already happens.
-
Better error message — at minimum, the validation error should say "tau_sweep.py uses a fixed archetype_mix of size 200; use --agents 200 or remove this flag" rather than the cryptic dataclass __post_init__ error.
I'd go with option 2 unless you actually want to vary N for power analysis.
Repro
git clone https://github.com/hinanohart/dostosim
cd dostosim
pip install -e ".[dev]"
python scripts/tau_sweep.py --seeds 5 --steps 200 --agents 50 --workers 6
# → ValueError
python scripts/tau_sweep.py --seeds 5 --steps 200 --agents 200 --workers 6
# → 22.5s OK
run_ablation.py does not have this issue — it scales correctly with --agents.
Discovered while
Trial-running OSS in self-review (2026-04-28). Goal was to demonstrate measure-zero submanifold thesis (τ=0 cliff) at low cost; small --agents would have been faster, but the fixed N=200 made the demo take 26.5s instead of ~5s.
Symptom
tau_sweep.pyaccepts--agents Nbut errors whenN != 200:The
archetype_mixarray inside_build_config()is hardcoded to total 200, but--agentsis a free parameter.Workaround:
--agents 200works correctly.Suggested fix
Three options:
Scale archetype_mix to match
n_agents— multiply each archetype's count byn_agents / 200, round, fix any rounding remainder by adding to the largest bucket. Most flexible.Reject
--agentsfor tau_sweep, document the fixed N=200 — drop the CLI flag, hardcoden_agents=200inside the script, update--helpaccordingly. Simpler, matches what already happens.Better error message — at minimum, the validation error should say "tau_sweep.py uses a fixed archetype_mix of size 200; use
--agents 200or remove this flag" rather than the cryptic dataclass__post_init__error.I'd go with option 2 unless you actually want to vary N for power analysis.
Repro
run_ablation.pydoes not have this issue — it scales correctly with--agents.Discovered while
Trial-running OSS in self-review (2026-04-28). Goal was to demonstrate measure-zero submanifold thesis (τ=0 cliff) at low cost; small
--agentswould have been faster, but the fixed N=200 made the demo take 26.5s instead of ~5s.