# Core War Glossary

A list of terms used in Core War along with a brief explanation. References to an X-like program mean that the term X is derived from the specific program X and has become a generic term.

Airbag
  A loop with carefully timed processes designed to detect when it's been damaged and allow some of the processes to jump to safety.

B-Scanner
  A scanner which only recognize non-zero B-fields.

          example   add   #10, scan
          scan      jmz   example, 10

Binary Launch
  One of several means to start an imp-spiral running. The fastest launch technique, but requires the most code. See also `JMP`/`ADD` launch and vector launch.

          impsize   equ 2667

          example   spl   4                  ; extend by adding spl 8, spl 16, etc.
                    spl   2
                    jmp   imp+(0*impsize)    ; jmp's execute in order
                    jmp   imp+(1*impsize)
                    spl   2
                    jmp   imp+(2*impsize)
                    jmp   imp+(3*impsize)
          imp       mov   0, impsize         ; in '94 use -> mov.i #0, impsize

Blur
  A scanner which attacks with a continuous `SPL` carpet from the scan loop.

Bomber
  Blindly place bombs in a pattern through core hoping to hit the opponent. Common bombs include `DAT` bombs, `SPL` bombs, stun bombs and incendiary bombs.

Bootstrapping
  Strategy of copying the active portion of the program away from the initial location, leaving a decoy behind and making the relocated program as small as possible.

Brainwash
  Make the opponent execute code which will wipe its own p-space.

          example   stp   #0, #0
                    djn   example, example

c
  Measure of speed, equal to one location per cycle. Speed of light. E.g. a warrior that is 0.5c is one which can bomb or scan one location every two cycles.

`CMP`-Scanner
  A scanner which uses a `CMP` instruction to look for opponents.

          example   add   step, scan
          scan      cmp   10, 30
                    jmp   attack
                    jmp   example
          step      dat   #20, #20

Color
  Property of bombs making them visible to scanners, causing them to attack useless locations, thus slowing them down.

          example   dat   #100

Core-Clear
  Code that sequentially overwrites core with `DAT` instructions; usually the last part of a program.

D-Clear
  A 1c core-clear which alternates between `DAT` bombs and decrementing core.

          example   ...

                    spl   0
          clear     mov   bomb,  >example
                    djn.f clear, >example

          bomb      dat   10

Decoy
  Bogus or unused instructions meant to slow down scanners. Typically, `DAT`s with non-zero b-fields.

