Fast Peer Adaptation with Context-aware Exploration

Long Ma, Yuanfei Wang, Fangwei Zhong, Song-Chun Zhu, Yizhou Wang

Abstract

Fast adaptation to unknown peers—whether partners or opponents—is a fundamental challenge in multi-agent reinforcement learning (MARL). To adapt effectively, an agent must first identify the peer's strategy, a task complicated by partial observability and long-horizon interactions. We introduce PACE (Peer Adaptation with Context-aware Exploration), a framework that incorporates a peer identification auxiliary task and an intrinsic exploration reward. This reward incentivizes agents to actively "probe" their peers to resolve uncertainty about their strategies. Our results across competitive (Kuhn Poker), cooperative (PO-Overcooked), and mixed (Predator-Prey-W) environments show that PACE induces active exploration, leading to faster identification and superior long-term performance compared to state-of-the-art baselines.

1. Introduction

In multi-agent systems, success often hinges on an agent's ability to quickly "read" its peers. While traditional opponent modeling assumes that others' behaviors are easily observable, real-world environments are frequently partially observable. In such settings, an agent cannot simply wait for information to arrive; it must act to uncover it. This creates a critical exploration-exploitation trade-off: should the agent pursue immediate task rewards or take exploratory actions—such as bluffing in poker to see a showdown or moving to a vantage point in a cooperative game—to identify a peer's strategy for a larger future payoff? PACE addresses this by rewarding agents for reducing uncertainty about their peers' behavioral patterns.

2. The PACE Framework

The PACE architecture is designed to transform peer adaptation from a passive observation task into an active exploration process. It consists of three primary components:

2.1 Context Encoder

To capture long-term behavioral patterns, PACE employs a context encoder that processes the history of observations and actions across multiple episodes. Unlike standard recurrent architectures that focus on intra-episode dynamics, this encoder compresses the multi-episode "context" into a latent representation that characterizes the peer's strategy.

2.2 Peer Identification Auxiliary Task

During the training phase, the agent interacts with a diverse pool of peer policies. An auxiliary identification head is trained to classify which specific peer the agent is currently interacting with, using the latent context provided by the encoder. This task provides the ground truth for understanding peer behavior.

2.3 Context-aware Exploration Reward

The core innovation of PACE is the intrinsic exploration reward ($r^e$). This reward is proportional to the confidence (or information gain) of the peer identification module. By maximizing this reward, the agent is incentivized to take actions that generate informative feedback from the peer. To ensure the agent eventually prioritizes the primary task, the weight of this exploration reward is linearly decayed during the training process.

3. Experimental Evaluation

We evaluated PACE against several baselines, including GSCU and LIAM, across three distinct environments:

  • Kuhn Poker (Competitive): A game requiring agents to infer an opponent's bluffing frequency. PACE learned to force "showdowns" early in the interaction to reveal the opponent's private cards, sacrificing small immediate rewards for long-term strategic advantage.
  • PO-Overcooked (Cooperative): A partially observable version of the cooking simulator where agents are separated by a wall. PACE was the only method that learned to move to the divider to observe the partner's progress, enabling successful coordination on recipes.
  • Predator-Prey-W (Mixed): A scenario where predators can visit "watchtowers" to gain full visibility. PACE agents actively utilized these towers to coordinate with their peers, despite the towers providing no direct task reward.

4. Key Results and Insights

4.1 Active Probing and Strategic Sacrifice

In Kuhn Poker, PACE achieved a reward of 0.047, significantly outperforming the best baseline (0.027). This success was driven by a high showdown rate (~0.64) in early episodes. By "probing" the opponent's cards, PACE identified their strategy faster, allowing for a more effective best-response in later episodes.

4.2 Superior Coordination in Partial Observability

In the PO-Overcooked environment, PACE achieved a 0.553 success rate, while all baselines hovered around 0.1. The baselines failed because they did not prioritize the information-gathering movements necessary to understand their partner's intent in a partially observable space.

4.3 Robustness to Strategy Shifts

To test adaptability, we introduced a scenario where a peer's strategy changed mid-interaction. PACE successfully detected the resulting performance drop, cleared its context, and re-engaged in exploration to identify the new strategy. It maintained a 0.435 success rate, whereas baselines remained near 0.12, failing to adapt to the change.

5. Discussion and Limitations

While PACE demonstrates a significant advancement in active peer adaptation, it relies on a diverse and representative pool of peer strategies during training. If a test-time peer behaves in a way fundamentally different from the training pool, the identification module may struggle. Additionally, the current framework is designed for a fixed number of agents; scaling to dynamic environments with varying agent counts remains a subject for future work.

6. Conclusion

PACE demonstrates that effective adaptation in multi-agent systems is not just about reacting to observations, but about actively seeking the right information. By rewarding agents for identifying their peers, PACE enables faster adaptation and more robust performance in complex, partially observable games. This "active probing" approach marks a vital step toward agents that can truly understand and collaborate with diverse partners in the real world.

Summary updated

BibTeX
@inproceedings{ma2024fast,
  author = {Long Ma and Yuanfei Wang and Fangwei Zhong and Song-Chun Zhu and Yizhou Wang},
  title = {{Fast Peer Adaptation with Context-aware Exploration}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=CBcNl5Eo32},
}
Figure