Core War
AI notice: This text is created with the support of AI systems; it is reviewed editorially and taken responsibility for before publication.
Two programs are loaded at random positions into the same memory. They run in turns, and every instruction can overwrite any cell — the opponent's, and their own. Whoever is still running at the end wins.
That is the whole game. Out of it, forty years have produced a discipline where single constants decide rankings and where the top programs are a hundred lines long.
A. K. Dewdney introduced Core War in Scientific American in 1984. It is still played today, on servers that have been running since the early nineties.
Quick access
A battle, narrated
A real Core War duel step by step
The Arena
Two programs, one memory, one battle
Who beats whom
Over a million computed battles between 1104 warriors spanning three decades
Understanding Redcode
The anatomy of a Redcode instruction, the opcodes, the addressing modes
The strategy classes
Stone, paper, scanner and the other basic forms
Glossary
The vocabulary of Core War
Why it is interesting
Core War is not a simulation of anything. It is a closed system with very few rules that nevertheless contains everything that makes complex systems interesting: strategy classes that beat each other in a rock-paper-scissors pattern, an arms race spanning decades, and questions you can only answer by measuring, because thinking about them is not enough.
An example: for thirty years the scene has said scanner beats paper, paper beats stone, stone beats scanner. We checked it against 349,866 computed battles. Exactly one of the three statements holds.
Where do you want to start?
Just show me something
You want to see what this is about before reading anything? A real battle, told step by step — including a trap set at step 36 that springs almost 80,000 steps later.
A battle, narrated · 4 minutes, no prior knowledge
Show me something I can poke at
The same door, only interactive: two programs, one memory, and you set them against each other. You can pause the battle, rewind it, edit the source and run it again — computed in your browser, with the same engine that runs on the hill.
The Arena · right away, no prior knowledge
I want to learn this
Five steps from a one-line program to your own submission on a public server. Every example runs; every number has been measured.
Your first warrior · step 1 of 5
I know my way around
The complete instruction set, all addressing modes and modifiers, the strategy classes with measured matchups, tools, hills and a glossary.
To the reference
What makes this site different
Core War knowledge has been passed down by word of mouth for decades. Much of it is correct. Some of it was correct once and has quietly gone stale — the field moved out from under the rule and nobody noticed.
So we took a different approach: where a number appears here, it has been computed. The basis is an archive of more than 1100 warriors spanning three decades, and a simulator engine built to answer questions nobody else is asking.
A few of the results:
- The classic rock-paper-scissors triangle now holds on only one of its three edges.
- Four out of five real development steps on a warrior are too small to demonstrate with any practical number of rounds.
- Testing against a single opponent does not get better with more rounds — it gets worse. You converge ever more reliably on the wrong answer.
- Two characters in the source separate a warrior that survives three quarters of its fights from one that loses every single round.
Every example on these pages has been checked against the engine. Where something is only a sketch, it says so. Where we got it wrong, that says so too.
You can search the underlying data yourself: over a million computed battles between 1104 warriors spanning three decades, every single pairing available to look up.
→ Who beats whom — the data behind every number here
And where this comes from
These pages are a by-product of a project that started in March 2026 at rank 654 and by July held first place in all three standings of the historic 94nop Koenigstuhl hill.
→ Three crowns on the Koenigstuhl — how that went → About this project — tools, methods, and what did not work
Learning path
-
Your first warrior
How two programs fight in the memory of a virtual machine — and what your own first program looks like, the one that survives in there.
-
Understanding Redcode
The anatomy of a Redcode instruction, the opcodes, the addressing modes — and why the suffix after the dot matters more than the instruction in front of it.
-
The strategy classes
Stone, paper, scanner and the other basic forms — and what 349,866 computed battles say about which really beats which.
-
Testing your own ideas
You changed something — did it get better? What 1.17 million computed rounds say about how much measurement it takes to answer that honestly.
-
Onto a hill
How the public rankings work, how to submit a warrior — and which formatting mistakes kill a submission before it is ever computed.
Reference
-
Instruction set
All 16 Redcode opcodes in detail — what they do, which modifiers matter for them, and how they are used in real warriors.
-
Addressing modes
The eight Redcode addressing modes — how they compute an address, which side effects they trigger, and in what order that happens.
-
Modifiers
The seven Redcode modifiers and their exact effect — which fields an instruction reads and writes, and why the modifier determines semantics more than the opcode does.
-
Standards and rule sets
ICWS'88, ICWS'94 and '94nop — what differs between the standards, which settings the hills use, and what p-space is.
-
Strategy encyclopaedia
The strategy classes in detail — construction, strengths, weaknesses and measured matchups from 349,866 computed pairings.
-
Tools and engines
Simulators, optimisers, number tools and evolvers — what Core War authors actually work with, from hand-tuning to AI assistance.
-
Hills and community
Where to play and where to find people — the active king-of-the-hill servers, the scene's gathering places, and the Hall of Fame.
-
Glossary
The vocabulary of Core War — from addressing mode to warrior, briefly explained with pointers into the reference.