Cooperative AI agents are commonly taught to work with strangers by first building a population of varied practice partners and then training one agent to cooperate with all of them. The usual way to make the population varied is to reward each partner for doing badly when paired with the others. This backfires. Partners learn a "secret handshake", an arbitrary behavioral signal such as spinning in a particular corner. They cooperate only with the partner who gives the right signal and deliberately fail otherwise. A second, seemingly separate failure appears when a single agent is rewarded for acting in ways that are easy to tell apart, which is the idea behind unsupervised skill discovery. Such an agent learns to "park" at distinct map coordinates instead of learning distinct useful behaviors. We argue these are the same failure. A diversity signal that rewards any distinguishable behavior will find the cheapest distinguishable feature, and in grid-world kitchens the cheapest one is anchored to absolute position.
The proposal replaces the "fail with strangers" diversity term with a mutual-information term: each partner is rewarded when an observer can tell which partner it is. That observer is only allowed to see layout-invariant, relational features of behavior, and it is trained across mirrored, rotated and procedurally generated kitchens. There is no longer any reward for sabotage. Because spatial anchoring no longer helps the observer, the only way for partners to be told apart is to take different functional roles. We then test whether an ad hoc teammate trained against this population closes more of the spatial-plus-partner generalization gap in the Overcooked Generalisation Challenge. It should also do so without the handcrafted task labels that current handshake-removal methods require.
Core Claim
The claim is that a partner population trained to maximize self-play reward plus a relational, transformation-invariant identifiability bonus will match the diversity of cross-play-minimizing populations while having much lower handshake dependence. Cross-play minimization is abbreviated XP-min below. The claim further holds that the resulting ego agent will generalize better to unseen partners on unseen layouts than agents trained against XP-min populations, handshake-regularized populations, or open-ended partner generators run under the same layout curriculum.
The objective for partner $k$ in a population of $K$ is
$$J_k = \mathbb{E}_{g \sim G,\ \tau \sim (\pi_k,\pi_k)}\big[R(\tau)\big] + \lambda\, \mathbb{E}\big[\log q_\phi(k \mid f(\tau)) - \log \tfrac{1}{K}\big],$$
The symbols are defined as follows. $G$ is a distribution over kitchen layouts, including the 32 geometric transformations of the classic layouts and generator-produced layouts. $\tau$ is a self-play trajectory on layout $g$ and $R$ is task return. $q_\phi$ is a discriminator predicting partner identity. $f$ is a learned trajectory encoder that sees only egocentric, object-relative events, such as "picked up onion, moved toward partner, placed in pot". $f$ is trained with a contrastive invariance loss so that a trajectory and its mirrored or rotated counterpart map to the same code. $\lambda$ weights diversity against task reward.
Two design choices carry the claim. First, the reward contains no cross-play term, so a partner gains nothing by failing with strangers. Second, the discriminator's input excludes absolute position and is invariant to the layout transformations, so the RVIC-style "parking" route to identifiability is closed off. That leaves behavioral role as the remaining source of distinguishability. As a diagnostic, and not as part of the objective, we train a second discriminator on absolute-coordinate features. The gap between its accuracy and the relational discriminator's accuracy measures how much partner identity is spatially anchored, which serves as a direct, label-free handshake indicator.
Relation to Prior Work
Four papers document the problem and motivate this proposal. Diverse Conventions for Human-AI Collaboration and Diversity Is Not All You Need show that XP-min produces handshakes. The first adds mixed-play phases and the second distills specialization out of XP-min partners with RL and DAgger (SpecTRL). SpecTRL depends on a handcrafted characteristic function (recipe identities) and on fixed layouts. We keep its diversity, specialization and overfitness metrics for evaluation only and never use recipe labels for training. The same paper also constrains us: it reports that suppressing handshakes directly causes Loss of Specialization. That result is the main risk to this proposal. Our response is that loss of specialization comes from pushing against XP-min's incentive, whereas our objective never creates that incentive. This is tested, not assumed.
Robust and Diverse Multi-Agent Learning via Rational Policy Gradient and ROTATE prevent self-sabotage in adversarial partner generation. RPG uses higher-order gradients, which are reported to be about three times slower. ROTATE uses per-state regret with a good-faith constraint. Both run on fixed layouts, and neither learns a structured skill representation.
Two papers supply our method. Relative Variational Intrinsic Control identified parking in single-agent skill discovery and fixed it by rewarding relative over absolute predictability. We carry that relative-versus-absolute idea into the multi-agent partner-identity setting. Diversity is All You Need provides the discriminator-based variational bound we apply to partner indices rather than to single-agent skills.
Three papers supply the evaluation regime. The Overcooked Generalisation Challenge shows that policies learn coordinate rules and collapse on transformed layouts. Unsupervised Partner Design co-generates partners and layouts but does not model handshakes. OvercookedV2 warns that the classic self-play/cross-play gap is largely an unseen-state artifact. For that reason, every comparison below includes a state-augmentation control.
Research Program
The first component is the invariant encoder $f$. It is a small recurrent encoder over egocentric observation crops and interaction events. It is trained on self-play rollouts with a contrastive loss that treats a trajectory and its geometric transform as positives. We verify its invariance by checking that an absolute-position decoder probed from its codes performs at chance.
The second component is the population itself. $K$ partners, with $K$ matched to the population sizes in SpecTRL and CoMeDi, are trained with $J_k$ over the layout distribution $G$. We sweep $\lambda$ and report the whole trade-off curve between self-play return and diversity, not a single selected point.
The third component is the handshake diagnostic. It combines the accuracy gap between the absolute and relational discriminators, SpecTRL's overfitness metric where recipe labels exist, and a transformation test. The transformation test pairs partners on a mirrored copy of a training layout. A handshake-dependent population shows self-play surviving the mirror while cross-play collapses asymmetrically; a functional population shows both degrading together.
The fourth component is the ego agent. A single SoftMoE-LSTM ego agent, the architecture used in the Overcooked Generalisation Challenge, is trained against the population on the same layout curriculum used by the baselines.
Baselines
The naive reference point is a self-play ego agent trained with the same curriculum of layout environments, PAIRED with SoftMoE-LSTM, and no partner population. On the Overcooked Generalisation Challenge this configuration is reported at a mean solve rate of 14.6% on novel layouts (Ruhdorfer et al.). The same paper reports that its top agents perform only marginally better with unknown partners than with a random teammate. We rerun this baseline in our codebase with our compute budget, and our first sanity check is to reproduce roughly that 14.6% figure.
The strongest existing method for joint partner-and-layout generalization is Unsupervised Partner Design, which generates learnable partners on the fly and has been evaluated on this challenge. The file reports an 18.0% gain in average return over the population-free E3T baseline on Overcooked-AI (UPD). However, no reported result was found on Lacuna for UPD's solve rate on novel Overcooked Generalisation Challenge layouts with holdout partners, so we will run it ourselves. The second strongest competitor is ROTATE, which beat FCP, PAIRED and CoMeDi on 5 of 6 tasks (ROTATE). We port ROTATE to the same layout distribution $G$; without the port, any gain we showed could simply come from layout exposure. The strongest direct handshake-removal competitor is SpecTRL DAgger. It is reported to keep diversity at $\mathcal{D}\approx 1.60$ while cutting overfitness roughly in half relative to XP-min on Multi-recipe Overcooked (SpecTRL). CoMeDi is included as the mixed-play regularizer, with a reported Coordination Ring human-evaluation score of 3.68.
All methods receive the same layout distribution, the same environment-step budget with SpecTRL's distillation stage counted against its budget, the same ego architecture, and an equal hyperparameter search of a fixed number of trials each.
Three ablations isolate the key ingredient. The first is XP-min trained over $G$, which tests whether layout randomization alone filters out handshakes. The second is our identifiability objective with an absolute-coordinate discriminator, which tests whether relational features matter. The third is our objective on fixed layouts only, which tests whether transformations matter.
Beating the field means three things. On Multi-recipe Overcooked, we must match SpecTRL's $\mathcal{D}\approx 1.60$ at equal or lower overfitness, without recipe labels. On the Overcooked Generalisation Challenge, we must exceed both UPD and ported ROTATE in holdout-partner solve rate on novel layouts, with non-overlapping confidence intervals across seeds. Separately from both, the ablations must show that removing either the relational discriminator or the transformations erases most of the gain.
Why not just…?
Why not just run XP-min across randomized, transformed layouts and let geometry break the handshakes? This is the most serious threat, and it is our first ablation. If handshakes were purely spatial, randomization might suffice. But XP-min still pays partners to fail with strangers, and it will look for any layout-invariant signal that works, such as a timing pattern of waits and interactions. Our diagnostic can detect this: under XP-min over $G$, the absolute-versus-relational discriminator gap should shrink while cross-play sabotage persists. If sabotage instead disappears and the ego agent matches ours, the correct conclusion is that the layout curriculum does the work, and we would report that result.
Why not just use state augmentation? OvercookedV2 shows that state augmentation nearly eliminates the 118-point self-play/cross-play gap on classic Coordination Ring, so a real share of apparent handshaking in classic layouts may be unseen-state failure. The same paper shows it fails on Test Time Simple, where cross-play falls to -81 despite augmentation. We therefore apply state augmentation to every population method, so that any remaining difference cannot be attributed to state coverage.
Why not just regularize cross-play directly, or use SpecTRL? Direct regularization is reported to cause Loss of Specialization (Diversity Is Not All You Need). SpecTRL avoids that but needs task labels and a two-stage pipeline, and it has not been tested off fixed layouts. The Multi-recipe experiment decides this directly: if our population's specialization metric falls below SpecTRL's, our objective has the same flattening problem.
Why not just scale an in-context sequence model? Benchmarking the Limits of In-Context RL for Ad-Hoc Teamwork trained on 150 million transitions and still obtained flat adaptation curves, scoring -18.0 (Algorithm Distillation) and -23.4 (Decision-Pretrained Transformer) against a random agent's 0.0 on Test Wide. That evidence argues against scale alone. We do not claim our method fixes in-context inference.
Decisive Checks
Three results would falsify the core claim. The first is that XP-min over $G$ matches our method on both handshake diagnostics and ego generalization. The second is that the relational-discriminator population shows lower specialization than SpecTRL on Multi-recipe Overcooked. The third is that the absolute-versus-relational identifiability gap fails to predict transformation-test sabotage across all populations. That third check validates the label-free handshake indicator independently of any benchmark score.
A known limit is that explicit communication channels, such as OvercookedV2's buttons, allow non-spatial cheap-talk handshakes. We run a small OvercookedV2 stress test with the buttons visible to the discriminator. We expect removing the sabotage incentive to still help there, but we do not expect the spatial filter to contribute.
References
- Diverse Conventions for Human-AI Collaboration
- Diversity Is Not All You Need: Training A Robust Cooperative Agent Needs Specialist Partners
- Robust and Diverse Multi-Agent Learning via Rational Policy Gradient
- ROTATE: Regret-driven Open-ended Training for Ad Hoc Teamwork
- Relative Variational Intrinsic Control
- Diversity is All You Need: Learning Skills without a Reward Function
- The Overcooked Generalisation Challenge
- Unsupervised Partner Design Enables Robust Ad-hoc Teamwork
- OvercookedV2: Rethinking Overcooked for Zero-Shot Coordination
- Benchmarking the Limits of In-Context Reinforcement Learning for Ad-Hoc Teamwork