Imagine a world where programs fight for survival inside a small virtual computer. That is the core of research by the Japanese company Sakana AI, called Digital Red Queen. This project uses large language models (LLMs) to create and evolve programs that destroy one another in a game called Core War. The goal is to explore how artificial intelligence can adapt in a hostile environment, much like organisms do in nature. The researchers want to understand the dynamics of competition between AI systems, which could help in areas such as cybersecurity. They are collaborating with MIT and sharing their findings in a technical report on arXiv.
How does Core War work?
Core War is a competitive programming game created in 1984. In it, programs called "warriors" fight for control of the shared memory of a virtual computer known as the "Core." Each warrior is written in Redcode, a special assembly language. The game works by having programs take turns executing instructions, one at a time. A warrior's task is to stay alive while "crashing" its opponents by writing invalid instructions, such as DAT, into their memory. Interestingly, Core War makes no distinction between code and data—programs can modify themselves or even their opponents during combat. This enables tricks such as self-replication or on-the-fly modification, but it also creates a chaotic environment full of instability. The game is Turing-complete, meaning that strategies of arbitrary complexity can theoretically be created within it. People have devised clever tactics such as bombing random memory locations, self-replication, or scanning the Core for enemies. Core War serves as a testing ground for programmers experimenting with how their code behaves in competition, and Sakana AI is now using it to simulate evolutionary processes with AI.
The Red Queen concept
The Red Queen hypothesis comes from evolutionary biology and is inspired by Lewis Carroll's book "Through the Looking-Glass," in which the Red Queen tells Alice: "Now, here, you see, it takes all the running you can do, to keep in the same place." This concept means that species in nature must constantly evolve merely to survive against their competitors, which are also changing. It is not about improving, but about maintaining their position in a changing world. We see this in nature among viruses, bacteria, and animals that adapt to new threats. In this research, Sakana AI applies this idea to the digital world: the Digital Red Queen (DRQ) algorithm forces programs to evolve continuously against increasingly powerful opponents, simulating this arms race in artificial intelligence.
How does it all work?
Sakana AI's DRQ algorithm starts with one warrior and then creates another designed to defeat it. A third warrior must defeat the first two, and so on. Each new warrior adapts to the environment created by all its predecessors, mimicking constant change in nature. DRQ is nothing new—it is a simple version of older methods such as multi-agent self-play, adapted for Core War. Large language models (LLMs) generate these warriors, leading to the discovery of strategies such as targeted bombing, self-replication, or massive multithreading. Examples from the research include warriors such as Ring Warrior Enhanced v9 and Spiral Bomber Optimized v22, whose code comments were generated by the LLMs themselves. Everything takes place in a secure sandbox from which nothing can escape, because the programs run on an artificial machine using an artificial language.
So what did the researchers find?
With more rounds of DRQ, the warriors become more robust, as measured by their success rate against human-designed warriors that the algorithm has never seen. This makes it possible to create better programs without directly training them on test data. Surprisingly, different DRQ runs, each with a different starting warrior, converge toward similar behaviors over time—not at the source-code level, but in how they function. This resembles convergent evolution in biology, where similar traits evolve independently, such as wings in birds and bats or venom in spiders and snakes. Sakana AI's researchers found that these Red Queen dynamics lead to the discovery of more general strategies and suggest how AI systems might evolve in the real world. This could help with automated system testing before deployment or with simulations for artificial life, biology, drug design, cybersecurity, or market ecosystems. The research highlights that even simple self-play loops reveal complex tactics and proposes future expansion into the parallel coevolution of large populations.



