{"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/spiral-self-play-on-zero-sum-games","title":"SPIRAL: Self-Play on Zero-Sum Games Incentivizes Reasoning via Multi-Agent Multi-Turn Reinforcement Learning","arxiv_id":"2506.24119","date":"2025-06-30","proceeding":null,"authors":["Bo Liu","Leon Guertler","Simon Yu","Zichen Liu","Penghui Qi","Daniel Balcells","Mickel Liu","Cheston Tan","Weiyan Shi","Min Lin","Wee Sun Lee","Natasha Jaques"],"abstract":"Recent advances in reinforcement learning have shown that language models can develop sophisticated reasoning through training on tasks with verifiable rewards, but these approaches depend on human-curated problem-answer pairs and domain-specific reward engineering. We introduce SPIRAL, a self-play framework where models learn by playing multi-turn, zero-sum games against continuously improving versions of themselves, eliminating the need for human supervision. Through self-play, SPIRAL generates an infinite curriculum of progressively challenging problems as models must constantly adapt to stronger opponents. To enable this self-play training at scale, We implement a fully online, multi-turn, multi-agent reinforcement learning system for LLMs and propose role-conditioned advantage estimation (RAE) to stabilize multi-agent training. Using SPIRAL, self-play on zero-sum games produces reasoning capabilities that transfer broadly. Training Qwen3-4B-Base on Kuhn Poker alone achieves 8.6% improvement on math and 8.4% on general reasoning, outperforming SFT on 25,000 expert game trajectories. Analysis reveals that this transfer occurs through three cognitive patterns: systematic decomposition, expected value calculation, and case-by-case analysis. Multi-game training (TicTacToe, Kuhn Poker, Simple Negotiation) further enhances performance as each game develops distinct reasoning strengths. Applying SPIRAL to a strong reasoning model (DeepSeek-R1-Distill-Qwen-7B) can still lead to 2.0% average improvement. These results demonstrate that zero-sum games naturally develop transferable reasoning capabilities, highlighting a promising direction for autonomous reasoning development.","url_abs":"https://arxiv.org/abs/2506.24119v2","url_pdf":"https://arxiv.org/pdf/2506.24119v2.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":"spiral-self-play-on-zero-sum-games","repo_url":"https://github.com/spiral-rl/spiral","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"math","task_name":"Math"},{"task_slug":"multi-agent-reinforcement-learning","task_name":"Multi-agent Reinforcement Learning"}],"methods":[{"method_slug":"sft","method_name":"SFT"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2506.24119","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2506.24119"}},"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":"deterministic:regex_extraction","url":"https://github.com/spiral-rl/spiral","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":2,"unverified":7},"by_repo_kind":{"official":{"samples":9,"ran":2,"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":"0b14c648516c38a7","entry":"last_boxed_only_string","repo":"spiral-rl/spiral","repo_kind":"official","path":"spiral/utils.py","file_url":"https://github.com/spiral-rl/spiral/blob/HEAD/spiral/utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0b14c648516c38a7"}},{"code_sha256_prefix":"f3bbe264b05aadd3","entry":"remove_boxed","repo":"spiral-rl/spiral","repo_kind":"official","path":"spiral/utils.py","file_url":"https://github.com/spiral-rl/spiral/blob/HEAD/spiral/utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f3bbe264b05aadd3"}},{"code_sha256_prefix":"7cd44bc968f66cda","entry":"apply_qwen3_general_template","repo":"spiral-rl/spiral","repo_kind":"official","path":"spiral/template.py","file_url":"https://github.com/spiral-rl/spiral/blob/HEAD/spiral/template.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7cd44bc968f66cda"}},{"code_sha256_prefix":"4adf712b6102f06f","entry":"apply_qwen3_template","repo":"spiral-rl/spiral","repo_kind":"official","path":"spiral/template.py","file_url":"https://github.com/spiral-rl/spiral/blob/HEAD/spiral/template.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4adf712b6102f06f"}},{"code_sha256_prefix":"bc630fec239a59e3","entry":"apply_r1_template","repo":"spiral-rl/spiral","repo_kind":"official","path":"spiral/template.py","file_url":"https://github.com/spiral-rl/spiral/blob/HEAD/spiral/template.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bc630fec239a59e3"}},{"code_sha256_prefix":"281a1bd6cb164b71","entry":"kuhn_poker_parse_available_actions","repo":"spiral-rl/spiral","repo_kind":"official","path":"spiral/agents/utils.py","file_url":"https://github.com/spiral-rl/spiral/blob/HEAD/spiral/agents/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"281a1bd6cb164b71"}},{"code_sha256_prefix":"ab354c345a77fdbb","entry":"remove_text_boxed","repo":"spiral-rl/spiral","repo_kind":"official","path":"spiral/utils.py","file_url":"https://github.com/spiral-rl/spiral/blob/HEAD/spiral/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ab354c345a77fdbb"}},{"code_sha256_prefix":"d4afd8a004310838","entry":"simple_negotiation_parse_available_actions","repo":"spiral-rl/spiral","repo_kind":"official","path":"spiral/agents/utils.py","file_url":"https://github.com/spiral-rl/spiral/blob/HEAD/spiral/agents/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d4afd8a004310838"}},{"code_sha256_prefix":"af789c3ca7487db5","entry":"tic_tac_toe_parse_available_moves","repo":"spiral-rl/spiral","repo_kind":"official","path":"spiral/agents/utils.py","file_url":"https://github.com/spiral-rl/spiral/blob/HEAD/spiral/agents/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"af789c3ca7487db5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}