Recent advances in multi-agent reinforcement learning, particularly Policy-Space Response Oracles (PSRO), have enabled the computation of approximate game-theoretic equilibria in increasingly complex domains. However, these methods rely on deep reinforcement learning oracles that produce `black-box' neural network policies, making them difficult to interpret, trust or debug. We introduce Code-Space Response Oracles (CSRO), a novel framework that addresses this challenge by replacing RL oracles with Large Language Models (LLMs). CSRO reframes the best response computation as a code generation task, prompting an LLM to generate policies directly as human-readable code. This approach not only yields inherently interpretable policies but also leverages the LLM's pretrained knowledge to discover complex, human-like strategies. We explore multiple ways to construct and enhance an LLM-based oracle: zero-shot prompting, iterative refinement and AlphaEvolve, a distributed LLM-based evolutionary system. We demonstrate that CSRO achieves performance competitive with baselines while producing a diverse set of explainable policies. Our work presents a new perspective on multi-agent learning, shifting the focus from optimizing opaque policy parameters to synthesizing interpretable algorithmic behavior.
Figures & tables
Figure 1: Example run of CSRO in Repeated Rock-Paper-Scissors.
Figure 2: Performance of CSRO variants in Repeated Rock-Paper-Scissors
Method / Agent
PopReturn ↑
PopExpl ↓
AggScore ↑
CSRO
- AlphaEvolve
50.5 1.9
25.2 20.3
25.4 21.6
- LinearRef. (code)
159.8 7.7
37.7 10.6
122.1 9.8
- LinearRef. (desc.)
99.3 29.9
31.6 12.4
67.7 21.4
- ZeroShot (desc.)
130.2 15.4
66.7 25.9
63.5 11.4
LLM Agent (27B)
193.2
67.2
126.0
Table 1: Performance in Repeated Rock-Paper-Scissors across Population Return , Within Population Exploitability and Aggregate Score . Results are averaged over 5 seeds. ( ∗ Denotes results reported in Lanctot et al. (2023) .)
Method
PopReturn ↑
PopExpl ↓
AggScore ↑
CSRO
- AlphaEvolve
49.3 3.7
4.4 0.6
44.9 4.1
- LinearRefinement
43.8 2.5
9.8 3.0
34.0 4.3
- ZeroShot
40.4 1.6
19.6 2.1
20.7 3.0
PSRO-IMPALA
13.3 6.9
58.4 3.3
−45.0 10.1
CFR+
39.8 0.3
0.0 0.0
39.8 0.3
Table 2: Performance in repeated Leduc hold’em. Results are averaged over 3 seeds.
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
Hyperparameter
Range
learning rates
[ 0.0001 , 0.001 ]
hidden layer sizes
{[ 256 , 128 ], [ 512 , 256 ]}
unroll length
[ 20 , 40 ]
entropy cost
[ 0.001 , 0.1 ]
batch size
[ 16,32,64 ]
max gradient norm
{1, 10, 40}
Appendix
Table 3: IMPALA hyperparameter sweep.
Hyperparameter
Value
learning rates
0.0001
hidden layer sizes
[ 256 , 128 ]
unroll length
20
entropy cost
0.001
batch size
16
max gradient norm
40
Appendix
Table 4: Hyperparameters in RRPS.
Hyperparameter
Value
learning rates
0.001
hidden layer sizes
[ 512 , 256 ]
unroll length
40
entropy cost
0.01
batch size
64
max gradient norm
40
Appendix
Table 5: Hyperparameter for repeated Leduc hold’em poker.
Gemma 3 (PT)
Bot Names
270M
1B
4B
27B
actr_lag2_decay
-20.1
-40.2
-22.1
-18.7
adddriftbot2
68.1
39.4
83.7
65.4
addshiftbot3
120.5
134.2
186.6
199.7
antiflatbot
995.3
993.1
991.1
991.2
antirotnbot
53.4
49.8
65.9
51.6
Appendix
Table 6: LLM agent performance against Repeated Rock-Paper-Scissors bot population. Returns averaged over 16 games.
Method
Input
Filter
PopReturn ↑
PopExpl ↓
AggScore ↑
mean
max
mean
min
mean
max
AlphaEvolve
Desc.
-
50.5 1.9
54.2
25.2 20.3
3.3
25.4 21.6
47.6
LinearRefinement
Desc.
-
99.3 29.9
171.8
31.6 12.4
11.8
67.7 21.4
128.1
LinearRefinement
Code
Top 5
159.8 7.7
189.1
37.7 10.6
8.8
122.1 9.8
141.3
ZeroShot
Desc.
-
130.2 15.4
177.8
66.7 25.9
18.9
63.5 11.4
86.9
LinearRefinement
Code
-
167.7 20.4
238.3
83.2 27.4
15.7
84.5 26.1
148.1
Appendix
Table 7: Performance of CSRO variants in Repeated Rock-Paper-Scissors ranked by PopExpl . Metrics are averaged over 3 seeds for AlphaEvolve and 5 seeds for all other variants.
Opponent
Method
CFR+
AlwaysCall
AlwaysFold
CSRO
- AlphaEvolve
−4.4 0.6
110.3 9.7
42.0 3.2
- LinearRefinement
−9.8 3.0
83.8 5.1
57.3 8.8
- ZeroShot
−19.6 2.1
99.7 3.0
41.0 6.1
PSRO-IMPALA
−58.4 3.3
57.7 3.3
40.7 14.1
Appendix
Table 8: Performance of CSRO variants in repeated Leduc hold’em. Metrics are averaged over 3 seeds.
Multi-agent systems enable complex reasoning and tool use by coordinating agents that divide roles and refine candidate solutions. Existing methods typically update individual agent responses or treat a complete trajectory as one training example. However, these methods may produce misleading policy updates because they assign the same final outcome to responses or trajectory segments that may play different roles in different team decisions. This is because treating each response as an independent update may separate outputs that jointly determine the next action, while treating an entire trajectory as one update may combine decisions made after different observations. These limitations call for a policy update defined at the level of a team decision, outputs that lead to the same state transition are optimized under a shared objective. In this paper, we propose Setwise Relative Policy Optimization (SRPO) for multi-agent systems. We represent the outputs used together to produce one state transition as an active set. A singleton set covers division of labor, while a larger set covers joint co-evolution, and the set composition can change across decisions. SRPO assigns a shared advantage to each active set, clips the combined policy change, and normalizes its scale according to the set size. This ties each update to the decision that produced the next state. Experiments on mathematical reasoning and multi-turn search demonstrate the effectiveness of SRPO across both tasks. Additional ablation studies analyze the normalization choice and training behavior under changing active-set sizes.
Shengtian Yang, Ziyu Xiong, Yu Li +3
Southeast University, Nanjing, China · Kuaishou Technology, Beijing, China
Much of the advancement in Multi-Agent Reinforcement Learning (MARL) for imperfect-information games has historically depended on the manual, iterative refinement of algorithmic baselines. Recently, evolutionary coding agents powered by Large Language Models (LLMs) have emerged as powerful tools to automate this discovery process. In this work, we deploy one of such agentic frameworks, AlphaEvolve, to navigate the design spaces of two distinct game-theoretic paradigms: counterfactual regret minimization (CFR) and policy-space response oracles (PSRO). This automated search yielded two algorithms: Volatility-Adaptive Discounted (VAD-) CFR and Smoothed Hybrid Optimistic Regret (SHOR-) PSRO, which are consistently competitive with state-of-the-art human-designed baselines across an 18-game evaluation suite spanning Poker, Goofspiel, Liar's Dice, Blotto, and Battleship variants. However, because the LLM optimizes for fitness on a specific training set, it often constructs highly synergistic, complex mechanisms tailored to those environments. Through systematic ablation studies, we demonstrate that while these mechanisms are tightly coupled, the true driver of generalization lies in a minimal algorithmic core. By distilling the LLM's discoveries down to their most fundamental principles, we produce two minimal solvers: Warm-started Optimistic Predictive (WOP-)CFR and Projection Matching (PM-)PSRO. These distilled versions achieve superior performance on generalization with greatly reduced structural complexity, providing a clear methodology for using LLMs in algorithmic discovery.
Can a multimodal language model learn to manipulate physical objects by reasoning about its own failures-without gradient updates, demonstrations, or reward engineering? We argue the answer is yes, under conditions we characterise precisely. We present Act-Observe-Rewrite (AOR), a framework in which an LLM agent improves a robot manipulation policy by synthesising entirely new executable Python controller code between trials, guided by visual observations and structured episode outcomes. Unlike prior work that grounds LLMs in pre-defined skill libraries or uses code generation for one-shot plan synthesis, AOR makes the full low-level motor control implementation the unit of LLM reasoning, enabling the agent to change not just what the robot does, but how it does it. The central claim is that interpretable code as the policy representation creates a qualitatively different kind of in-context learning from opaque neural policies: the agent can diagnose systematic failures and rewrite their causes. We validate this across three robosuite manipulation tasks and report promising results, with the agent achieving high success rates without demonstrations, reward engineering, or gradient updates.