Skip to main content

RevengeBench Logo

RevengeBench

Reverse Engineering Code-Space Policies from Behavioral Experiments

Babak Rahmani*  ·  Sebastian Dziadzio*  ·  Joschka Strüber*  ·  Sergio Hernández-Gutiérrez  ·  Matthias Bethge

Tübingen AI Center

(*) Equal contribution.

arXiv Dataset Leaderboard


RevengeBench poses an inverse problem in code-space: given only behavioral traces of an opaque target agent acting in a programming-game arena, can a learner reconstruct a runnable program that reproduces the target's behavior? The benchmark is built on 75 LLM-generated, Elo-calibrated target policies across five arenas: BattleSnake, Halite, HuskyBench, RoboCode, and RobotRumble.

The protocol pairs passive observation with constrained active intervention. The learner watches the hidden target play sampled opponents and may author probe opponents: runnable policies whose interaction with the target induces new trajectories. A probe acts only through the normal gameplay channel and has no privileged access to target source or internal state. The learner submits one executable hypothesis, which is scored by action-distance on held-out target states and by downstream player-versus-player tournaments.

This public release keeps upstream CodeClash as a git submodule and places the RevengeBench-specific package in src/revenge_bench.

News

2026-07: RevengeBench was accepted to the Second Workshop on Agents in the Wild: Safety, Security, and Beyond (AIWILD) at ICML 2026. See the OpenReview page.

Installation

For the released Python package and CLI:

pip install revenge-bench
revenge-bench --help

The PyPI package includes the RevengeBench Python package, CLI entry points, benchmark configs, target pools, and lightweight scripts. For full benchmark reproduction and development from the source tree:

git clone --recurse-submodules <repo-url> revenge-bench
cd revenge-bench
uv venv .venv --python 3.11
source .venv/bin/activate
uv pip install -e .

If you cloned without submodules:

git submodule update --init --recursive

You also need Docker, or Singularity/Apptainer with CODECLASH_RUNTIME set. Copy .env.example to .env and fill in the API keys for the LLM providers you plan to use.

Running The Benchmark

Main pool run:

bash scripts/run_pool.sh --seeds "42"

This iterates over configs/benchmark/<model>/<model>_<game>.yaml. Useful runner flags include --dry-run, --resume, --parallel N, --configs "name_a name_b", and --config-dir <dir>.

Public optional conditions and baselines use the same runner:

bash scripts/run_no_probe.sh --seeds "42"
bash scripts/run_nl_observation.sh --seeds "42"
bash scripts/run_bpi.sh --seeds "42"

Forward-PvP runs use the curated configs under configs/forward_pvp/:

bash scripts/run_forward_pvp.sh \
    --challengers "gpt5 gpt5-mini gpt-oss-120b grok-4.1-fast kimi-k2.6 deepseek-v3.2"

Optional Tracks

The main benchmark condition is active inverse-strategy recovery with probes. The public release also includes:

  • configs/conditions/no_probe/: trace-only recovery with active probes disabled.
  • configs/conditions/nl_observation/: recovery from LLM-generated natural-language summaries of traces.
  • configs/baselines/bpi/: Bayesian Program Inference baseline configs.
  • configs/forward_pvp/: downstream PvP configs comparing blind, recovered, and oracle opponent intelligence.

Paper-only plotting, history-compaction sweeps, reset-memory sweeps, and probe prompt ablation suites are intentionally not part of this release package.

Adding Target Policies

Create a directory under data/targets/<arena>/<policy_name>/ with a main.py implementing the arena's player API. See the existing target pools for examples.

Optional CodeClash target-pool generation helpers live under scripts/codeclash_strategies/. They can download CodeClash viewer artifacts, extract runnable strategies, validate them, and run Elo selection:

bash scripts/codeclash_strategies/build_pool.sh --game BattleSnake --count 40

Relationship To CodeClash

RevengeBench started from CodeClash and still relies on CodeClash's arena and execution abstractions. The upstream CodeClash source is preserved as a submodule in vendor/codeclash; RevengeBench-specific code lives in src/revenge_bench so the benchmark can evolve without modifying the vendored upstream tree.

Layout

revenge-bench/
├── vendor/codeclash/          # Upstream CodeClash submodule
├── src/revenge_bench/         # RevengeBench package
│   ├── arenas/                # Release arena wrappers/extensions
│   ├── tournaments/           # Inverse-strategy, Forward-PvP, and BPI tournaments
│   ├── agents/                # LLM agent wrappers
│   ├── traces/                # Per-arena trace parsers
│   └── scripts/               # Importable pipeline utilities
├── configs/
│   ├── benchmark/             # Main model x arena configs
│   ├── conditions/            # Public optional conditions: no-probe, NL observation
│   ├── baselines/             # Public baselines, including BPI
│   ├── prompts/               # Runtime prompt templates
│   └── forward_pvp/           # Forward-PvP configs
├── data/targets/              # Target policy pools
├── scripts/                   # Runtime and evaluation entry points
│   └── codeclash_strategies/  # Optional target-pool generation tooling
├── tests/
└── main.py                    # Compatibility entry point

Citation

@article{rahmani2026revengebench,
  title={RevengeBench: Reverse Engineering Code-Space Policies from Behavioral Experiments},
  author={Rahmani, Babak and Dziadzio, Sebastian and Str{\"u}ber, Joschka and Hern{\'a}ndez-Guti{\'e}rrez, Sergio and Bethge, Matthias},
  journal={arXiv preprint arXiv:2606.26094},
  year={2026}
}

License

This repository is released under the MIT License. See LICENSE for details.

Metadata

Release files for revenge-bench 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for revenge-bench 0.1.1
File Size Uploaded
revenge_bench-0.1.1.tar.gz 2.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for revenge-bench 0.1.1
File Interpreter ABI Platform
revenge_bench-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 5.2 MB

Release files / revenge_bench-0.1.1.tar.gz

Download URL revenge_bench-0.1.1.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
7b7835a1eac134043d46ad8b624b6714107fdf8d0ca694859fbb9ff2162d2ff1
BLAKE2b-256 checksum
How to use checksums
a74c6291befac51c3f6da6eb8d3835af1c1ecb6efef5b89024ce4b540bc8237c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 8, 2026.

Transparency log

Release files / revenge_bench-0.1.1-py3-none-any.whl

Download URL revenge_bench-0.1.1-py3-none-any.whl
Size 2.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
55d2f4d372373453c3e6475337ef2a7854b014fc195a756450830a4c02ecbbc3
BLAKE2b-256 checksum
How to use checksums
106dcdab6f09b5af9d5d953bad1642e218d18e5c482fc77030a8ee7214238827
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page