techlist.io

Opponent Modeling

1 posts

OpenAI2017-09-133 min readCurated summary

Learning to model other minds

# Learning with Opponent-Learning Awareness OpenAI and the University of Oxford introduced LOLA, an algorithm that lets reinforcement learning agents account for the fact that other agents are learning at the same time. Instead of treating other learners as part of a static environment, a LOLA agent shapes how its opponents update their policies, which allows self-interested agents to discover cooperative strategies such as tit-for-tat in the iterated prisoner's dilemma. The authors present it as a small step toward agents that model other minds. ## Motivation: Learning Without a Theory of Mind - Humans collaborate well because they reason about how their actions will change others' future behavior and often find win-win arrangements. - Standard deep multi-agent RL lacks this capacity. A state-of-the-art agent treats another learning agent as no different from a tree in the environment. - Methods such as Independent PPO tend to converge on selfish behavior that ignores other agents' objectives. ## How LOLA Works - Each LOLA agent, "Alice," models how another agent's ("Bob's") parameter update depends on Alice's policy, and how Bob's update in turn affects Alice's expected future reward. - Alice optimizes her return after one anticipated learning step of Bob, differentiating through that step to shape Bob's update in a direction that benefits her. - The key term is a second-order correction. Its left-hand side captures how Alice's return depends on Bob's policy change, and its right-hand side captures how Bob's learning step depends on Alice's policy. Multiplying the two measures how Alice can steer Bob's learning toward higher rewards for herself. - With access to the true gradients and Hessians, the terms can be computed exactly. In practice, the second-order term is estimated from samples using the policy gradient theorem, which makes LOLA applicable to general deep RL settings. - LOLA requires access to the other agents' policies. LOLA-OM (opponent modeling) instead fits a model of the opponent from observed trajectories, predicting its parameters from its actions. The authors plan to extend this to infer opponents' architectures and rewards. ## Results - **Iterated prisoner's dilemma and coin game:** LOLA agents discover reciprocal strategies, while Independent PPO learns selfish behavior. - **Coin game:** Two agents, red and blue, collect coins. Any agent earns a point for collecting a coin, but collecting a coin of the other agent's color costs that agent 2 points. If both agents greedily collect every coin, both average zero. LOLA agents learn to mostly collect coins of their own color, earning high scores. - Both LOLA and LOLA-OM collect more coins and score substantially higher than the baselines. ## Limitations - LOLA performs best with large batch sizes and full roll-outs for variance reduction, which makes it memory- and compute-intensive. - Under opponent modeling, LOLA can be unstable, which the authors plan to address in future work.