TL;DR
If you invite a friend over to help cook dinner in an unfamiliar kitchen, you both adapt to the new layout and each other’s quirks on the fly—something cooperative AI agents notoriously fail at. This paper introduces Cross-Environment Co-Play (CECP), a training framework that exposes AI agents to both diverse partners and procedurally generated environments simultaneously. By adding a simple requirement to predict the immediate future, these agents learn to implicitly gauge a human partner's skill level and adapt in real time, achieving state-of-the-art human-AI teamwork in completely unseen settings.
What Problem Does This Paper Address?
Imagine deploying a household robot. Every home has a different floor plan, and every human has different habits. The authors call this double-whammy of adapting to new places and new people socio-situational shift.
In AI research, Zero-Shot Coordination (ZSC) studies how agents collaborate with unseen partners without prior coordination. Historically, ZSC has relied on self-play (an agent playing with itself), which fails with humans because the AI invents rigid, alien conventions. Researchers fixed this using population-based training—training an AI with a diverse crowd of simulated partners—but almost always inside a single, fixed environment. Conversely, recent meta-reinforcement learning work showed that training a single self-play agent across thousands of different environments helps it adapt to humans, yet naive attempts to combine both partner diversity and environment diversity fell flat due to extreme training instability and non-stationarity.
Methods
To conquer socio-situational shift, the authors propose Cross-Environment Co-Play (CECP), a two-stage meta-reinforcement learning framework paired with a predictive architectural twist:
- Stage 1: Cross-Environment Partner Pool. Instead of training partners in one room, CECP trains multiple self-play agents across a massive distribution of procedurally generated environments. Following standard Fictitious Co-Play (FCP) protocols, they save early, middle, and late training checkpoints to capture a wide spectrum of strategies and skill levels.
- Stage 2: Cooperator Training. A single "cooperator" policy (built with a convolutional LSTM encoder and trained via PPO) is trained to maximize rewards across both the procedurally generated environments and the frozen partner pool.
- The Secret Sauce (Next-State Prediction): Training across shifting maps and shifting partners simultaneously is chaotic. To stabilize representation learning, the authors attach an auxiliary next-state prediction head to the cooperator's latent state ($z$). Given its history and its own chosen action, the agent must predict the exact next state of the world. Because the world's next state depends on both physics and what the partner does next, this forces the agent's latent brain to jointly model task structure and partner behavior.
Datasets
Because this is reinforcement learning, "datasets" take the form of interactive simulation benchmarks (plus behavioral-cloned human proxies from prior work):
- Cooperative Foraging: A newly implemented, neuroscience-inspired grid-world where two agents must deduce and stay on the same goal tile (out of two randomly placed options) to earn rewards, testing pure convention-breaking across held-out goal layouts.
- Overcooked: The classic ZSC cooking simulator where two chefs chop onions, cook soup, and plate dishes. CECP trains on procedurally generated kitchens and is evaluated zero-shot on 100 held-out procedural layouts and the 5 classic benchmark layouts (never seen by CECP during training!).
Key Insights and Ideas
- Environment diversity doesn't erase conventions: Even when self-play agents train across thousands of maps, different seeds still form distinct arbitrary habits (e.g., turning left vs. interacting with a pot in the exact same state). Exposing CECP to a population of these agents is crucial for teaching flexibility.
- Predicting the world builds an implicit Theory of Mind: Without ever explicitly training to predict partner actions, CECP’s next-state module predicts human and AI teammate movements well above chance (20%). Intriguingly, CECP predicts skilled humans much more accurately than novices ($r = 0.433, p = 0.002$)—competence is predictable; chaos is not.
- Spontaneous skill-level tracking and adaptation: Linear probes on CECP’s latent space ($z$) show that as an episode unfolds, the agent dynamically separates novices from experts—even correlating with human players' self-reported Overcooked experience! Better yet, it acts on this: when paired with an expert, CECP takes an efficient shortcut and trusts the partner to help; with a novice, it takes a safer route to finish a soup solo.
Key Results
- Surviving Socio-Situational Shift: In Cooperative Foraging, standard single-environment baselines score near 0 on novel maps. Cross-environment self-play (CEC) adapts to new maps, but drops to roughly half the return of CECP (~210 vs. ~390) when facing both a new map and a novel partner.
- Zero-Shot Overcooked Mastery: Across the 5 classic Overcooked layouts, CECP significantly outperforms all baselines (SP, FCP, MEP, PACE, CoMeDi) in AI cross-play and with human-proxy bots—despite the baselines training directly on those exact 5 maps while CECP never saw them during training. On 100 unseen procedural maps, single-map baselines collapse completely while CECP beats CEC ($p < 0.001$).
- Real-World Human Study ($N = 73$): Playing live with Prolific participants across two classic layouts, CECP achieved the highest game scores ($p < 0.01$ to $p < 0.001$ over all baselines). Humans rated CECP significantly higher on "Adapted to me" and "Enjoyed playing," and lower on "Frustrating" and "Got in my way."
- Ablations: Stripping away the next-state predictor causes a substantial drop in cross-play return (~105 vs. ~125+ across 3 billion steps), proving prediction drives generalization.
Limitations and Future Work
- Bounded by training diversity: CECP is only as adaptable as the procedural generator and self-play pool it trains on; richer partner generation and broader task distributions are natural next steps.
- Coarse latent representations: While the latent space $z$ captures broad partner skill levels, its exact mechanism isn't fully understood and lacks fine-grained, partner-specific intent. Using structured bottlenecks to disentangle environment rules from partner quirks could boost interpretability and sample efficiency.
- Harder worlds: Testing CECP on newer benchmarks like OvercookedV2—which introduce partial observability and steeper task complexity—remains an exciting frontier.
Summary updated