Papers › N-Agent Ad Hoc Teamwork

N-Agent Ad Hoc Teamwork

16 Apr 2024arXiv:2404.10740archive 2025-07-28

Caroline Wang, Arrasy Rahman, Ishan Durugkar, Elad Liebman, Peter Stone

Current approaches to learning cooperative multi-agent behaviors assume relatively restrictive settings. In standard fully cooperative multi-agent reinforcement learning, the learning algorithm controls all agents in the scenario, while in ad hoc teamwork, the learning algorithm usually assumes control over only a single agent in the scenario. However, many cooperative settings in the real world are much less restrictive. For example, in an autonomous driving scenario, a company might train its cars with the same learning algorithm, yet once on the road, these cars must cooperate with cars from another company. Towards expanding the class of scenarios that cooperative learning methods may optimally address, we introduce N-agent ad hoc teamwork (NAHT), where a set of autonomous agents must interact and cooperate with dynamically varying numbers and types of teammates. This paper formalizes the problem, and proposes the Policy Optimization with Agent Modelling (POAM) algorithm. POAM is a policy gradient, multi-agent reinforcement learning approach to the NAHT problem, that enables adaptation to diverse teammate behaviors by learning representations of teammate behaviors. Empirical evaluation on tasks from the multi-agent particle environment and StarCraft II shows that POAM improves cooperative task returns compared to baseline approaches, and enables out-of-distribution generalization to unseen teammates.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2404.10740")

Code

Syntology Ran 13 of 18 code samples harvested from 1 repository linked to this paper; 5 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 1 ran · fixture could not drive it; 11 ran with no contract checked.

By repository: official repository: 18 samples from 1 repository, 13 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

carolinewang01/naht officialmentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

18 samples harvested; 13 ran; 0 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
1ran · fixture could not drive it
11ran
5unverified

Licence: 0 of the 18 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from carolinewang01/naht. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

Decoder carolinewang01/naht/src/learners/poam_learner.py official repository ran · metamorphic tier: deterministic MIT (permissive) · decf5619178286a6 · report
Encoder carolinewang01/naht/src/learners/poam_learner.py official repository ran MIT (permissive) · 50670f3f053281ae · report
RunningMeanStd carolinewang01/naht/src/learners/poam_learner.py official repository ran · metamorphic tier: deterministic MIT (permissive) · cdfc3ae6a09e2c06 · report
build_decoder_inputs carolinewang01/naht/src/learners/poam_learner.py official repository ran · fixture could not drive it fingerprinted MIT (permissive) · ee21a41775ec3b15 · report
build_decoder_targets carolinewang01/naht/src/learners/poam_learner.py official repository ran MIT (permissive) · 12650fb5320297ab · report
get_decoder_input_shape carolinewang01/naht/src/learners/poam_learner.py official repository ran fingerprinted MIT (permissive) · ce3d7a4b82a638f0 · report
get_decoder_target_shape carolinewang01/naht/src/learners/poam_learner.py official repository ran MIT (permissive) · 60bd05be25d7d285 · report
get_encoder_input_shape carolinewang01/naht/src/learners/poam_learner.py official repository ran MIT (permissive) · c3f86bfb832dbf6f · report
get_noop_act carolinewang01/naht/src/learners/poam_learner.py official repository ran MIT (permissive) · d94f9dd6c081c4c5 · report
huber_loss carolinewang01/naht/src/learners/poam_learner.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 317a7486c52962a6 · report
init_ carolinewang01/naht/src/learners/poam_learner.py official repository ran MIT (permissive) · 698b01ea40ca5a88 · report
init_module carolinewang01/naht/src/learners/poam_learner.py official repository ran MIT (permissive) · 9ded5889e3e2d76b · report
init_rnn carolinewang01/naht/src/learners/poam_learner.py official repository ran MIT (permissive) · df7b2fc8884413af · report
AgentOwnedMAC carolinewang01/naht/src/learners/poam_learner.py official repository unverified MIT (permissive) · 505384d4158b80a9 · report
EpisodeBatch carolinewang01/naht/src/learners/poam_learner.py official repository unverified MIT (permissive) · 15588c43eb314917 · report
POAMLearner carolinewang01/naht/src/learners/poam_learner.py official repository unverified MIT (permissive) · 8867ac4821051cc7 · report
build_encoder_inputs carolinewang01/naht/src/learners/poam_learner.py official repository unverified MIT (permissive) · 19257cfb3879548b · report
compute_per_agent_terminated_mask carolinewang01/naht/src/learners/poam_learner.py official repository unverified MIT (permissive) · 23e2047615c7cea6 · report

Tasks

Autonomous DrivingMulti-agent Reinforcement LearningOut-of-Distribution GeneralizationReinforcement LearningStarcraftStarcraft IIreinforcement-learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

HOCSET

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections