TL;DR
This paper introduces EvoPolicyGym, a controlled benchmark designed to evaluate how LLM-based coding agents autonomously evolve executable policies in interactive environments under a fixed budget. By analyzing the entire execution-feedback-revision trajectory rather than just final scores, the authors reveal that top-tier models succeed by synthesizing complex, task-appropriate control structures rather than merely tweaking parameters.
What Problem Does This Paper Address?
Large Language Model (LLM) agents are increasingly capable of writing and iteratively refining code based on environmental feedback. However, evaluating this iterative self-improvement process is notoriously difficult. Existing benchmarks typically collapse an agent's entire optimization journey into a single final score, masking critical trajectory-level failure modes like blind retries, overfitting to visible feedback, or brittle edge cases. Furthermore, open-ended software engineering tasks introduce confounding variables like shifting specifications.
To isolate and study an agent's ability to learn from bounded feedback, the authors formalize the problem of Autonomous Policy Evolution (APE). In this setting, an agent must repeatedly modify an executable decision policy using limited rollouts from an interactive environment, aiming to produce a policy system that generalizes robustly to unseen test scenarios.
Methods
The authors instantiate the APE setting via the EvoPolicyGym framework, which enforces a strict interaction loop and visibility boundary between the agent and the evaluation server:
- The Interaction Loop: The agent maintains a persistent workspace containing an executable Python policy (
policy.py). It submits code patches to a sandboxed platform, consuming a portion of a fixed interaction budget (128 total episodes). - Visibility Boundary: The server returns structured summaries and step-level trajectory feedback solely from a Train Pool. Crucially, checkpoint selection (via a Hidden Validation Pool) and final evaluation (via a Hidden Held-out Pool) are completely hidden from the agent to prevent feedback leakage and ensure true generalization.
- Trajectory Diagnostics: To understand how agents improve, the framework introduces post-hoc diagnostics that classify code changes into two modes:
- Structural Synthesis: Creating new algorithmic machinery (e.g., perception modules, memory, or planning logic).
- Parametric Tuning: Adjusting gains, thresholds, and constants within an existing control structure.
Datasets
The framework is validated on Core16, a calibrated suite of 16 diverse, Gymnasium-compatible reinforcement learning environments grouped into four distinct families:
- Gym / Box2D: Acrobot, Continuous Mountain Car, BipedalWalker, CarRacing.
- MuJoCo: Reacher, HalfCheetah, Ant, Pusher.
- MiniGrid: DoorKey, KeyCorridor, FourRooms, ObstructedMaze.
- Robotics / Driving: Parking, Roundabout, FetchPush, FetchPickAndPlace.
Each environment features distinct training instances, 16 hidden validation cases, and 32 hidden held-out cases.
Key Insights and Ideas
- The Synthesis Gap: The performance gap between elite models and weaker ones widens dramatically on "synthesis-dominant" tasks (like MiniGrid or CarRacing) that demand custom structural logic (e.g., building a world model or an explicit recovery mode). On simpler "tuning-dominant" control tasks, performance clusters much more tightly.
- Code Volume $\neq$ Success: While successful agents select structurally richer code bundles (more functions, loops, and persistent states) for complex tasks, simply churning out complex code without a proper task abstraction leads to failure.
- Local Wins vs. Suite Reliability: Weaker agents can achieve isolated wins on specific tasks but suffer from low cross-environment coverage. Robust autonomous policy evolution requires consistent near-top performance across heterogeneous reward scales.
Key Results
The authors evaluated four prominent model-and-harness systems (GPT-5.5, Claude Opus 4.7, MiniMax-M3, and DeepSeek-V4-Pro) under a strict 128-episode budget:
- GPT-5.5 (using the Codex harness) achieved the highest aggregate Core16 rank score of 0.891, securing 9 outright environment wins and placing in the top two across all 16 tasks.
- Claude Opus 4.7 (using the Claude Code harness) finished second overall with a score of 0.750, notably dominating the symbolic-planning-heavy MiniGrid family with a family score of 0.938.
- Post-Hoc Trajectories: Tracking the evolution of the best-so-far validation scores revealed distinct patterns across environments. MiniGrid tasks typically showed sparse, sharp performance jumps early in the budget, whereas MuJoCo and Robotics tasks required more incremental, budget-intensive refinements.
Limitations and Future Work
- AST Topology as a Proxy: Abstract Syntax Tree (AST) analysis is a conservative proxy for code structure; it cannot fully capture semantic behavior (e.g., two distinct topologies might implement identical control logic).
- Exclusion of External Artifacts: The current policy-bundle boundary focuses strictly on Python code, ignoring external data files, learned weights, or unreferenced experiments that an agent might generate in its workspace.
- Harness Confounders: Because models were evaluated alongside their native harnesses (Codex vs. Claude Code), differences in context management and tool execution profiles remain a minor confounding factor in isolating pure model capability.
Summary updated