RevengeBench: Reverse Engineering Code-Space Policies from Behavioral Experiments
Abstract
Interaction in the wild often requires anticipating the behavior of an agent whose implementation is hidden. Querying these agents at will is typically impossible. Instead, they can only be observed and probed by acting in the shared environment. We study this behavioral modeling problem in game arenas, where both the hidden agent and the learner's model are executable programs. This gives controllable ground truth behavior and lets us vary the learner's access from passive observation to active intervention. We ask: how good can an LLM agent analyze data to write a program that reproduces a hidden policy's behavior? Does designing its own experiments help? To provide insights into these questions, we introduce RevengeBench, a benchmark of 75 Elo-calibrated target policies selected from CodeClash tournaments across five game arenas. The learner observes the target play against sampled opponents, can probe it by writing custom opponent policies to collect targeted gameplay, and submits an executable hypothesis. Reconstructed policies are scored by action-level agreement with the target on held-out trajectories. Across twelve frontier LLMs, learners close 34-72% of the behavioral gap between a naive starter policy and the target. Passive observation alone is already competitive, while self-designed probes yield modest, model-dependent gains. The recovered code is also actionable: challengers given access write stronger counter-strategies than blind ones. In summary, RevengeBench provides a controlled testbed for the behavioral modeling of opaque agents.