COREWAR

/

RESOURCES & KNOWLEDGE BASE

Home to The Digital Organism Anatomy Field Guide, ICWS-94 virtual machine specifications, tactical engineering, and CoreWar archives.

FEATURED FIELD GUIDE // ALIFE & COMPUTER SCIENCE SERIES

🧬 The Digital Organism Anatomy — ALife Field Guide

An in-depth anatomical and computer science monograph series dissecting the five foundational digital organism species inhabiting the 8,000-cell Von Neumann memory torus—mapping every line of Redcode to its biological organelle glyph.

SPECIMEN 01 // MOVER▼

Imp (The Minimal Mobile Organism)

Mobilis simplicis — A.K. Dewdney (1984) • 1 line
▼MOV.I

Composed of a single instruction—"MOV.I 0, 1"—the Imp is the smallest autonomous organism in CoreWar. By copying itself one cell forward and stepping into its own replica on the next cycle, it marches endlessly around the 8,000-cell torus.

SPECIMEN 02 // STONE◆

Dwarf (The Classic Mod-4 Stone Bomber)

Petraeksito modularis — A.K. Dewdney (1984) • 4 lines
+ADD.AB▼MOV.I↺JMP.A■DAT.F

Anchored permanently within a compact 4-cell membrane, Dwarf extends an indirect pointer (@) like a stinging tentacle to hurl lethal DAT spore bombs (◆) into every 4th cell across the 8,000-cell core—the foundational ancestor of all Stone warriors.

SPECIMEN 03 // PAPER❖

Mice / Paper (Self-Replicating Swarm Organism)

Mitosis polyclonus — Chip Wendell (Mice) (1986 (1st ICWS Champion)) • 6 lines
▼MOV.AB / MOV.I↺JMN.B / JMP.A❖SPL.A+ADD.AB

Combining the mitotic SPL instruction (❖) with a high-speed dual pre-decrement transcription loop, Mice / Paper projects complete clones of its multi-line genome across memory—overwhelming stationary Stone bombers through exponential swarm growth.

SPECIMEN 04 // SCISSORS◉

Scanner / Scissors (Ocular Precision Predator)

Venator oculatus — ICWS Tactical Lineage (1986–1994) • 6 lines
+ADD.AB◉CMP.I (SEQ / SNE)▼MOV.I↺JMP.A■DAT.F

Unlike blind Stone bombers, the Scanner possesses an optical sensory organelle (◉ CMP / SEQ / SNE). It leaps across empty memory in 3-cycle saccades, unleashing lethal spores or SPL stun venom only the instant it detects foreign code.

SPECIMEN 05 // TRAP↺

Vampire & Imp-Gate (Parasitic Fang Trap & Grinder)

Insidiae vorax — Robert Martin / ICWS Lineage (1986–1994) • 8 lines
+ADD.F▼MOV.I↺JMP.A (Fang)❖SPL.A (The Pit + Gate)■DAT.F

Instead of killing enemies outright with DAT bombs, the Vampire casts calibrated JMP "Fangs" across memory. Any enemy PC that steps on a Fang is abducted into "The Pit"—an SPL 0 prison that hijacks the victim's process queue and enslaves its CPU cycles to power an Imp-Gate.

TECHNICAL GUIDE 01 // ICWS-94 ARCHITECTURE

Inside the MARS Virtual Machine & Redcode-94 Specification

The battlefield of CoreWar—known as the Core—is powered by a virtual processor called MARS (Memory Array Redcode Simulator). Under the standard ICWS-94 ruleset, the Core consists of 8,000 contiguous memory cells (addresses 0 through 7999). All arithmetic and pointer evaluations wrap around modulo 8,000, forming a seamless circular ring where address -1 maps to 7999.

Unlike conventional CPUs, every address in Redcode is strictly relative to the currently executing instruction (Program Counter). Because there are no absolute addresses, all Redcode programs are inherently Position-Independent Code (PIC)—meaning a warrior can copy itself anywhere in memory and continue running without relocation tables. Furthermore, ICWS-94 introduces seven instruction modifiers (.A, .B, .AB, .BA, .F, .X, .I), allowing programmers to target specific operand fields or copy entire instructions at once.

TECHNICAL GUIDE 02 // ADVANCED WARRIOR ENGINEERING

Advanced Tactical Engineering: Modulo Step Mathematics & Imp Spirals

When engineering a Stone bomber or a Scanner, choosing the optimal pointer step size is a mathematical art. In an 8,000-cell core, a naive step of 8 or 10 leaves wide gaps where small enemy loops can hide indefinitely. Competitive warriors use mathematically derived step constants (such as 2365, 3039, or 3359) that maximize worst-case coverage density across the core before repeating modulo cycles.

