Digital Red Queen: Adversarial Program Evolution in Core War with LLMs

sakana.ai

122 points by hardmaru a day ago


GuB-42 - a day ago

Using evolution in the context of Core War is not a new idea by far, it is even referenced in the paper.

Examples here: https://corewar.co.uk/evolving.htm

The difference here is that instead of using a typical genetic algorithm written in a programming language, it uses LLM prompts to do the same thing.

I wonder if the authors tried some of the existing "evolvers" to compare to what the LLM gave out.

robotguy - 3 hours ago

I was under the impression that Core War was pretty much a solved problem with multiple optimal warrior types in a rock-paper-scissors circular dominance. I have been somewhat interested in Core War for decades now, but I admit I haven't done any real deep dives into the history/evolution of the game. Does anyone have any suggested reading on how Core Warriors have progressed over the years and what the current status is? I follow /r/corewar but it seems pretty dead.

I am currently working on my own ALife simulation partly because of my (possibly mistaken) belief that progress on Core War had dead-ended. Discovering that there may still be more to do in this realm with Core War probably won't stop me working on my project, but I'd be interested to hear what is still going on.

JKCalhoun - 18 hours ago

What a lovely period of time that was—when "Computer Recreations" ran monthly in Scientific American. I read the column every month and was fascinated to learn about Eliza, Core Wars, Conway's Life, Wa-Tor, etc. It was a time when you coded simply for the fun of it—to explore, learn.

I know you can still do that today, but… something has changed. I don't know what it is. (Maybe I changed.)

Anyway, I was unable to track down PDF versions of the original articles, but, for the curious and newcomers to Core Wars, they're transcribed here:

https://corewar.co.uk/dewdney/

hardmaru - a day ago

Hi HN,

I am one of the authors from Sakana AI and MIT. We just released this paper where we hooked up LLMs to the classic 1984 programming game Core War. For those who haven't played it, Core War involves writing assembly programs in a language called Redcode that battle for control of a virtual computer's memory. You win by crashing the opponent's process while keeping yours running. It is a Turing-complete environment where code and data share the same address space, which leads to some very chaotic self-modifying code dynamics.

We did not just ask the model to write winning code from scratch. Instead, we treated the LLM as a mutation operator within a quality-diversity algorithm called MAP-Elites. The system runs an adversarial evolutionary loop where new warriors are continually evolved to defeat the champions of all previous rounds. We call this Digital Red Queen because it mimics the biological hypothesis that species must continually adapt just to survive against changing competitors.

The most interesting result for us was observing convergent evolution. We ran independent experiments starting from completely different random seeds, yet the populations consistently gravitated toward similar behavioral phenotypes, specifically regarding memory coverage and thread spawning. It mirrors how biological species independently evolve similar traits like eyes to solve similar problems. We also found that this training loop produced generalist warriors that were robust even against human-written strategies they had never encountered during training.

We think Core War is an under-utilized sandbox for studying these kinds of adversarial dynamics. It lets us simulate how automated systems might eventually compete for computational resources in the real world, but in a totally isolated environment. The simulation code and the prompts we used are open source on GitHub.

Other info other than the blog link:

Paper (website): https://pub.sakana.ai/drq/

Arxiv: https://arxiv.org/abs/2601.03335

Code: https://github.com/SakanaAI/drq

pkhuong - 21 hours ago

How does the output fare on competitive hills like https://sal.discontinuity.info/hill.php?key=94t ?

AFAIK, the best results so far for fully computer-generated warriors have been on the nano and tiny format (https://sal.discontinuity.info/hill.php?key=nano, https://sal.discontinuity.info/hill.php?key=tiny), with much shorter warriors (at most 5 or 20 instructions).

rao-v - 16 hours ago

The idea of what LLMs could do in CoreWars has been hanging around in the back of my head for a while now. So happy to see someone explore it systematically