{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/learning-with-opponent-learning-awareness","title":"Learning with Opponent-Learning Awareness","arxiv_id":"1709.04326","date":"2017-09-13","proceeding":null,"authors":["Jakob N. Foerster","Richard Y. Chen","Maruan Al-Shedivat","Shimon Whiteson","Pieter Abbeel","Igor Mordatch"],"abstract":"Multi-agent settings are quickly gathering importance in machine learning.\nThis includes a plethora of recent work on deep multi-agent reinforcement\nlearning, but also can be extended to hierarchical RL, generative adversarial\nnetworks and decentralised optimisation. In all these settings the presence of\nmultiple learning agents renders the training problem non-stationary and often\nleads to unstable training or undesired final results. We present Learning with\nOpponent-Learning Awareness (LOLA), a method in which each agent shapes the\nanticipated learning of the other agents in the environment. The LOLA learning\nrule includes a term that accounts for the impact of one agent's policy on the\nanticipated parameter update of the other agents. Results show that the\nencounter of two LOLA agents leads to the emergence of tit-for-tat and\ntherefore cooperation in the iterated prisoners' dilemma, while independent\nlearning does not. In this domain, LOLA also receives higher payouts compared\nto a naive learner, and is robust against exploitation by higher order\ngradient-based methods. Applied to repeated matching pennies, LOLA agents\nconverge to the Nash equilibrium. In a round robin tournament we show that LOLA\nagents successfully shape the learning of a range of multi-agent learning\nalgorithms from literature, resulting in the highest average returns on the\nIPD. We also show that the LOLA update rule can be efficiently calculated using\nan extension of the policy gradient estimator, making the method suitable for\nmodel-free RL. The method thus scales to large parameter and input spaces and\nnonlinear function approximators. We apply LOLA to a grid world task with an\nembedded social dilemma using recurrent policies and opponent modelling. By\nexplicitly considering the learning of the other agent, LOLA agents learn to\ncooperate out of self-interest. The code is at github.com/alshedivat/lola.","url_abs":"http://arxiv.org/abs/1709.04326v4","url_pdf":"http://arxiv.org/pdf/1709.04326v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"learning-with-opponent-learning-awareness","repo_url":"https://github.com/alshedivat/lola","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"learning-with-opponent-learning-awareness","repo_url":"https://github.com/Phutoast/Stable-Multi-Agent-Reinforcement-Learning","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"learning-with-opponent-learning-awareness","repo_url":"https://github.com/alexis-jacq/LOLA","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"learning-with-opponent-learning-awareness","repo_url":"https://github.com/alexis-jacq/LOLA_DICE","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"learning-with-opponent-learning-awareness","repo_url":"https://github.com/yannbouteiller/gym-airsimdroneracinglab","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"learning-with-opponent-learning-awareness","repo_url":"https://github.com/longtermrisk/marltoolbox","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"multi-agent-reinforcement-learning","task_name":"Multi-agent Reinforcement Learning"},{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1709.04326","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1709.04326"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/alexis-jacq/LOLA","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/alshedivat/lola","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/longtermrisk/marltoolbox","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yannbouteiller/gym-airsimdroneracinglab","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/alexis-jacq/LOLA_DICE","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Phutoast/Stable-Multi-Agent-Reinforcement-Learning","reach":{"status":"unanswered"}}],"summary":{"ran_draft_wrong":3},"by_repo_kind":{"listed":{"samples":3,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"78a2342d50bd8fc9","entry":"act","repo":"alexis-jacq/LOLA_DICE","repo_kind":"listed","path":"ipd_DiCE.py","file_url":"https://github.com/alexis-jacq/LOLA_DICE/blob/HEAD/ipd_DiCE.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"78a2342d50bd8fc9"}},{"code_sha256_prefix":"2eb560d76fdde027","entry":"get_gradient","repo":"alexis-jacq/LOLA_DICE","repo_kind":"listed","path":"ipd_DiCE.py","file_url":"https://github.com/alexis-jacq/LOLA_DICE/blob/HEAD/ipd_DiCE.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2eb560d76fdde027"}},{"code_sha256_prefix":"2d97875446464dc6","entry":"magic_box","repo":"alexis-jacq/LOLA_DICE","repo_kind":"listed","path":"ipd_DiCE.py","file_url":"https://github.com/alexis-jacq/LOLA_DICE/blob/HEAD/ipd_DiCE.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2d97875446464dc6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}