COREWAR

/
The CoreWar Universe
👁️ OBSERVATION MODE (Press [STEP])
[Addr][Opcode][A (Left)][B (Right)]
📦 DATA / BOMB (DAT)
0000
▼MOV
#
$
0001
▼MOV
<
<
0002
↺JMN
$
$
0003
❖SPL
@
#
0004
+ADD
#
$
0005
↺JMP
$
$
0006
■DAT
$0
$0
0007
■DAT
$0
$0
0008
■DAT
$0
$0
0009
■DAT
$0
$0
0010
■DAT
$0
$0
0011
■DAT
$0
$0
0012
■DAT
$0
$0
0013
■DAT
$0
$0
0014
■DAT
$0
$0
0015
■DAT
$0
$0
0016
■DAT
$0
$0
0017
■DAT
$0
$0
0018
■DAT
$0
$0
0019
■DAT
$0
$0
0020
■DAT
$0
$0
0021
■DAT
$0
$0
0022
■DAT
$0
$0
0023
■DAT
$0
$0
0024
■DAT
$0
$0
0025
■DAT
$0
$0
0026
■DAT
$0
$0
0027
■DAT
$0
$0
🏟️ARENA (20 ROWS)SCOPE: 0000 - 0019
[CORE MEMORY 800 CELLS (20 ROWS × 40 COLS)]1:1 Row Synced with Editor
P1: 0
P2: 0
CYC: 0
📖CoreWar Introduction Guide(Drag to move)
📖 CoreWar Introduction Guide

The CoreWar Universe

The Universe of CoreWar

History

CoreWar was conceived by A. K. Dewdney and first described in his _Scientific American_ column "Computer Recreations" in May 1984. The game was inspired by Darwin, an earlier program-versus-program game developed at Bell Labs in the 1960s.

Since then, CoreWar has spawned an active competitive community, with online tournaments, strategy archives (such as koenigstuhl.com), and countless warriors submitted by players worldwide.

The Battlefield: The Core

The game takes place in a circular memory called the Core. Key properties:

  • Size: Typically 8000 cells (configurable)
  • Circular: Address 7999 wraps to address 0
  • Shared: Both warriors occupy the same memory space
  • Initialized: All cells start as DAT 0, 0

Warriors are loaded into random positions within the core, at least a minimum distance apart.

Warrior Execution

Each warrior starts with one process. The MARS (Memory Array Redcode Simulator) executes one instruction from each warrior's process queue in alternating turns.

A warrior can create additional processes using SPL, giving it more execution time per round. However, each process only gets one instruction per complete cycle.

Victory Conditions

  • Win: Your opponent's last process is terminated (executes DAT)
  • Draw: Both warriors survive until the cycle limit
  • Loss: All your processes are terminated

Classic Warrior Archetypes

TypeStrategyExample
ImpSelf-replicating MOV 0, 1Simplest possible warrior
BomberDrops DAT bombs across memoryDwarf
ScannerDetects enemy, then attacksUses CMP/SNE
PaperRapid self-replication via SPLOverwrites core with copies
StoneBombs with large step sizesCovers more ground

The Artificial Life Connection

CoreWar is often studied in the context of Artificial Life (ALife). Warriors exhibit behaviors analogous to biological organisms: reproduction (SPL/Paper), predation (Bomber/Scanner), and defense (Imp Gate). The core becomes an ecosystem where different strategies compete for survival.

📖 CoreWar Introduction Guide

The CoreWar Universe

The Universe of CoreWar

History

CoreWar was conceived by A. K. Dewdney and first described in his _Scientific American_ column "Computer Recreations" in May 1984. The game was inspired by Darwin, an earlier program-versus-program game developed at Bell Labs in the 1960s.

Since then, CoreWar has spawned an active competitive community, with online tournaments, strategy archives (such as koenigstuhl.com), and countless warriors submitted by players worldwide.

The Battlefield: The Core

The game takes place in a circular memory called the Core. Key properties:

  • Size: Typically 8000 cells (configurable)
  • Circular: Address 7999 wraps to address 0
  • Shared: Both warriors occupy the same memory space
  • Initialized: All cells start as DAT 0, 0

Warriors are loaded into random positions within the core, at least a minimum distance apart.

Warrior Execution

Each warrior starts with one process. The MARS (Memory Array Redcode Simulator) executes one instruction from each warrior's process queue in alternating turns.

A warrior can create additional processes using SPL, giving it more execution time per round. However, each process only gets one instruction per complete cycle.

Victory Conditions

  • Win: Your opponent's last process is terminated (executes DAT)
  • Draw: Both warriors survive until the cycle limit
  • Loss: All your processes are terminated

Classic Warrior Archetypes

TypeStrategyExample
ImpSelf-replicating MOV 0, 1Simplest possible warrior
BomberDrops DAT bombs across memoryDwarf
ScannerDetects enemy, then attacksUses CMP/SNE
PaperRapid self-replication via SPLOverwrites core with copies
StoneBombs with large step sizesCovers more ground

The Artificial Life Connection

CoreWar is often studied in the context of Artificial Life (ALife). Warriors exhibit behaviors analogous to biological organisms: reproduction (SPL/Paper), predation (Bomber/Scanner), and defense (Imp Gate). The core becomes an ecosystem where different strategies compete for survival.