RevengeBench

Reverse-engineering code-space policies from behavioral experiments.

An AI agent watches a bot play a game, then reconstructs the underlying strategy as working code. How close can it get? And does it do better when allowed to design its own opponents to probe the bot?

Leaderboard

Distance reduction across the five arenas. Higher is better.

Pipeline

Observation

Passive phase: the learner inspects the game traces of the hidden policy playing against a diverse set of opponents sampled from a policy pool.

Intervention

Active phase: the learner designs probe opponents to elicit specific behaviour from the hidden policy and disambiguate competing hypotheses.

Evaluation

Test phase: the learner submits one executable policy, scored by how often it picks the same action as the hidden policy on held-out trajectories.

Arenas

Five code-based arenas from CodeClash, spanning four programming languages and a range of game mechanics.

Findings

Protocol

RevengeBench operationalises an inverse problem in code space: given only behavioural traces of an opaque target agent in a programming-game arena, can a learner reconstruct a runnable program that reproduces its decisions? Because targets are themselves executable, hypotheses can be scored mechanically against ground truth, a property that behavioural inverse problems normally lack.

  • Targets: top 15 strongest policies by Elo per arena, extracted from CodeClash tournaments. 75 in total.
  • Opponent pool: 20 opponents sampled each round from the remaining pool.
  • Starter policy: arena-specific naive baseline that every learner edits from.
  • Protocol: closed loop of observation, intervention through probe opponents, hypothesis formulation, and evaluation. 5 rounds with persistent memory; best round reported for each model.
  • Probe budget: 5 probe opponents per round in the intervention regime.
  • Harness: mini-SWE-agent.
  • Metric: distance reduction $$\Delta = \frac{D_0 - D_R}{D_0}$$ where $D_0$ and $D_R$ are mean action distances of the starter policy $\hat{\pi}_0$ and the final hypothesis $\hat{\pi}_R$. Reporting $\Delta$ controls for differences in baseline difficulty across targets and arenas.

Team

*Equal contribution

Citation

If you found RevengeBench useful, please cite us as:

@article{revengebench_2026,
  title   = {RevengeBench: Reverse Engineering Code-Space Policies from Behavioral Experiments},
  author  = {Babak Rahmani and Sebastian Dziadzio and Joschka Strüber and Sergio Hernández Gutiérrez and Matthias Bethge},
  year    = {2026},
  journal = {arXiv preprint arXiv:2606.26094},
  url     = {https://arxiv.org/abs/2606.26094},
}