LLM-Evolved Core War Programs: A Game of Thrones, Turing Edition

LLMs embedded in an evolutionary loop evolve Core War programs, turning exponential search into linear search.
Akarsh Kumar combines the classic programming game Core War with large language models to explore whether an open-ended evolutionary arms race can emerge. Zero-shot Redcode generation proves nearly useless, but embedding LLMs in a generate-verify-retain-search loop dramatically improves results. The core insight: retaining solved sub-problems and continuing to search for the rest collapses exponential solution-space search into an approximately linear problem. Core War — with its clear win/loss conditions and infinite strategy space — serves as an ideal sandbox for studying open-ended evolution, and the "LLM as mutation operator + verifier as selection pressure" paradigm is becoming a compelling new direction in AI research.
When LLMs Meet Core War: A Battle for Code Survival
Core War is a long-standing programming game where players write programs in a low-level assembly language called Redcode, pitting them against each other inside a shared virtual memory space. The goal is brutal and simple — crash your opponent's program. Researcher Akarsh Kumar recently revisited this classic concept in a conversation with a host, with one key twist: instead of humans writing the programs, large language models (LLMs) do.
"Evolution is anything but random," Kumar stated upfront, establishing his central thesis. The question he set out to explore: what happens if you let LLMs evolve a population of competing small assembly programs? Can this give rise to an open-ended evolutionary arms race?

Under Core War's rules, a program defeats its opponent by injecting an illegal instruction ahead of the opponent's execution thread. When the opponent's thread reaches that invalid operation, it halts and crashes. The host aptly described this fight-to-the-death dynamic as "Game of Thrones: Turing Edition" — a characterization Kumar happily embraced.
Core War was popularized by A.K. Dewdney in 1984 through his Scientific American column, and later gave rise to a standardized virtual machine spec called MARS (Memory Array Redcode Simulator). The game's virtual memory is a circular address space (typically 8,000 cells), with two or more programs randomly placed within it and executed simultaneously. Redcode's instruction set is extremely minimal, but includes one critical operation — DAT (data). Any thread that executes a DAT instruction immediately terminates. This is why the classic offensive strategy known as the "bomber" uses a loop to scatter DAT instructions across memory, while the defensive "imp" is an ultra-minimal single-instruction program that constantly copies itself forward. The complex adversarial strategies that emerge from these simple rules are why Core War has endured for decades in the programming community — and why it makes such a natural laboratory for studying emergent behavior.
Open-Ended Evolution: From Code Combat to Arms Race
The most compelling aspect of this experiment is its pursuit of open-ended evolution. Unlike optimization tasks that converge toward a single best solution, the adversarial environment of Core War has a natural, self-sustaining tension — every time a program finds a new way to attack, its opponent gains incentive to evolve a counter-strategy, driving an escalating loop of innovation.

This arms-race dynamic is one of the most generative forces in biological evolution. What Kumar wanted to test was whether LLMs could serve as an engine for mutation and recombination, powering a creative process that never stops. This touches on a deep question in AI research: open-endedness — can a system continuously produce novel, meaningful outputs rather than stagnating at a local optimum?
Open-endedness is one of the core unsolved problems in Artificial Life. Traditional evolutionary algorithms tend to converge — once a population finds a good-enough solution, diversity drops and evolution stalls. Kenneth Stanley's NEAT algorithm and his subsequent "novelty search" theory argue that optimizing purely for objective fitness can actually impede exploration; rewarding novelty itself sometimes leads further. A truly open-ended system must continuously generate novel structures, where new structures scaffold the emergence of higher-level complexity, with no obvious convergence endpoint. The Cambrian Explosion is nature's most famous example. In the AI context, open-ended learning is seen as a potential pathway toward general intelligence, and Core War's arms-race structure — where each side's progress creates new selection pressure for the other — naturally fits this framework.
LLM's Weak Spot: Zero-Shot Redcode Writing Nearly Fails
The experiment surfaced a critical and realistic finding: LLMs are simply not good at writing Redcode.

