Benchmarking Code Agents After RL Post-Training: An Adversarial Game Case Study

    This article presents a controlled evaluation of code agents after reinforcement learning post-training in a 2v2 adversarial soccer environment. It compares base models with lightweight and top-tier partners and contrasts first- and second-generation RL post-trained models. The results show that domain-focused RL can substantially improve same-origin pairings, and the article distills practical guidance for building dynamic, controlled benchmarks for model selection and post-training.

    Benchmarking Code Agents After RL Post-Training: An Adversarial Game Case Study

    1. Background: A Counterintuitive Observation

    Recently, a set of test results circulating in the community attracted attention: after reinforcement learning post-training on software engineering (SWE-style) tasks, a derivative model B built from base model A performed at roughly twice the level of the later upgraded version of its base model on a coding benchmark. At first glance, this seems counterintuitive. The model with the higher base version number and newer training data fell far behind its own downstream derivative in a specific evaluation. What is really happening behind this result?

    As an engineer who has long worked on developer toolchain construction, I decided to reproduce and extend this type of evaluation using a controllable, comparable experimental framework to break down the problem. This article records the complete evaluation design, experimental data, and analysis conclusions, with the hope that it will be useful to teams working on model selection or running their own model post-training.

    2. Evaluation Task Design: Why an Adversarial Game?

    The benchmark used in this test is not a traditional static code problem set. It is a 2v2 simplified soccer adversarial environment. This choice is not for novelty; it has engineering considerations:

    1. Strong multi-step decision-making: A single match contains hundreds of decision points. Each decision depends on the correct execution of complete code logic, and a single-point bug is quickly amplified into a match loss.
    2. Stress testing through adversarial pressure: Static benchmarks are prone to being contaminated by “memorizing the questions.” In an adversarial environment, opponent strategies vary, so the model must truly understand task semantics and write robust strategy code.
    3. Quantifiable outcomes: Wins and losses, goals scored and conceded, and score rate are natural objective metrics, without the subjectivity of manual scoring.

    Simply put, this type of environment is a kind of “dynamic stress test” for code generation capability. It maps strongly to real scenarios in software engineering: requirement understanding, solution design, boundary handling, and exception fallback.

    3. Control Group Design: Controlled Variables Are the Lifeline of Evaluation

    To make the conclusions credible, I designed multiple control groups covering different variable dimensions:

    Group 1: New base version + lightweight partner. The latest Pro version of model A was paired with a lightweight, fast model. The design intent was to verify the practical effect of the common industry cost-optimization combination of “strong model + cost-saving secondary model,” especially since sub-agent calls to secondary models are common in intelligent coding tools. The data showed that this “mixed” combination performed poorly, indicating that cost-oriented model pairing carries a high price in strongly adversarial tasks.

    Group 2: New base version + top-tier large partner. The new base version was given a very capable partner to see whether its weakness could be compensated. The result showed some improvement but still fell short of expectations, indicating that the effect of a combination is not a simple sum of capabilities.

    Group 3: Base 256k long-context version + first-generation RL post-trained model. This group is effectively a “two same-origin models” pairing and serves as the control baseline for Group 4.

    Group 4 (the focus of this article): Base 256k long-context version + second-generation RL post-trained model (enhanced version). This is marked as [New] in the table.

    In addition, several pairwise combinations of other mainstream models were included as external references, ensuring that the results had a sufficiently broad yardstick.

    Data Snapshot (Team Match, Excerpt)

    Rank Pairing Score Rate W-D-L Goals:Conceded
    1 Combo X + Combo Y 99.5% 787-4-19 9642:1035
    2 New Pro + Top-tier partner 84.5% 658-33-101 8290:2290
    3 Combo M + Combo N 65.0% 495-60-237 4565:2792
    5 [New] Base 256k + Enhanced Max 58.2% 439-66-287 3980:3052
    6 Base 256k + First-gen Max 38.9% 284-73-435 2897:4583
    7 New Pro + Lightweight partner 21.5% 140-92-560 1885:6173

    In the individual competition, the enhanced model ranked near the top with a 66.0% score rate, clearly separating itself from other members of the base-model family.

    4. Key Finding: RL Post-Training Nearly Doubles the Same-Origin Pairing

    The core comparison is between Rank 5 and Rank 6: the same base model, the same task environment, and the only difference is whether the partner model is the first-generation enhanced version or the second-generation enhanced version. The score rate rose from 38.9% to 58.2%, and the original analysis reported the net goal difference improving from -1,686 to -1,072, a relative improvement close to two-fold.

    I attribute this to three factors:

    1. Domain focus of the RL reward signal. For reinforcement learning on software engineering tasks, the reward comes directly from hard metrics such as unit test pass rate and patch executability. This signal quickly optimizes the model on the narrow but critical ability to “write runnable, verifiable code.” Even if the base model itself is updated, a version without targeted RL training struggles to match it.
    2. Convergence of the behavior distribution. SFT only teaches a model to “write code like a human,” while RL teaches it to “write code that passes validation.” In an adversarial environment, the difference in the latter is amplified exponentially.
    3. Synergy between long context and domain fine-tuning. The 256k long-context version ensures that task context is not truncated, while the enhanced model provides higher-quality strategy generation. The two form an orthogonal complement.

    At the same time, in the individual competition data, this enhanced model consistently outperformed several general-purpose models with larger parameter counts, further supporting the judgment that “domain-specific RL > general scale expansion” is effective on specific tasks.

    5. Recommendations for Methodology Transfer

    To transfer this evaluation framework to a team’s technology selection process, I have summarized four practical points:

    • Define the task first, then choose the benchmark. Do not blindly trust generic leaderboards. Build a dynamic evaluation environment that resembles your own business shape.
    • Controls must hold a single variable constant. The strongest conclusion in this article comes precisely from the strict control of “changing only one partner model.”
    • Run team and individual dimensions in parallel. Test both single-model capability and combination performance in collaboration scenarios. The latter is often closer to real engineering, such as multi-agent systems and primary/secondary model division of labor.
    • Beware the trap of cost-oriented model pairing. The data shows that downgrading a secondary model to save money causes losses in complex tasks that far exceed the expected cost benefit.

    6. Conclusion

    The biggest lesson from this set of experiments is that an increasing model version number does not necessarily mean increasing capability in your domain. Reinforcement learning post-training targeted at the target task remains a highly cost-effective path to capability improvement. For engineering teams, rather than chasing the latest base model, it is better to seriously build your own evaluation system that is adversarial, quantifiable, and controlled. It is the most reliable compass for model selection and continuous iteration.