At the opposite end of the spectrum lies the Imp-Spiral (or Imp-Ring). While a standard 1-point Imp (MOV 0, 1) dies as soon as its lead instruction is bombed, a 3-point Imp-Spiral executes MOV.I 0, 2667 across three interleaved processes (since 2667 * 3 = 8001 ≡ 1 mod 8000). Because the three points continuously feed instructions to one another across the core, standard DAT bombers cannot kill them; defeating an Imp-Spiral requires a dedicated Imp-Gate (such as JMP 0, <-2) that shreds incoming instructions every single cycle.

COREWAR GLOSSARY // TERMINOLOGY

Essential CoreWar Terminology

Core / MARS
The shared circular memory array (standard 8,000 cells) and the virtual simulator that executes Redcode.
Process Queue (FIFO)
The First-In-First-Out task queue for each warrior. SPL spawns new tasks (up to 64); losing all tasks results in defeat.
DAT Bombing
Writing lethal DAT instructions across memory so that enemy processes execute them and terminate.
SPL Stun (スタン攻撃)
Overwriting enemy code with SPL 0 instead of DAT, flooding the opponent's task queue to paralyze their execution speed.
Core Clear (コアクリア)
An endgame routine that sequentially wipes the entire core with SPL and DAT bombs to finish off stunned or hiding enemies.
Decoy / Bootstrapping
Filling memory with dummy non-zero data to fool enemy scanners while copying the real warrior body to a clean location.
ACADEMY CURRICULUM // INTERACTIVE MISSIONS

All 30 Interactive Academy Steps

Step 1: The "STEP" Button That Advances TimeStep 2: Process Termination and Restoring with "RESET"Step 3: "Edit Mode" vs. "Running Mode"Step 4: The Three Rooms of a Memory Box (Changing B)Step 5: Modifying Both the Left Room (A) and Right Room (B)Step 6: Literal Numbers (#) vs. Relative Addresses ($)Step 7: Observing the "ADD" InstructionStep 8: Changing the Number to Add (A-Field)Step 9: Changing the Target Address (B-Field)Step 10: Using the Subtraction Instruction "SUB"Step 11: Copying an Entire Box with "MOV"Step 12: Looping Back in Time with "JMP"Step 13: Build Your First Program (Automatic Counter)Step 14: Why Does "DAT" Become a Bomb?Step 15: Copying Your Own Instruction (Code = Data)Step 16: Observation: Stepping Through "Imp", the Oldest Digital OrganismStep 17: Modifying the Imp (Copy Destination Experiment)Step 18: Understanding Indirect Addressing (@ Pointers)Step 19: Observation: Dissecting the "Dwarf" Bomber Step-by-StepStep 20: Modifying Dwarf (Changing the Bombing Interval)Step 21: First Combat: Tune Your Bomb Interval to Destroy the TargetStep 22: Observation: The "SPL" Split Instruction and MitosisStep 23: Finding Enemies with Conditional Skip "SEQ / CMP"Step 24: Stopping an Imp with a Pre-Decrement "Imp-Gate"Step 25: [Stone] High-Speed Bomber and Step Size TuningStep 26: [Paper] Observing the Self-Replicating Swarm "Mice"Step 27: [Modifying Paper] Tune Clone Dispersal Distance to Overwhelm StoneStep 28: [Scissors] Tuning Scanner Stride to Shred PaperStep 29: [Trap] Abducting Enemy Processes with "Vampire"Step 30: Graduation Exam: Tune Your Warrior and Win the Final Battle
COMMUNITY & COMPETITIVE HILLS

corewar.co.uk

The largest online CoreWar community. Contains warrior archives, KOTH (King of the Hill) competitions, forums, and extensive documentation.

VISIT →

KOTH (King of the Hill)

Submit your warrior to the online KOTH server and see how it ranks against warriors from around the world. The ultimate test of your Redcode skills.

VISIT →
SIMULATORS & TOOLS

pMARS

The reference Redcode simulator. pMARS (portable Memory Array Redcode Simulator) is the standard tool used by the CoreWar community for testing and competing.

VISIT →

CoreWar IDE (vivariums.net)

You are here! Our browser-based IDE provides an interactive environment for writing, testing, and visualizing Redcode warriors.

OPEN →
EXTERNAL REFERENCES & ARCHIVES

Redcode-94 Specification

The official Redcode language specification from 1994. This is the definitive reference for all instruction behaviors, addressing modes, and modifiers.

VISIT →

The Beginner's Guide to Redcode

A comprehensive tutorial covering the basics of Redcode programming. Perfect for those who have completed our Academy and want to go deeper.

VISIT →

Original Scientific American Article (1984)

A.K. Dewdney's original article that introduced CoreWar to the world. This is where it all began.

VISIT →