"If you just try to zero-shot this language, it's terrible," Kumar said bluntly. Redcode is a niche, counter-intuitive assembly language with virtually no presence in training data, which leaves LLMs struggling to directly generate valid, competitive code. This result isn't surprising — it confirms the limits of LLMs operating outside their training distribution in obscure domains.
But the story doesn't end there. The real breakthrough came from placing LLMs inside an evolutionary loop with a built-in verification mechanism.
Verifier + Evolution: Turning Exponential Search Into Linear Search
Kumar's solution was to combine evolution with a verifier. When LLMs are no longer tasked with generating complete answers in one shot, but instead embedded in an iterative "generate → verify → retain → search again" loop, the results were, in his words, "quite good."

The key insight is a shift in search complexity. Kumar explained: once you've solved one part of a hard problem, you hold onto that part and keep searching for the rest. Through this approach, "you can turn an exponential search problem into a linear search problem."
This cuts to the heart of combining evolutionary algorithms with LLMs. Relying on a one-shot LLM output means facing an exponential combinatorial explosion across the full solution space. But by using a verifier to identify and retain partially correct intermediate results, you decompose the large problem into smaller, incrementally solvable sub-problems. Each successful partial solution becomes a solid foundation for the next round of search, collapsing the cost from exponential to approximately linear. This is precisely the fundamental advantage evolutionary strategies hold over pure random search — selectively preserving useful mutations.
The "generate → verify → retain → search again" loop Kumar describes is structurally similar to several recently prominent AI paradigms. First, it mirrors the "generate-and-verify" framework used in systems like AlphaCode and AlphaProof: LLMs sample a large number of candidate solutions, and an external executor or proof checker acts as a verifier, filtering only those that pass before the next round begins. Second, it echoes the "Process Reward Model (PRM)" approach: rather than only rewarding the final correct answer, intermediate steps in the solution process are also scored, enabling more efficient navigation through the solution space. Kumar's notion of "hanging on to the solved parts" is fundamentally a form of scaffolded accumulation — the same principle underlying the Schema Theorem in genetic algorithms, where short, high-fitness sub-patterns (schemata) spread exponentially through a population. LLMs, in this framing, serve as flexible operators for generating variants of those sub-patterns.
What This Experiment Means
Despite being drawn from a brief interview, this work sketches out a genuinely thought-provoking research paradigm. LLMs struggle on their own in unfamiliar domains, but when embedded as a component within an evolutionary system backed by concrete verification feedback, the system's overall capability undergoes a qualitative shift. This combination — LLMs as mutation operators plus verifiers as selection pressure — is emerging as a noteworthy direction in contemporary AI research.
Core War's adversarial sandbox offers an ideal testbed for studying open-ended evolution. It provides a clear win/loss condition (a natural verifier) alongside an infinite strategy space (sustaining a continuous arms race). Whether such a setup can truly give rise to an open-ended, never-converging creative process is the open question this line of experiments leaves us with.
Since this content comes from a brief interview, many technical details — the specific evolutionary algorithm used, the scale of experiments, the types of strategies that ultimately emerged — remain unexplored, awaiting a full research publication to fill in the picture.
Related articles

Felix Rieseberg Personal Homepage
Felix Rieseberg's personal homepage sparks attention on Hacker News. This article covers the Slack engineer's technical background, the rise and fall of nativefier, and the value of a developer homepage as a tech calling card.

@ai-sdk/vue 3.0.306 Patch Release Syncs with [email protected] Update
@ai-sdk/vue 3.0.306 released, synced with [email protected]. A routine patch release for the Vercel AI SDK ecosystem with no public API changes; the Vue adapter layer stays version-aligned with the core package.

Gemini 4 Argon API Launches: The Era of Million-Token Output Begins
Google launches Gemini 4 Argon with sparse MoE architecture, up to 1M output tokens, and a 68.90% Vals Index score, available across API, AI Studio, and the Gemini app.