Decoy Maker

  Creates a decoy at 3c to slow down scanners and quick scans.

          decoy     equ 4000

          example   mov   {decoy+0,  <decoy+2
                    mov   {decoy+3,  <decoy+5
                    mov   {decoy+6,  <decoy+8
                    mov   {decoy+9,  <decoy+11
                    mov   {decoy+12, <decoy+14
                    mov   {decoy+15, <decoy+17

Decrement Resistant
  Property of programs making them functional (or at least partially functional) when overrun by a `DJN`-stream.

`DJN`-Stream (also `DJN`-Train)
  Using a `DJN` command to rapidly decrement core locations.

          example   ...

                    djn   example, <4000

Dodger
  A dodger tries to avoid the opponent's attack pattern either by jumping over an approaching core-clear or by copying itself over a location bombed by the opponent.

Dwarf
  A Dwarf-like program. The prototypical small bomber. Dwarf was one of the example programs in A. K. Dewdney's first Computer Recreations column.

F-Scanner
  A scanner which recognizes non-zero a- or b-fields.

          example   add   #10, scan
          scan      jmz.f example, 10

Gate-busting (also gate-crashing)
  A technique to "interweave" a decrement-resistant imp-spiral (e.g. `MOV 0, 2668`) with a standard one to overrun imp-gates.

Handshaking
  A handshaking program recognizes when it's fighting itself (or an ally) and causes one program to terminate to unnaturally increase the score of the other.

Hybrid
  Programs which combine two or more of the basic strategies, either in sequence (e.g. stone->paper) or in parallel (e.g. imp/stone).

Imp
  An Imp-like program. A program which only uses the `MOV` instruction. Imp was one of the example programs in A. K. Dewdney's first Computer Recreations column.

          example   mov   0, 1

  or

          example   mov   0, 2
                    mov   0, 2

Imp-Gate
  A location in core which is bombed or decremented continuously so that an imp cannot pass. Also used to describe the program-code which maintains the gate.

          example   ...

                    spl   0, <example
                    dat   <example, #0

Imp-Ring
  A minimal imp-spiral. For example an imp-ring with three points and three processes running in this sequence:

          impsize   equ 2667                 ; (CORESIZE+1)/3

          a         mov   0, impsize         ; copy self to b
          b         mov   0, impsize         ; copy self to c
          c         mov   0, impsize         ; copy self to a+1

  One method of launching an imp-ring:

          impsize   equ 2667

          example   spl   impsize+1
                    mov   example, impsize
          imp       mov   0, impsize

Imp-Spiral
  An imp-like program with multiple processes supporting each other. For example a three-point spiral, with six processes running in this sequence:

          impsize   equ 2667                 ; (CORESIZE+1)/3

          a         mov   0, impsize         ; copy self to b
          b         mov   0, impsize         ; copy self to c
          c         mov   0, impsize         ; copy self to a+1
          a+1       mov   0, impsize         ; copy self to b+1
          b+1       mov   0, impsize         ; copy self to c+1
          c+1       mov   0, impsize         ; copy self to a+2

  See binary launch, `JMP`/`ADD` launch and vector launch for examples of launching imp-spirals.

Incendiary Bomb
  A type of stun bomb which creates a `SPL 0` carpet.

          example   spl   0, 8
                    mov   example, <example

  Modern incendiary bombs use separate `SPL` / `MOV` bombs:

          sp        spl   0, sm+1            ; spl half of the incendiary

                    ...

          sm        mov   sp, >sp            ; mov half of the incendiary

`JMP`/`ADD` Launch
  One of several means to start an imp-spiral running. The slowest launch technique, but requires the least code. See also binary launch and vector launch.

          impsize   equ 2667

          example   spl   1                  ; extend by adding more spl 1's
                    spl   1
                    spl   2
                    jmp   @0, imp
                    add   #impsize, -1       ; bump address by impsize after each jmp
                    dat   #0, #0             ; excess processes must die!
          imp       mov   0, impsize         ; in '94 use -> mov.i #0,IMPSIZE

Mirror
  Copy of a program or program part, positioned to make the active program invisible to a `CMP`-scanner.

On-Axis/Off-Axis
  On-axis scanners compare two locations M/2 apart, where M is the core size. Off-axis scanners use some other separation.

Oneshot
  A scanner which scans until the first target is found then switches permanently to a two-pass core-clear.

Optima Constant
  Bomb or scan increments chosen to cover core most effectively, i.e. leaving gaps of uniform size. Programs to calculate optimal constants and lists of optimal numbers are available at ftp.koth.org.

P-Space
  P-space is an area of memory which only your program's processes can access. The contents of each memory location are preserved between rounds in a multi-round match.

P^2/P^3
  A modern table-based p-switcher.

P-Switcher
  A type of p-warrior which uses the results of previous rounds in order to switch between different components / strategies.

P-Warrior
  A program which uses p-space.

Paper
  A paper-like program is one which replicates itself many times. Part of the scissors (beats) paper (beats) stone (beats scissors) analogy.

Pit-Trapper
  (also slaver, vampire). A program which enslaves another. Usually accomplished by bombing with `JMP`s to a `SPL 0` pit with an optional core-clear routine.

Q^2/Q^3/Q^4
  Modern versions of the quick scan where anything found is attacked almost immediately.

Quick Scan
  A 2c scan of a set group of core locations with bombing if anything is found.

Reflection
  See mirror.

Replicator
  Generic for paper. A program which makes many copies of itself, each copy also making copies.

Satellite
  A separate component which is copied and launched from a paper.

Scanner
  A program which searches through core for an opponent rather than bombing blindly.

Scissors
  A program designed to beat replicators, usually a (B-field scanning) pit-trapper. Part of the paper-scissors-stone analogy.

Self-Repair
  Ability of a program to fix it's own code after being attacked.

Self-Splitting
  Strategy of amplifying the number of processes executing a piece of code.

          example   ...

                    spl   0                  ; self-splitting
          clear     mov   bomb,  >example
                    djn.f clear, >example

          bomb      dat   10

Silk
  A replicator which splits off processes to each new copy before actually copying the code. This allows it to replicate extremely quickly. Example:

                    spl   2
                    mov   1
                    spl   1                  ; generate 6 consecutive processes
          example   spl   3620,     0        ; split to new copy
                    mov   >example, }example ; copy self to new location
                    mov   bomb,     >2000    ; linear bombing
                    mov   bomb,     }2042    ; a-indirect bombing for anti-vamp
                    jmp   example,  <example ; reset source pointer, make new copy
          bomb      dat   >2667,    >5334    ; anti-imp bomb

Slaver
  See pit-trapper.

Stealth
  Property of programs, or program parts, which are invisible to scanners, accomplished by using zero b-fields and reflections.

Stone
  A Stone-like program designed to be a small bomber. Part of the Paper-Scissors-Stone analogy.

Stun Bomb
  A type of bomb which makes the opponent multiply useless processes, thus slowing it down. This example is referred to as a `SPL`-`JMP` bomb.

          example   spl   0
                    jmp   example

Two-Pass Core-Clear (also `SPL`/`DAT` Core-Clear)
  A core-clear that fills core first with `SPL` instructions, then with `DAT`s. This is very effective in killing paper and certain imp-spiral variations.

Vampire
  See pit-trapper.

Vector Launch
  One of several means to start an imp-spiral running. As fast as a binary launch, but requiring much less code. See also `JMP`/`ADD` launch and binary launch. This example is one form of a vector launch:

          impsize   equ 2667

                    spl   1
                    spl   1
                    jmp   @vect, }0
          vect      dat   imp+(0*impsize)    ; start of vector table
                    dat   imp+(1*impsize)
                    dat   imp+(2*impsize)
                    dat   imp+(3*impsize)    ; end of vector table
          imp       mov.i #0, impsize

Copyright © 1991–2022 the Core War FAQ Contributors. Content of the glossary is available under the GNU Free Documentation License, version 1.3.