A side project that has nothing to do with radio - but everything to do with another
old passion: programming. It's about **Core War**, one of the oldest programming games in the
world, and the journey to reach the very top together with AI. The result up front: since
**14 July 2026**, three of our warriors hold **all three crowns** of the historic 94nop
King of the Hill. It all started back in March - at rank 654.
What is Core War? #
Core War was introduced in 1984 by A. K. Dewdney in his Scientific American column. Small programs - called warriors - battle each other in the memory of a virtual computer.
The arena is the "core": a ring-shaped memory of 8000 cells. Both programs are loaded at random
positions and execute instructions in turns. The goal is to crash all of the opponent's
processes - whoever is left standing wins the round.
Warriors are written in Redcode, an assembly language with only a handful of instructions but enormous tactical depth. Over the decades the community has developed an
ecosystem of strategies resembling rock-paper-scissors: **bombers** ("stone") blindly scatter
traps through memory, **replicators** ("paper") copy themselves faster than they can be
destroyed, and **scanners** hunt the opponent down and then strike precisely. Add to that
quickscanners for the first microseconds of the fight, imps, decoys and much more. Modern
top-tier warriors are hybrids whose components have co-evolved over years.
Play happens on hills: ongoing online leaderboards where each new warrior faces all the existing ones. Our target was Christoph Birk's 94nop King of the Hill - an "eternal" hill following the ICWS'94 standard, with more than 1100 warriors from over three decades of Core War history. At its top sat, for a long time, Azathoth by John Metcalf, one of the best-known authors in the scene.
The King of the Hill - and a thank-you #
None of this would have been possible without this place: a hill where today's programs can measure themselves against three decades of warrior craft, maintained for decades and open to new submissions. A heartfelt thank-you for that to Christoph Birk - this piece is also a small bow to that dedication. 73 de DM2TIM.
Three crowns (as of 14 July 2026) #
Arvon👑
Rank 1 · recursive
Kaitain👑
Rank 1 · +0.49 ahead of King Cobra
Kaitain👑
Rank 1 · ahead of Arvon (rank 2)
Four instances, one bus #
Behind the three crowns is not a single program but a team of four AI instances that
cooperate over the same file-based message bus ("pf") - each with its own project and role:
corewars
The warrior forge: development, optimisation and submission of the warriors, plus analytics and external benchmarks.
koth
Its own hill server (FastAPI + SQLite): accepts warriors, runs all the battles through the engine and publishes the rankings - three hills in parallel.
pmars
The engine rmars: a Rust rebuild of the pMARS 0.9.6 simulator, bit-identical to the original, with an in-process Python API and analysis instrumentation.
vserver
Infrastructure and operations: runs and hardens the servers that host the hill server and the distributed computing.
The journey to the crown #
| King of the Hill rank per submission - text version of the chart | ||
|---|---|---|
| Warrior | Date | Rank |
| --- | --- | --- |
| Carbonite | 05 Mar 2026 | 654 |
| clrsrc | 09 Jul 2026 | 24 |
| pst_v3 | 10 Jul 2026 | 2 |
| pst_v4 | 11 Jul 2026 | 2 |
| Arvon | 12 Jul 2026 | 1 - King of the Hill crown |
| Kaitain | 13 Jul 2026 | 7 - TOP-50 and Battle Royale crowns |
February/March 2026 - Generation 1: evolution. The first approach was a classic
evolutionary system: populations of warriors, mutation, selection through Swiss-system
tournaments. The result was both sobering and instructive - the first hill submission (Carbonite)
landed at **rank 654**. Blind evolution simply can't get a foothold in a 40-year-old, highly
optimised ecosystem.
Early July 2026 - Generation 3: "architect, not generator". The restart flipped the
approach: instead of breeding warriors, proven architectures are understood, rebuilt and
optimised in a data-driven way - directly against a local snapshot of the complete hill with
deterministic, reproducible measurements. The first scanner built this way (clrsrc) reached
**rank 24**.
10 July - class change and breakthrough. Loss analysis showed that the scanner class
hits a structural ceiling against the hill's flood of paper. So: a class change to paper/stone.
The key was in the launcher of the top warrior Azathoth - an ingenious parallel boot mechanism
that we traced instruction by instruction in the debugger and rebuilt with our own constants.
pst_v3 reached **rank 2** - just 0.85 points behind Azathoth.
11 July - science instead of guessing. Intuition was no longer enough to close the
remaining gap. We built a coverage model of the quickscanner: millions of recorded memory states,
an inverted index over 25 million occupancy cells, fit/holdout validation. The model found a new
basin of constants and then proved mathematically that it had reached the optimum of this scan
structure. Bomb, boot geometry and paper were measured through in the same way - every channel
maxed out. The remaining gap had to lie in the one component we hadn't copied: Azathoth's decode
structure.
12 July - rebuilding the decode, and the first crown. With new instrumentation
(execution counters, write logs, single-round traces) we took both quickscanners apart
forensically: hit rate and precision were identical - the entire difference lay in the
**latency** between finding the enemy and the first bomb. Azathoth's trick: a multiplicative
number lattice in which a single multiplication reconstructs the exact location of the hit. We
derived the lattice algebra in full, built a generator for our own lattice parameters,
automatically checked every variant for bit-exact decode correctness and benched the field against
the full hill. The result - **Arvon**, named after one of the moons of Arrakis - took
**rank 1** on the King of the Hill. The first crown.
13/14 July - two more crowns. Finally, Kaitain fused the robust oneshot body of
King Cobra (inversed) with Arvon's lattice front-end. On the big King of the Hill that is good for
rank 7 - but on the hill's two other rankings, the **TOP-50** and the **Battle Royale**, it
is good for **rank 1**. With that, three of our warriors hold all three crowns of the King of
the Hill.
Tools and methods #
- **Custom engine (rmars):** a complete rebuild of the
simulator in Rust - bit-identical to the original (verified against a frozen regression corpus
and 1355 warriors), but with an in-process Python API, heavy parallelism and statistical
early stopping. A full benchmark against 1101 opponents over 200 rounds now takes**3.5 seconds** - it used to take many minutes.
- Instrumentation on demand: the engine grew, on a daily rhythm, exactly the measurement channels the analysis needed at that moment - heatmaps, kill attribution, memory snapshots, position replays and full single-round traces. All opt-in and free for the fast path.
- **Data-driven models:** coverage models over
ground-truth memory data instead of gut feeling; fit/holdout separation against overfitting;
deterministic position series so every measurement is exactly reproducible.
- Reverse engineering: opponent mechanics are decoded by trace, instruction by instruction, formalised as algebra and then reconstructed with our own parameters - never blindly copied, always with attribution.
- Distributed computing: because the results are
bit-identical, the full field (over 640,000 pairings) could be distributed across several
machines in a trivially verifiable way - sampling instead of redundancy voting.
Lessons learned #
- Tuning on short measurement series (200 rounds) always overfits - select only from 500+ rounds, confirm with fresh rounds.
- Your own hill entries cannibalise each other's points; projections have to account for that.
- Performance tuning is microarchitecture-dependent, never extrapolate - what is faster on one CPU can be slower on the next. Measure per target platform.
All warriors were submitted with full attribution of the models studied (in particular Azathoth by John Metcalf and King Cobra / Eternal Exile by inversed). Thanks to Christoph Birk for running the King of the Hill.