Preprint
Large Language Models

Adversarial Program Evolution with LLMs

Akarsh Kumar, Ryan Bahlous-Boldi, Prafull Sharma, Phillip Isola, Sebastian Risi, Yujin Tang, David Ha
January 6, 2026Annual Conference on Genetic and Evolutionary Computation7 citations

7

Citations

1

Influential Citations

Annual Conference on Genetic and Evolutionary Computation

Venue

2026

Year

Abstract

Large language models (LLMs) are increasingly used to evolve solutions to problems. However, most LLM-evolution frameworks solve static optimization problems, overlooking the open-ended adversarial dynamics that characterize real-world evolutionary processes. Here, we study Digital Red Queen (DRQ), a simple self-play algorithm that embraces these "Red Queen" dynamics via a changing objective. DRQ uses an LLM to evolve assembly programs (warriors) which compete for control of a virtual machine in the game of Core War, a Turing-complete environment studied in artificial life and connected to cybersecurity. In each round of DRQ, the model evolves a new warrior to defeat all previous ones. Over many rounds, warriors become increasingly general (relative to a set of held-out human warriors). Interestingly, across independent runs, we observe a convergence pressure toward a single generalpurpose behavioral strategy, much like convergent evolution in nature. Our work positions Core War as a rich, controllable sandbox for studying adversarial adaptation in artificial systems and for evaluating LLM-based evolution methods. More broadly, the simplicity and effectiveness of DRQ suggest that similarly minimal self-play approaches could prove useful in practical multi-agent adversarial domains, like real-world cybersecurity or combating drug resistance. Website: https://pub.sakana.ai/drq Code: https://github.com/SakanaAI/drq

Analysis

Why This Paper Matters

This paper addresses a critical gap in LLM-based evolutionary computation: most frameworks solve static optimization problems, whereas real-world evolution is characterized by open-ended, adversarial dynamics. By introducing Digital Red Queen (DRQ), the authors demonstrate a minimal self-play algorithm that leverages LLMs to evolve programs in a Turing-complete environment (Core War) with a constantly changing objective. This is significant because it moves beyond static benchmarks and explores how LLMs can drive open-ended evolution, which is more aligned with natural evolution and practical adversarial scenarios.

The choice of Core War is particularly insightful. It is a well-established artificial life environment with a rich history and direct connections to cybersecurity, as programs compete for control of a virtual machine. This provides a controllable yet complex sandbox for studying adversarial adaptation. The paper's observation of convergent evolution across independent runs—where different runs converge to similar general strategies—mirrors natural convergent evolution and suggests that the dynamics of LLM-based self-play may have universal properties worth investigating.

Technical Contributions

  • Digital Red Queen (DRQ) Algorithm: A simple self-play loop where an LLM evolves a new warrior to defeat all previous ones, creating a Red Queen dynamics with a changing objective.
  • Use of Core War: Leverages a Turing-complete environment that is both rich and controllable, enabling the study of adversarial adaptation in a concrete setting.
  • Generalization Measurement: Evaluates evolved warriors against held-out human warriors to measure generality, showing that strategies become more robust over rounds.
  • Convergence Analysis: Documents the emergence of a single general-purpose behavioral strategy across independent runs, highlighting a form of convergent evolution.
  • Open-Source Implementation: Provides code and website for reproducibility and further research.

Results

The paper reports that warriors evolved by DRQ become increasingly general relative to a set of held-out human warriors. This indicates that the self-play process not only improves performance against previous opponents but also transfers to unseen human-designed strategies. Interestingly, across independent runs, the algorithm consistently converges toward a single general-purpose behavioral strategy, suggesting that the evolutionary dynamics are robust and lead to a stable solution. While specific numerical metrics are not provided in the abstract, the qualitative findings are compelling and suggest that minimal self-play can yield effective and general strategies.

Significance

The broader impact of this work is twofold. First, it establishes Core War as a valuable benchmark for evaluating LLM-based evolution methods and studying adversarial adaptation in artificial systems. Second, the simplicity and effectiveness of DRQ imply that similar minimal self-play approaches could be applied to practical multi-agent adversarial domains, such as real-world cybersecurity or combating drug resistance. This opens up new avenues for using LLMs in open-ended problem solving, where objectives are not fixed but evolve in response to adversarial pressures. The convergence phenomenon also raises interesting questions about the nature of strategies that emerge from such processes and their potential optimality in adversarial settings.