Core War · no prior knowledge
2026-07-18 · 4 min read

A battle, narrated

AI notice: This text is created with the support of AI systems; it is reviewed editorially and taken responsibility for before publication.

You do not need to know anything about Core War to follow this. Everything you need is explained along the way.

What you are about to read is a real duel, recorded with the same engine that computes the rankings. Every number on this page comes from that one recording.

The arena

A memory of 8000 cells, closed into a ring: after the last cell comes the first again. Each cell holds one machine instruction.

One detail matters more than it sounds, and it decides this battle: the memory is not empty. Before the fight begins, every one of those 8000 cells holds the same instruction — one that kills any process running onto it. The battlefield is a minefield made entirely of mines.

The two programs are the only places where something else is written.

The contestants

At position 0 sits clrsrc, 83 cells long. A scanner: it searches the memory for deviations. Since empty core looks identical everywhere, any difference means somebody is there.

At position 5465 sits Fixed, 100 cells long. A stone, that is, a bomber: it does not search. It scatters lethal instructions at regular intervals throughout the memory and waits for the other one to walk into them.

Neither knows where the other is. They execute in turns, one instruction each.

The 8000-cell memory ring: clrsrc sits at position 0, Fixed at 5465. A marker at cell 5537 falls inside Fixed's range, 72 cells past its start.
The starting situation. The marked cell 5537 is overwritten on step 36 — it sits in the middle of the bomber's body.

Step 36

The scanner finds the bomber — after 36 steps. That is practically immediate; for comparison, this battle will run for over 80,000 steps.

It writes a lethal instruction into cell 5537.

Do the arithmetic: Fixed starts at 5465 and is 100 cells long, so it occupies 5465 through 5564. Cell 5537 is inside the bomber's own body — 72 cells past its start.

The scanner did not drop a bomb somewhere in memory. It replaced a line in its opponent's program with a lethal one. And then it moves on as if nothing had happened.

And then: nothing

The bomber does not notice. Why would it — the altered line sits in a part of its program it is not currently executing. It carries on, throws its bombs, searches for nothing, finds nothing.

The battle runs. And runs.

Along the way the bomber actually hits the scanner: of its 83 cells, only 57 remain intact at the end. So the scanner is steadily losing substance while its opponent keeps 98 of its 100 cells — practically undamaged.

By any sensible interim assessment, the bomber is winning.

Step 80,023

The bomber's execution reaches cell 5537.

It dies.

79,987 steps separate the setting of the trap from the moment it springs. The scanner had exactly one process left at that point — it survived on its last one.

Final state: 98 of 100 cells intact, and lost anyway. Because of a single line that was swapped out almost eighty thousand steps earlier.

What you just saw

Cause and effect lie far apart in Core War. This is where the game stops behaving like a duel. Anyone watching only who is landing hits right now will read the result wrong — the decisive move was made long before.

Destruction is not the goal, only a means. The bomber did more damage and lost. What matters is not how much of the opponent is left, but only whether it is still running.

A warrior does not die from being hit. It dies from running onto a lethal cell. The distinction sounds pedantic and is the core of the entire game: the weapon only works once the victim executes it itself.

And something invisible: of the 183 cells the two programs occupy, only 154 differ from empty memory. Roughly a sixth of a warrior looks like unused space to a scanner — and is therefore undetectable.

Read on

If you want to know how to write something like this: the learning path starts with a program that consists of a single line.

Your first warrior · step 1 of 5

If you want to know which strategies exist and which really beat which — measured across 349,866 battles:

The strategy classes


Recording: clrsrc versus Fixed, standard '94nop rules, core 8000, load position 5465. Recorded with rmars (commit b891921); all figures — cell numbers, step counts, surviving processes — come from that recording.


← Core War overview