| --- |
| license: mit |
| tags: |
| - reinforcement-learning |
| - multi-agent-reinforcement-learning |
| - ad-hoc-teamwork |
| - starcraft |
| --- |
| |
| # NAHT: N-Agent Ad Hoc Teamwork — experimental results |
|
|
| Training and evaluation logs, plus agent checkpoints, for the NAHT / POAM paper. |
|
|
| - **Code:** <https://github.com/carolinewang01/naht> — all training, evaluation, and |
| plotting code. Every figure in the paper is reproducible from the logs here. |
|
|
| Also in this repo: `naht_unctrl_agents_10-18-24.zip`, a standalone 94 MB bundle of the |
| uncontrolled-teammate agents, if you want only the pool and not the full logs. |
|
|
| ## Quick start |
|
|
| Download and extract; the archives restore the original directory layout, so the |
| plotting notebooks in the code repo run against the extracted tree unmodified. |
|
|
| ```bash |
| huggingface-cli download carolinewang01/naht --repo-type=dataset --local-dir naht_results |
| cd naht_results |
| for f in $(find . -name '*.tar.gz' -o -name '*.tar'); do tar xf "$f" -C .; done |
| ``` |
|
|
| Then point `BASE_RES_PATH` in the notebooks at the extracted directory. |
|
|
| ## Environments |
|
|
| | Directory | Environment | Details | |
| |---|---|---| |
| | `5v6/` | SMAC | `5m_vs_6m`, 20M env steps | |
| | `8v9/` | SMAC | `8m_vs_9m`, 20M env steps | |
| | `10v11/` | SMAC | `10m_vs_11m`, 20M env steps | |
| | `3sv5z/` | SMAC | `3s_vs_5z`, 20M env steps | |
| | `mpe-pp__ts=100_shape=0.01/` | MPE | `mpe:PredatorPrey-v0`, 100-step episodes, reward shaping 0.01, 20M env steps | |
| | `matrix-games__bit-3p-*/` | Bit matrix game | `bit-3p-jointactstate-v0` and `bit-3p-nostate-v0`, including the `theory_ex` encoder–decoder study | |
|
|
| ## Experiment groups |
|
|
| One archive per `<env>/<experiment-group>`. Each is self-contained. |
|
|
| | Archive | Contents | |
| |---|---| |
| | `open_train` | NAHT training runs — POAM (`poam-*`) and the IPPO-based ablations (`ippo-*`), including critic-masking (`-cmask-`) and team-composition (`-teamcomp-`) variants | |
| | `ippo`, `mappo`, `iql`, `qmix`, `vdn` (and `*_ns` no-parameter-sharing variants) | Self-play training runs for the uncontrolled-teammate pool | |
| | `open_eval_best`, `open_eval_last` | Cross-play evaluation under N-agent ad hoc teamwork | |
| | `in_distr_eval` | In-distribution teammate evaluation | |
| | `ood_generalization`, `ood_gen_vp` | Out-of-distribution teammate generalization | |
| | `selfplay_mismatched_eval_best` | Self-play and mismatched-partner evaluation | |
| | `*__ed-tensors` | Encoder–decoder tensor dumps from the `poam_data-gathering` runs; input to `ed_vis_utils.load_data` and the within-episode ED-loss figures. Stored uncompressed (`.tar`) since `.npz` is already compressed | |
|
|
| ## Per-run layout |
|
|
| Every run directory follows the [Sacred](https://github.com/IDSIA/sacred) layout: |
|
|
| ``` |
| <experiment-group>/ |
| sacred/<run>/1/config.json # full hyperparameter config |
| sacred/<run>/1/run.json # run metadata (start/stop, host, status) |
| sacred/<run>/1/info.json # logged scalars — what vis_utils.py reads |
| tb_logs/<run>/events.out.* # TensorBoard events — what the learning-curve code reads |
| models/<run>/best/ # checkpoint with the best test return |
| models/<run>/<final_step>/ # checkpoint at the end of training |
| ``` |
|
|
| Checkpoints are PyTorch `.th` state dicts (`agent.th`, `critic.th`, `mixer.th` where |
| applicable, and for POAM additionally `encoder.th` / `decoder.th`), each with matching |
| `*_opt.th` optimizer states. |
|
|
| Evaluation runs record the agents they load under `trained_agents` and `unseen_agents` |
| in `config.json`; all of them load `"load_step": "best"`. Those are absolute paths from |
| the original cluster — rewrite the prefix to point at |
| your local copy. |
|
|
| ## Citation |
|
|
| If you find our code or data useful, please cite: |
|
|
| ```bibtex |
| @inproceedings{wang2024naht, |
| title={N-Agent Ad Hoc Teamwork}, |
| author={Wang, Caroline and Rahman, Arrasy and Durugkar, Ishan and Liebman, Elad and Stone, Peter}, |
| booktitle={Advances in Neural Information Processing Systems (NeurIPS)}, |
| year={2024} |
| } |
| ``` |
|
|