Core War — Linked Overview

Core War — Linked Overview

Core War — Linked Overview

Concise primer with live links, mechanics, runnable samples, and strategy hooks.

Sharpened blurb (with links)

Core War (1984) is a programming battle where players write assembly-like “warriors” in Redcode that execute on a virtual CPU called MARS (Memory Array Redcode Simulator). Warriors share a circular memory (“core”) and try to kill the opponent by forcing its processes to execute DAT. Classic archetypes include bombers, replicators/papers, and imps; you’ll also see scanners, stones, and hybrids. Many people test with the community simulator pMARS. The strategy space—timing, stride math, decoys, and process scheduling—makes Core War a deep algorithmic game.

Note: “imps,” not “impulses.”

Key mechanics (one level deeper)

  • Core: circular memory; addressing wraps around (mod arithmetic matters).
  • Process model: round-robin; SPL forks new processes. A warrior dies when it has no processes left.
  • Win condition: last warrior with any live process wins; max-cycle draws are possible.
  • Bread-and-butter ops: MOV ADD SUB MUL DIV MOD JMP JMZ JMN DJN CMP/SNE SLT SPL DAT. Addressing includes immediate #, direct (default), and indirect / pre- / post-indexed modes (@ < > in ’94). Instruction modifiers like .A .B .F .X .I define which fields are affected. See the Redcode reference and ICWS ’94 draft.

Tiny, runnable examples (ICWS ’88-style syntax)

Imp (ever-marcher)

;name Imp
        ORG     imp
imp     MOV     0, 1

Dwarf (classic bomber)

;name Dwarf
        ORG     start
start   ADD     #4, 3
        MOV     2, @2
        JMP     -2
        DAT     0, 0

Why it works: ADD advances the bombing pointer; @2 uses it indirectly. Choosing a stride relatively prime to the core size maximizes coverage (see Dwarf analyses).

Strategy hooks you can explore

  • Stride design and coverage math for bombers (Dwarf lineage).
  • Process economy: heavy SPL trees vs. minimalist stones/imps.
  • Scanners & oneshots: probe first, then slam (great primer: Anatomy of the Scanner).
  • Imp tech: rings/spirals and imp-gates (see Imps, Rings & Spirals).
  • Tooling: simulate and debug with pMARS.

Links: Wikipedia, ICWS ’88/’94, pMARS, Redcode reference, classic strategy articles. All external resources belong to their respective owners.

Comments

Popular posts from this blog

go ahead baby, now on sale!!

Just Go For It, Baby by Red Sweet Pea