Unifying Partner and Environment Diversity to Improve Human-AI Coordination

Patrick Q. Zhang, Yancheng Liang, Adrienne Fairhall, Natasha Jaques
NeurIPS 2026

Cross Environment Co-Play (CECP) trains agents to cooperate with novel partners, in novel environments.

AI deployed in the real world has to coordinate with people it has never met, in settings it has never seen. Although hundreds of papers have been written on cooperating with novel partners, these almost all focus on training a new policy for each new environment. Training a single self-play agent across procedurally generated environments improves generalization to both new layouts and new partners, but never exposes the agent to a diverse set of partners. CECP combines both kinds of diversity.

Training Method

Step 1: Train a population of self-play agents, each across a distribution of procedurally generated environments.

A self-play agent trained on one Overcooked layout, then on a stack of procedurally generated layouts; the agent is then duplicated into a population of such self-play agents.

Step 2: Train a cooperator against this frozen population, again across a distribution of environments.

Co-play arrows run from each self-play agent in the population down to the CECP cooperator, which also trains across a stack of procedurally generated layouts.

Cooperator Architecture

The cooperator encodes each observation with a convolutional encoder and an LSTM into a latent z, which feeds an actor-critic head.

CECP adds a de-convolutional next-state predictor that takes z and the cooperator's own action and predicts the next state. The next state depends on both what the partner does and the layout, so this auxiliary objective pushes z to encode partner behavior and task structure together.

The cooperator network: a conv encoder and LSTM produce a latent z that feeds an actor-critic head outputting the action and value. A de-conv next-state predictor then appears, taking z and the cooperator's action and predicting the next state.

Results in Overcooked

Coordinating with novel partners in novel environments

We compare CECP against six baselines: SP, FCP, MEP, PACE, CoMeDi and CEC. All of the baselines except CEC train on one layout at a time. CEC and CECP train on procedurally generated layouts, and never see the five classic Overcooked layouts during training. Across novel agents, behavior-cloned human proxies, and real people, CECP outperforms the other baselines.

Bar plots of average return for SP, FCP, MEP, PACE, CoMeDi, CEC and CECP in four settings: novel agents on the 5 original layouts, novel agents on 100 held-out layouts (where only CEC and CECP score above zero), behavior-cloned human proxies on the 5 original layouts, and human participants on Coordination Ring and Counter Circuit. CECP has the highest bar in every setting.
Average return in each partner setting. Brackets compare CECP with each baseline (* p < 0.05, ** p < 0.01, *** p < 0.001); error bars show the standard deviation.

Humans prefer partnering with CECP

After playing, participants rated each partner on a 1–5 scale. They rated CECP as the partner that best adapted to them, and as the least frustrating and the least in their way. Lower is better for “Got in my way” and “Frustrating”.

Bar plot of participant ratings from 1 to 5 for FCP, MEP, CoMeDi, PACE, CEC and CECP on seven questions: adapted to me, consistent, human-like, got in my way, frustrating, enjoyed playing, and coordination. CECP is rated highest on adapted to me and lowest on got in my way and frustrating.
Post-game survey ratings. Brackets compare CECP with each baseline (* p < 0.05, ** p < 0.01, *** p < 0.001).

Example games with human participants

In each game, the human participant is red and the CECP agent is blue.

Coordination Ring: the human participant switches between clockwise and counter-clockwise movement patterns, so the CECP agent adjusts its movement to avoid collisions.
Counter Circuit: when the pot is ready, the CECP agent initially grabs a plate to collect the soup, but when it sees the human participant also grab a plate, it adapts, and sets the plate down to grab another onion instead.

CECP infers partner skill level

Does CECP actually model who it is playing with? We pair a CECP cooperator with partner agents saved early, midway and late in their training, as a stand-in for unskilled and skilled players, and track its latent z over each episode.

  • Middle: z projected onto its first two principal components. Each thin line is one episode, and the thick lines average over episodes with early (blue) and late (orange) partners. The trajectories start together and pull apart as the episode unfolds.
  • Right: a linear decoder trained on z recovers the partner's training stage (early, mid or late) above chance level, and gets more accurate the longer CECP plays with that partner.
The CECP cooperator architecture with a call-out from latent z. Over the episode, latent trajectories with early-stage and late-stage partners separate in a two-dimensional PCA projection, while a decoder's accuracy at predicting the partner's training stage rises from chance (1/3) to about 0.6.

Adapting to partner skill

Does CECP actually use this inference of partner skill level to adapt its behavior? We find example states in Overcooked where the CECP cooperator's action distribution differs based off of the partner's skill level.

Left: a Coordination Ring state in which the CECP agent (red) holds an onion between two pots and its partner (blue) stands by the onion pile. Right: CECP's action probabilities in this state. With early partners it mostly chooses up; with late partners it mostly chooses interact; middle partners fall in between.
When the partner is early in training, or unskilled, CECP prefers to head upward to finish the other pot, so at least one soup gets cooked.
When the partner is late in training, or skilled, CECP prefers to drop its onion in the rightward pot, expecting help from the partner to fill that pot up with another onion.

Conclusion

Combining partner and environment diversity with next-state prediction creates agents that generalize to new partners in new environments, coordinate better with real people, and represent their partner's skill.