Modeling opponent learning in multiagent repeated games

Yudong Hu, Congying Han, Haoran Li, Tiande Guo

Abstract

In Multiagent Reinforcement Learning (MARL), agents often struggle with non-stationarity as opponents simultaneously adapt their strategies. This frequently leads to sub-optimal outcomes, such as the mutual defection of a Nash Equilibrium in the Prisoner’s Dilemma. We present Modeling Opponent Learning (MOL), a decentralized two-phase algorithm that treats repeated games through the lens of Stackelberg leadership. By modeling the long-term stable outcomes of an opponent's learning process without requiring private information, MOL "shapes" the environment toward high-reward equilibria. Experimental results across various matrix games and multi-agent scenarios demonstrate that MOL consistently outperforms state-of-the-art opponent-shaping methods in both efficiency and social welfare.

Introduction

The primary challenge in MARL is the "moving target" problem: as one agent learns, the environment's transition and reward dynamics shift for others. Naive learners often converge to a Nash Equilibrium (NE) that is Pareto-dominated by other reachable outcomes. While existing "opponent shaping" methods like LOLA or SOS attempt to influence opponent behavior, they typically require access to the opponent's internal parameters (e.g., gradients or reward functions) and focus on immediate, transient strategy shifts. MOL addresses these gaps by acting as a strategic "leader" that guides the system toward more efficient stable points using only observed actions and rewards.

The MOL Framework

MOL breaks the learning process into two distinct phases to manage the complexity of opponent adaptation.

Phase I: Exploration and Preference Discovery

The agent employs a Q-table and the Upper Confidence Bound (UCB) algorithm to explore the game structure. The objective is to identify a baseline Nash Equilibrium and estimate the opponent's "preferences"—how they are likely to respond to different actions. By using Best Response theory, MOL approximates these preferences without needing to peek at the opponent's private code or reward functions.

Phase II: Strategic Shaping

In the second phase, the agent acts as a strategic leader. It constructs a long-term value model ($V_a$) based on the findings from Phase I. Actions are selected using a weighted combination of immediate rewards and this long-term value. By strategically choosing actions, the MOL agent "leads" the opponent toward a more beneficial stable point, effectively treating the opponent's learning process as a predictable response to its own leadership.

Table 1: Comparison of MOL with existing MARL algorithms across key performance and requirement metrics.

Experimental Evaluation

MOL was evaluated against several benchmarks, including DRON, LOLA, SOS, and COLA, across a suite of environments ranging from classic matrix games to 3-player scenarios.

Stackelberg Leader Game

In the Stackelberg Leader game (represented by the payoff matrix below), standard algorithms often settle for the lower-reward Nash Equilibrium. For instance, while algorithms like DRON and LOLA often hit a joint reward baseline of 1.5, MOL successfully reached the optimal "Leader" result with a joint reward of 2.5.

Figure 1: Payoff matrix for a 2x2 game where the Stackelberg outcome outperforms the standard Nash Equilibrium.

Robustness and Scalability

The researchers tested MOL in 2,000 randomly generated bimatrix games. MOL consistently achieved higher social welfare than its peers. Furthermore, in a 3-player version of the Stag Hunt, MOL demonstrated scalability, maintaining high performance where other opponent-modeling algorithms typically struggle with increased complexity.

Key Insights

  • Nash as a Safety Net: Theoretically, MOL is guaranteed not to converge to a result worse than the Nash Equilibrium identified in Phase I. It uses the Nash result as a floor while searching for Pareto-optimal outcomes.
  • Privacy-Preserving Shaping: Unlike SOS or COLA, MOL does not require the opponent's reward function. It learns the necessary dynamics solely through interaction.
  • Prosocial Powerhouse: In competitive head-to-head matchups, MOL improves the overall social welfare of the system while securing its own high rewards, making it a robust choice for mixed-motive environments.

Conclusion

MOL provides a powerful, decentralized framework for opponent shaping in MARL. By modeling the stable outcomes of learning rather than transient steps, it achieves superior results in repeated games without violating agent privacy. Future work will focus on extending MOL to high-dimensional state spaces using deep neural networks and exploring the role of explicit communication in accelerating the initial exploration phase.

Summary updated

BibTeX
@article{hu2023modeling,
  author = {Yudong Hu and Congying Han and Haoran Li and Tiande Guo},
  title = {{Modeling opponent learning in multiagent repeated games}},
  journal = {Applied Intelligence},
  year = {2023},
  doi = {10.1007/s10489-022-04249-x},
}
Figure