ℹ️ Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | PASS | download_stamp > now() - 6 MONTH | 0.7 months ago (distributed domain, exempt) |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://en.wikipedia.org/wiki/Core_War |
| Last Crawled | 2026-03-20 19:40:37 (22 days ago) |
| First Indexed | 2013-08-08 16:29:46 (12 years ago) |
| HTTP Status Code | 200 |
| Meta Title | Core War - Wikipedia |
| Meta Description | null |
| Meta Canonical | null |
| Boilerpipe Text | From Wikipedia, the free encyclopedia
Core War
Running under the pMARS simulator
Developers
D. G. Jones &
A. K. Dewdney
Initial release
1 March 1984
; 42 years ago
Type
Programming game
Website
corewar
.co
.uk
Core War
is a
programming game
introduced in 1984 by D. G. Jones and
A. K. Dewdney
. In the game, two or more battle programs, known as
warriors
, compete for control of a
virtual computer
. These programs are written in an abstract
assembly language
called
Redcode
. Initial standards for Redcode and the virtual machine were established by the International Core Wars Society (ICWS), with later revisions shaped by community consensus.
At the start of a match, each warrior is loaded into a random memory location. Programs take turns executing one instruction at a time. A program wins by terminating all opponents, typically by causing them to execute invalid instructions, leaving the victorious program in sole possession of the machine.
Early versions of Redcode featured only eight instructions. This number increased to 10 in the ICWS-86 standard, 11 in ICWS-88, and 16 in the 1994 draft standard, which is still widely used. With various
addressing modes
and instruction modifiers introduced in the 1994 draft, the total number of possible operations is 7168. Redcode does not define how instructions are represented in memory, nor does it allow programs to inspect their own code structure beyond copying and equality comparisons. Arithmetic operations are limited to the instruction’s two address fields.
Constant instruction length and time
Each Redcode instruction occupies exactly one memory slot and takes exactly one cycle to execute. The rate at which a process executes instructions, however, depends on the number of other processes in the queue, as processing time is shared equally.
Circular memory
The memory is addressed in units of one instruction. The memory space (or
core
) is of finite size, but only
relative addressing
is used, that is, address
0
always refers to the currently executing instruction, address
1
to the instruction after it, and so on. The maximum address value is set to equal one less than the number of memory locations and will wrap around if necessary. As a result, there is a one-to-one correspondence between addresses and memory locations, but it is impossible for a Redcode program to determine any absolute address. A process that encounters no invalid or jump instructions will continue executing successive instructions endlessly, eventually returning to the instruction where it started.
Low-level multiprocessing
Instead of a single
instruction pointer
a Redcode simulator has a
process queue
for each program containing a variable number of instruction pointers which the simulator cycles through. Each program starts with only one process, but new processes may be added to the queue using the
SPL
instruction. A process dies when it executes a
DAT
instruction or performs a
division by zero
. A program is considered dead when it has no more processes left.
No external access
Redcode and the MARS architecture provide no input or output functions. The simulator is a closed system, with the only input being the initial values of the memory and the process queues, and the only output being the outcome of the battle, i.e., which programs had surviving processes. Of course, the simulator may still allow external inspections and modification of the memory while the simulation is running.
Versions of Redcode
[
edit
]
A number of versions of Redcode exist. The earliest version described by
A. K. Dewdney
[
1
]
differs in many respects from the later standards established by the International Core War Society, and could be considered a different, albeit related, language. The form of Redcode most commonly used today is based on a draft standard submitted to the ICWS in 1994 that was never formally accepted, as the ICWS had become effectively defunct around that time. Development of Redcode, however, has continued in an informal manner, chiefly via online forums such as the
rec.games.corewar
[
2
]
newsgroup
.
Warriors are commonly divided into a number of broad categories, although actual warriors may often combine the behavior of two or more of these. Three of the common strategies (
replicator
,
scanner
and
bomber
) are also known as
paper, scissors and stone
, since their performance against each other approximates that of their namesakes in the well-known playground game.
[
3
]
Paper (or replicator)
A replicator makes repeated copies of itself and executes them in parallel, eventually filling the entire core with copies of its code. Replicators are hard to kill, but often have difficulty killing their opponents. Replicators therefore tend to score a lot of ties, particularly against other replicators.
A
silk
is a special type of very rapid replicator, named after
Silk Warrior
[
4
]
by Juha Pohjalainen. Most modern replicators are of this type. Silk replicators use parallel execution to copy their entire code with one instruction, and begin execution of the copy before it is finished.
[
5
]
Scissors (or scanner)
A scanner is designed to beat replicators. A scanner does not attack blindly, but tries to locate its enemy before launching a targeted attack. This makes it more effective against hard-to-kill opponents like replicators, but also leaves it vulnerable to decoys. A scanner usually bombs memory with
SPL 0
instructions. This causes the enemy to create a huge number of processes which do nothing but create more processes, slowing down useful processes. When the enemy becomes so slow that it is unable to do anything useful, the memory is then bombed with
DAT
instructions. Scanners are also generally more complex, and therefore are larger and more fragile, than other types of warriors.
[
6
]
A
one-shot
is a very simple scanner that only scans the core until it finds the first target, and then permanently switches to an attack strategy, usually a core clear.
Myrmidon
[
7
]
by Roy van Rijn is an example of a oneshot.
Stone (or bomber)
A bomber blindly copies a "bomb" at regular intervals in the core, hoping to hit the enemy. The bomb is often a
DAT
instruction, although other instructions, or even multi-instruction bombs, may be used. A bomber can be small and fast, and they gain an extra edge over scanning opponents since the bombs also serve as convenient distractions. Bombers are often combined with imp spirals to gain extra resiliency against replicators.
Vampire (or pit-trapper)
A vampire tries to make its opponent's processes jump into a piece of its own code called a "pit". Vampires can be based on either bombers or scanners. A major weakness of vampires is that they can be easily attacked indirectly, since they must by necessity scatter pointers to their code all over the core. Their attacks are also slow, as it takes an extra round for the processes to reach the pit.
myVamp
[
8
]
by Paulsson is an example of a vampire.
Imp
Imps are named after the first ever published warrior,
Imp
[
9
]
by
A. K. Dewdney
, a trivial one-instruction mobile warrior that continually copies its sole instruction just ahead of its
instruction pointer
. Imps are hard to kill but next to useless for offense. Their use lies in the fact that they can easily be spawned in large numbers, and may survive even if the rest of the warriors are killed.
An
imp ring
(or
imp spiral
) consists of imps spaced at equal intervals around the core and executing alternately. The imps at each arm of the ring/spiral copy their instructions to the next arm, where it is immediately executed again. Rings and spirals are even harder to kill than simple imps, and they even have a (small) chance of killing warriors not protected against them. The number of arms in an imp ring or spiral must be
relatively prime
with the size of the core.
Hydra
Hydras launch multiple copies of tiny bombers or core clears.
[
10
]
Quickscanner (or q-scan)
A quickscanner attempts to catch its opponent early by using a very fast unrolled scanning loop. Quickscanning is an early-game strategy, and always requires some other strategy as a backup. Adding a quickscanning component to a warrior can improve its score against long warriors such as other quickscanners. However, the unrolled scan can only target a limited number of locations, and is unlikely to catch a small opponent.
Bootstrap
Bootstraps copy one or more of their components away from their original location, leaving a decoy to attract Scanners and Quickscanners.
[
11
]
Mixed warriors
Some warriors are of different strategies at the same or different time/times.
For example,
Stone/Imp
.
Stone/Imps
are Imps that have been paired with Stones to reduce some of the losses against paper.
Some of the most successful warriors of all time are Stone/Imps.
Core clear
A core clear sequentially overwrites every instruction in the core, sometimes even including itself. Core clears are not very common as stand-alone warriors, but are often used as an end-game strategy by bombers and scanners.
Core War
programming
[
edit
]
With an understanding of
Core War
strategies, a programmer can create a warrior to achieve certain goals. Revolutionary ideas come once in a while; most of the time, however, programmers base their programs on already published warriors. Using optimizers such as OptiMax or core-step optimizer tools, a more effective warrior can be created.
Warriors can also be generated by
genetic algorithms
or
genetic programming
. Programs that integrate this evolutionary technique are known as
evolvers
. Several evolvers were introduced by the
Core War
community and tend to focus on generating warriors for smaller core settings. The latest evolver with significant success was
μGP
[
12
]
[
13
]
which produced some of the most successful nano and tiny warriors. Nevertheless, evolutionary strategy still needs to prove its effectiveness on larger core settings.
[
14
]
Core War
was inspired by a
self-replicating
program called
Creeper
and a subsequent program called Reaper that destroyed copies of Creeper.
[
15
]
Creeper was created by Bob Thomas at
BBN
.
[
16
]
Dewdney was not aware of the origin of Creeper and Reaper and refers to them as a rumor originating from
Darwin
and the worm experiments of
Shoch
and Hupp. The 1984
Scientific American
article on
Core War
[
15
]
nevertheless cites the game
Darwin
, played by
Victor A. Vyssotsky
,
Robert Morris
, and
Douglas McIlroy
at
Bell Labs
in 1961.
The word "Core" in the name comes from
magnetic-core memory
, an obsolete
random-access memory
technology. This term was then, and still today, typically in use as the term for
working memory
in working memory dumps, called
core dumps
, on
Unix
and most Unix-like systems. Additionally, the default filename used for core dumps on such systems is usually "core" or contains the word core.
The first description of the Redcode language was published in March 1984, in
Core War Guidelines
by D. G. Jones and
A. K. Dewdney
.
[
1
]
The game was introduced to the public in May 1984, in an article written by Dewdney in
Scientific American
. Dewdney revisited
Core War
in his "Computer Recreations" column in March 1985,
[
17
]
and again in January 1987.
[
18
]
The International Core Wars Society (ICWS) was founded in 1985, one year after Dewdney's original article. The ICWS published new standards for the Redcode language in 1986 and 1988, and proposed an update in 1994 that was never formally set as the new standard.
[
19
]
Nonetheless, the 1994 draft was commonly adopted and extended, and forms the basis of the
de facto
standard for Redcode today. The ICWS was directed by Mark Clarkson (1985–1987), William R. Buckley (1987–1992), and Jon Newman (1992–); currently
[
when?
]
the ICWS is defunct.
[
20
]
0000
:
ADD
.
AB
#
4
,
$
3
0001
:
MOV
.
F
$
2
,
@
2
0002
:
JMP
.
B
$
-
2
,
$
0
0003
:
DAT
.
F
#
0
,
#
0
Assembled ICWS-94 style Redcode
Redcode is the
programming language
used in
Core War
. It is executed by a
virtual machine
known as a
Memory Array Redcode Simulator
, or
MARS
. The design of Redcode is loosely based on actual
CISC
assembly languages
of the early 1980s, but contains several features
[
vague
]
not usually found in actual computer systems.
Both Redcode and the MARS environment are designed to provide a simple and abstract platform without the complexity of actual computers and processors. Although Redcode is meant to resemble an ordinary CISC assembly language, it is quite simplified relative to "real" assembly, and has no absolute memory addressing
The original 8 instructions are described as follows. Later versions added NOP, multiply and more complex comparisons.
[
21
]
Opcode
Mnemonic
Argument(s)
Action
0
DAT
B
A non-executable instruction used to store the data value B.
1
MOV
A, B
Move the contents of A to location B.
2
ADD
A, B
Add the contents of A to the contents of location B and store the result in location B.
3
SUB
A, B
Subtract the contents of A from the contents of location B and store the result in location B.
4
JMP
A
Jump to location A.
5
JMZ
A, B
If the contents of B is zero, jump to location A; otherwise, continue with the next instruction.
6
JMG
A, B
If the contents of B is greater than zero, jump to location A; otherwise, continue with the next instruction.
7
DJZ
A, B
Decrement the contents of location B by 1. If location B is now zero, jump to location A; otherwise, continue with the next instruction.
8
CMP
A, B
Compare the contents of A with the contents of B. If they're not equal, skip the next instruction; otherwise, execute the next instruction.
The ICWS '94 draft standard added more addressing modes, mostly to deal with A-field indirection, to give a total of 8 modes:
Mode
Action
#
Immediate
$
Direct (the
$
may be omitted)
*
A-field indirect (added in the '94 draft standard)
@
B-field indirect
{
A-field indirect with predecrement (added in the '94 draft standard)
<
B-field indirect with predecrement
}
A-field indirect with postincrement (added in the '94 draft standard)
>
B-field indirect with postincrement (added in the '94 draft standard)
Development of implementations of the game continued over the years by several authors.
There are multiple versions of the game available,
[
22
]
ported
to several platforms. For instance
pMARS
which is
open source software
with
source code
on
SourceForge
,
[
23
]
or the
SDL
based
SDL pMARS
for Windows.
[
24
]
The common implementation pMars was downloaded from
SourceForge
over 35,000 times between 2000 and 2021.
[
25
]
^
a
b
Jones, D. G.;
Dewdney, A. K.
(March 1984).
"Core War Guidelines"
. Retrieved
2023-05-27
.
^
"rec.games.corewar on Google Groups"
. Retrieved
2023-05-29
.
^
Wangsaw, Mintardjo.
"Intro to Art in '88: Paper - Stone - Scissors Trilogy"
. Retrieved
2023-05-27
.
^
Pohjalainen, Jippo.
"Silk Warrior 1.3"
. Retrieved
2025-03-02
.
^
Pohjalainen, Jippo (April 1995).
"replicators? -> Phoenix & TimeScapesource"
. Retrieved
2023-05-27
.
^
Metcalf, John (April 2004).
"Anatomy of the Scanner, A Basic Introduction"
. Retrieved
2023-05-27
.
^
van Rijn, Roy.
"Myrmidon"
. Retrieved
2025-03-02
.
^
Paulsson, Magnus.
"myVamp v3.7"
. Retrieved
2025-03-02
.
^
Dewdney, A. K.
"Imp"
. Retrieved
2025-03-02
.
^
"Core War Strategy Guide"
. Retrieved
2024-05-12
.
^
"Core War Strategy Guide"
. Retrieved
2025-05-12
.
^
Squillero, Giovanni.
"μGP (MicroGP v2)"
.
GitHub
. Retrieved
2018-09-10
.
^
Corno, F.; Sanchez, E.; Squillero, G. (2005).
"Evolving Assembly Programs: How Games Help Microprocessor Validation"
.
IEEE Transactions on Evolutionary Computation
.
9
(6):
695–
706.
doi
:
10.1109/TEVC.2005.856207
.
ISSN
1089-778X
.
^
Vowk, Barkley; Wait, Alexander; Schmidt, Christian.
"An Evolutionary Approach Generates Human Competitive Corewar Programs"
(PDF)
. Retrieved
2023-05-27
.
^
a
b
Dewdney, A. K.
(May 1984).
"In the game called Core War hostile programs engage in a battle of bits"
.
Scientific American
. Retrieved
2023-05-27
.
^
Shoch, J.
; Hupp, J. (March 1982).
"The 'Worm' Programs - Early Experience with a Distributed Computation"
.
Communications of the ACM
.
25
(3):
172–
180.
doi
:
10.1145/358453.358455
.
S2CID
1639205
.
^
Dewdney, A. K.
(March 1985).
"A Core War bestiary of viruses, worms and other threats to computer memories"
.
Scientific American
. Retrieved
2023-05-27
.
^
Dewdney, A. K.
(January 1987).
"A program called MICE nibbles its way to victory at the first Core War tournament"
.
Scientific American
. Retrieved
2023-05-27
.
^
Doligez, Damien; Durham, Mark (8 November 1995).
"Annotated Draft of the Proposed 1994 Core War Standard"
. Retrieved
2023-05-27
.
^
Metcalf, John.
"A Brief History of Corewar"
. Retrieved
2023-05-27
.
^
"The beginners' guide to Redcode, v1.23"
.
^
The Corewar Emulators
on corewar.info
^
corewar
on
SourceForge
^
pMARS-SDL
on corewar.co.uk by Joonas Pihlaja (7 May 2003)
^
download numbers corewar
on
SourceForge
(access 2021-06-07)
Core War - the Ultimate Programming Game
The Core War Info Page
The beginner's guide to Redcode
Annotated Draft of the Proposed 1994 Core War Standard
Corewar Bibliography |
| Markdown | [Jump to content](https://en.wikipedia.org/wiki/Core_War#bodyContent)
Main menu
Main menu
move to sidebar
hide
Navigation
- [Main page](https://en.wikipedia.org/wiki/Main_Page "Visit the main page [z]")
- [Contents](https://en.wikipedia.org/wiki/Wikipedia:Contents "Guides to browsing Wikipedia")
- [Current events](https://en.wikipedia.org/wiki/Portal:Current_events "Articles related to current events")
- [Random article](https://en.wikipedia.org/wiki/Special:Random "Visit a randomly selected article [x]")
- [About Wikipedia](https://en.wikipedia.org/wiki/Wikipedia:About "Learn about Wikipedia and how it works")
- [Contact us](https://en.wikipedia.org/wiki/Wikipedia:Contact_us "How to contact Wikipedia")
Contribute
- [Help](https://en.wikipedia.org/wiki/Help:Contents "Guidance on how to use and edit Wikipedia")
- [Learn to edit](https://en.wikipedia.org/wiki/Help:Introduction "Learn how to edit Wikipedia")
- [Community portal](https://en.wikipedia.org/wiki/Wikipedia:Community_portal "The hub for editors")
- [Recent changes](https://en.wikipedia.org/wiki/Special:RecentChanges "A list of recent changes to Wikipedia [r]")
- [Upload file](https://en.wikipedia.org/wiki/Wikipedia:File_upload_wizard "Add images or other media for use on Wikipedia")
- [Special pages](https://en.wikipedia.org/wiki/Special:SpecialPages "A list of all special pages [q]")
[  ](https://en.wikipedia.org/wiki/Main_Page)
[Search](https://en.wikipedia.org/wiki/Special:Search "Search Wikipedia [f]")
Appearance
- [Donate](https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=en.wikipedia.org&uselang=en)
- [Create account](https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&returnto=Core+War "You are encouraged to create an account and log in; however, it is not mandatory")
- [Log in](https://en.wikipedia.org/w/index.php?title=Special:UserLogin&returnto=Core+War "You're encouraged to log in; however, it's not mandatory. [o]")
Personal tools
- [Donate](https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=en.wikipedia.org&uselang=en)
- [Create account](https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&returnto=Core+War "You are encouraged to create an account and log in; however, it is not mandatory")
- [Log in](https://en.wikipedia.org/w/index.php?title=Special:UserLogin&returnto=Core+War "You're encouraged to log in; however, it's not mandatory. [o]")
## Contents
move to sidebar
hide
- [(Top)](https://en.wikipedia.org/wiki/Core_War)
- [1 Gameplay](https://en.wikipedia.org/wiki/Core_War#Gameplay)
Toggle Gameplay subsection
- [1\.1 Versions of Redcode](https://en.wikipedia.org/wiki/Core_War#Versions_of_Redcode)
- [1\.2 Strategy](https://en.wikipedia.org/wiki/Core_War#Strategy)
- [1\.3 *Core War* programming](https://en.wikipedia.org/wiki/Core_War#Core_War_programming)
- [2 Development](https://en.wikipedia.org/wiki/Core_War#Development)
Toggle Development subsection
- [2\.1 Redcode](https://en.wikipedia.org/wiki/Core_War#Redcode)
- [3 Implementations](https://en.wikipedia.org/wiki/Core_War#Implementations)
- [4 References](https://en.wikipedia.org/wiki/Core_War#References)
- [5 External links](https://en.wikipedia.org/wiki/Core_War#External_links)
Toggle the table of contents
# Core War
13 languages
- [Català](https://ca.wikipedia.org/wiki/Core_War "Core War – Catalan")
- [Deutsch](https://de.wikipedia.org/wiki/Core_War "Core War – German")
- [Español](https://es.wikipedia.org/wiki/Core_War "Core War – Spanish")
- [Suomi](https://fi.wikipedia.org/wiki/Core_War "Core War – Finnish")
- [Français](https://fr.wikipedia.org/wiki/Core_War "Core War – French")
- [Bahasa Indonesia](https://id.wikipedia.org/wiki/Core_War "Core War – Indonesian")
- [日本語](https://ja.wikipedia.org/wiki/%E3%82%B3%E3%82%A2%E6%88%A6%E4%BA%89 "コア戦争 – Japanese")
- [한국어](https://ko.wikipedia.org/wiki/%EC%BD%94%EC%96%B4_%EC%9B%8C "코어 워 – Korean")
- [Polski](https://pl.wikipedia.org/wiki/Core_War "Core War – Polish")
- [Русский](https://ru.wikipedia.org/wiki/%D0%91%D0%BE%D0%B9_%D0%B2_%D0%BF%D0%B0%D0%BC%D1%8F%D1%82%D0%B8 "Бой в памяти – Russian")
- [Svenska](https://sv.wikipedia.org/wiki/Core_War "Core War – Swedish")
- [Türkçe](https://tr.wikipedia.org/wiki/Core_War "Core War – Turkish")
- [中文](https://zh.wikipedia.org/wiki/%E6%A0%B8%E5%BF%83%E5%A4%A7%E6%88%98 "核心大战 – Chinese")
[Edit links](https://www.wikidata.org/wiki/Special:EntityPage/Q1132500#sitelinks-wikipedia "Edit interlanguage links")
- [Article](https://en.wikipedia.org/wiki/Core_War "View the content page [c]")
- [Talk](https://en.wikipedia.org/wiki/Talk:Core_War "Discuss improvements to the content page [t]")
English
- [Read](https://en.wikipedia.org/wiki/Core_War)
- [Edit](https://en.wikipedia.org/w/index.php?title=Core_War&action=edit "Edit this page [e]")
- [View history](https://en.wikipedia.org/w/index.php?title=Core_War&action=history "Past revisions of this page [h]")
Tools
Tools
move to sidebar
hide
Actions
- [Read](https://en.wikipedia.org/wiki/Core_War)
- [Edit](https://en.wikipedia.org/w/index.php?title=Core_War&action=edit "Edit this page [e]")
- [View history](https://en.wikipedia.org/w/index.php?title=Core_War&action=history)
General
- [What links here](https://en.wikipedia.org/wiki/Special:WhatLinksHere/Core_War "List of all English Wikipedia pages containing links to this page [j]")
- [Related changes](https://en.wikipedia.org/wiki/Special:RecentChangesLinked/Core_War "Recent changes in pages linked from this page [k]")
- [Upload file](https://en.wikipedia.org/wiki/Wikipedia:File_Upload_Wizard "Upload files [u]")
- [Permanent link](https://en.wikipedia.org/w/index.php?title=Core_War&oldid=1320067265 "Permanent link to this revision of this page")
- [Page information](https://en.wikipedia.org/w/index.php?title=Core_War&action=info "More information about this page")
- [Cite this page](https://en.wikipedia.org/w/index.php?title=Special:CiteThisPage&page=Core_War&id=1320067265&wpFormIdentifier=titleform "Information on how to cite this page")
- [Get shortened URL](https://en.wikipedia.org/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FCore_War)
Print/export
- [Download as PDF](https://en.wikipedia.org/w/index.php?title=Special:DownloadAsPdf&page=Core_War&action=show-download-screen "Download this page as a PDF file")
- [Printable version](https://en.wikipedia.org/w/index.php?title=Core_War&printable=yes "Printable version of this page [p]")
In other projects
- [Wikibooks](https://en.wikibooks.org/wiki/Core_War)
- [Wikidata item](https://www.wikidata.org/wiki/Special:EntityPage/Q1132500 "Structured data on this page hosted by Wikidata [g]")
Appearance
move to sidebar
hide
From Wikipedia, the free encyclopedia
1984 programming game
| Core War | |
|---|---|
| [](https://en.wikipedia.org/wiki/File:Core_War_PMars_Screenshot.png)Running under the pMARS simulator | |
| [Developers](https://en.wikipedia.org/wiki/Programmer "Programmer") | D. G. Jones & [A. K. Dewdney](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney") |
| Initial release | 1 March 1984; 42 years ago (1984-03-01) |
| [Type](https://en.wikipedia.org/wiki/Software_categories#Categorization_approaches "Software categories") | [Programming game](https://en.wikipedia.org/wiki/Programming_game "Programming game") |
| Website | [corewar.co.uk](https://corewar.co.uk/) |
- [](https://en.wikipedia.org/wiki/File:Octicons-terminal.svg)[Computer programming portal](https://en.wikipedia.org/wiki/Portal:Computer_programming "Portal:Computer programming")
- [Video games portal](https://en.wikipedia.org/wiki/Portal:Video_games "Portal:Video games")
***Core War*** is a [programming game](https://en.wikipedia.org/wiki/Programming_game "Programming game") introduced in 1984 by D. G. Jones and [A. K. Dewdney](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney"). In the game, two or more battle programs, known as *warriors*, compete for control of a [virtual computer](https://en.wikipedia.org/wiki/Virtual_machine "Virtual machine"). These programs are written in an abstract [assembly language](https://en.wikipedia.org/wiki/Assembly_language "Assembly language") called *Redcode*. Initial standards for Redcode and the virtual machine were established by the International Core Wars Society (ICWS), with later revisions shaped by community consensus.
## Gameplay
\[[edit](https://en.wikipedia.org/w/index.php?title=Core_War&action=edit§ion=1 "Edit section: Gameplay")\]
At the start of a match, each warrior is loaded into a random memory location. Programs take turns executing one instruction at a time. A program wins by terminating all opponents, typically by causing them to execute invalid instructions, leaving the victorious program in sole possession of the machine.
Early versions of Redcode featured only eight instructions. This number increased to 10 in the ICWS-86 standard, 11 in ICWS-88, and 16 in the 1994 draft standard, which is still widely used. With various [addressing modes](https://en.wikipedia.org/wiki/Addressing_mode "Addressing mode") and instruction modifiers introduced in the 1994 draft, the total number of possible operations is 7168. Redcode does not define how instructions are represented in memory, nor does it allow programs to inspect their own code structure beyond copying and equality comparisons. Arithmetic operations are limited to the instruction’s two address fields.
Constant instruction length and time
Each Redcode instruction occupies exactly one memory slot and takes exactly one cycle to execute. The rate at which a process executes instructions, however, depends on the number of other processes in the queue, as processing time is shared equally.
Circular memory
The memory is addressed in units of one instruction. The memory space (or *core*) is of finite size, but only [relative addressing](https://en.wikipedia.org/wiki/Relative_address "Relative address") is used, that is, address *0* always refers to the currently executing instruction, address *1* to the instruction after it, and so on. The maximum address value is set to equal one less than the number of memory locations and will wrap around if necessary. As a result, there is a one-to-one correspondence between addresses and memory locations, but it is impossible for a Redcode program to determine any absolute address. A process that encounters no invalid or jump instructions will continue executing successive instructions endlessly, eventually returning to the instruction where it started.
Low-level multiprocessing
Instead of a single [instruction pointer](https://en.wikipedia.org/wiki/Instruction_pointer "Instruction pointer") a Redcode simulator has a *process queue* for each program containing a variable number of instruction pointers which the simulator cycles through. Each program starts with only one process, but new processes may be added to the queue using the `SPL` instruction. A process dies when it executes a `DAT` instruction or performs a [division by zero](https://en.wikipedia.org/wiki/Division_by_zero "Division by zero"). A program is considered dead when it has no more processes left.
No external access
Redcode and the MARS architecture provide no input or output functions. The simulator is a closed system, with the only input being the initial values of the memory and the process queues, and the only output being the outcome of the battle, i.e., which programs had surviving processes. Of course, the simulator may still allow external inspections and modification of the memory while the simulation is running.
### Versions of Redcode
\[[edit](https://en.wikipedia.org/w/index.php?title=Core_War&action=edit§ion=2 "Edit section: Versions of Redcode")\]
A number of versions of Redcode exist. The earliest version described by [A. K. Dewdney](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney")[\[1\]](https://en.wikipedia.org/wiki/Core_War#cite_note-dewdneycwg-1) differs in many respects from the later standards established by the International Core War Society, and could be considered a different, albeit related, language. The form of Redcode most commonly used today is based on a draft standard submitted to the ICWS in 1994 that was never formally accepted, as the ICWS had become effectively defunct around that time. Development of Redcode, however, has continued in an informal manner, chiefly via online forums such as the `rec.games.corewar`[\[2\]](https://en.wikipedia.org/wiki/Core_War#cite_note-2) [newsgroup](https://en.wikipedia.org/wiki/Newsgroup "Newsgroup").
### Strategy
\[[edit](https://en.wikipedia.org/w/index.php?title=Core_War&action=edit§ion=3 "Edit section: Strategy")\]
Warriors are commonly divided into a number of broad categories, although actual warriors may often combine the behavior of two or more of these. Three of the common strategies (*replicator*, *scanner* and *bomber*) are also known as [paper, scissors and stone](https://en.wikipedia.org/wiki/Rock_paper_scissors "Rock paper scissors"), since their performance against each other approximates that of their namesakes in the well-known playground game.[\[3\]](https://en.wikipedia.org/wiki/Core_War#cite_note-wangsaw-3)
Paper (or replicator)
A replicator makes repeated copies of itself and executes them in parallel, eventually filling the entire core with copies of its code. Replicators are hard to kill, but often have difficulty killing their opponents. Replicators therefore tend to score a lot of ties, particularly against other replicators.
A **silk** is a special type of very rapid replicator, named after *Silk Warrior*[\[4\]](https://en.wikipedia.org/wiki/Core_War#cite_note-4) by Juha Pohjalainen. Most modern replicators are of this type. Silk replicators use parallel execution to copy their entire code with one instruction, and begin execution of the copy before it is finished.[\[5\]](https://en.wikipedia.org/wiki/Core_War#cite_note-5)
Scissors (or scanner)
A scanner is designed to beat replicators. A scanner does not attack blindly, but tries to locate its enemy before launching a targeted attack. This makes it more effective against hard-to-kill opponents like replicators, but also leaves it vulnerable to decoys. A scanner usually bombs memory with
`SPL 0` instructions. This causes the enemy to create a huge number of processes which do nothing but create more processes, slowing down useful processes. When the enemy becomes so slow that it is unable to do anything useful, the memory is then bombed with
`DAT` instructions. Scanners are also generally more complex, and therefore are larger and more fragile, than other types of warriors.[\[6\]](https://en.wikipedia.org/wiki/Core_War#cite_note-6)
A **one-shot** is a very simple scanner that only scans the core until it finds the first target, and then permanently switches to an attack strategy, usually a core clear. *Myrmidon*[\[7\]](https://en.wikipedia.org/wiki/Core_War#cite_note-7) by Roy van Rijn is an example of a oneshot.
Stone (or bomber)
A bomber blindly copies a "bomb" at regular intervals in the core, hoping to hit the enemy. The bomb is often a
`DAT` instruction, although other instructions, or even multi-instruction bombs, may be used. A bomber can be small and fast, and they gain an extra edge over scanning opponents since the bombs also serve as convenient distractions. Bombers are often combined with imp spirals to gain extra resiliency against replicators.
Vampire (or pit-trapper)
A vampire tries to make its opponent's processes jump into a piece of its own code called a "pit". Vampires can be based on either bombers or scanners. A major weakness of vampires is that they can be easily attacked indirectly, since they must by necessity scatter pointers to their code all over the core. Their attacks are also slow, as it takes an extra round for the processes to reach the pit. *myVamp*[\[8\]](https://en.wikipedia.org/wiki/Core_War#cite_note-8) by Paulsson is an example of a vampire.
Imp
Imps are named after the first ever published warrior, *Imp*[\[9\]](https://en.wikipedia.org/wiki/Core_War#cite_note-9) by [A. K. Dewdney](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney"), a trivial one-instruction mobile warrior that continually copies its sole instruction just ahead of its [instruction pointer](https://en.wikipedia.org/wiki/Instruction_pointer "Instruction pointer"). Imps are hard to kill but next to useless for offense. Their use lies in the fact that they can easily be spawned in large numbers, and may survive even if the rest of the warriors are killed.
An **imp ring** (or **imp spiral**) consists of imps spaced at equal intervals around the core and executing alternately. The imps at each arm of the ring/spiral copy their instructions to the next arm, where it is immediately executed again. Rings and spirals are even harder to kill than simple imps, and they even have a (small) chance of killing warriors not protected against them. The number of arms in an imp ring or spiral must be [relatively prime](https://en.wikipedia.org/wiki/Coprime "Coprime") with the size of the core.
Hydra
Hydras launch multiple copies of tiny bombers or core clears.[\[10\]](https://en.wikipedia.org/wiki/Core_War#cite_note-10)
Quickscanner (or q-scan)
A quickscanner attempts to catch its opponent early by using a very fast unrolled scanning loop. Quickscanning is an early-game strategy, and always requires some other strategy as a backup. Adding a quickscanning component to a warrior can improve its score against long warriors such as other quickscanners. However, the unrolled scan can only target a limited number of locations, and is unlikely to catch a small opponent.
Bootstrap
Bootstraps copy one or more of their components away from their original location, leaving a decoy to attract Scanners and Quickscanners.[\[11\]](https://en.wikipedia.org/wiki/Core_War#cite_note-11)
Mixed warriors
Some warriors are of different strategies at the same or different time/times.
For example, **Stone/Imp**. **Stone/Imps** are Imps that have been paired with Stones to reduce some of the losses against paper.
Some of the most successful warriors of all time are Stone/Imps.
Core clear
A core clear sequentially overwrites every instruction in the core, sometimes even including itself. Core clears are not very common as stand-alone warriors, but are often used as an end-game strategy by bombers and scanners.
### *Core War* programming
\[[edit](https://en.wikipedia.org/w/index.php?title=Core_War&action=edit§ion=4 "Edit section: Core War programming")\]
With an understanding of *Core War* strategies, a programmer can create a warrior to achieve certain goals. Revolutionary ideas come once in a while; most of the time, however, programmers base their programs on already published warriors. Using optimizers such as OptiMax or core-step optimizer tools, a more effective warrior can be created.
Warriors can also be generated by [genetic algorithms](https://en.wikipedia.org/wiki/Genetic_algorithm "Genetic algorithm") or [genetic programming](https://en.wikipedia.org/wiki/Genetic_programming "Genetic programming"). Programs that integrate this evolutionary technique are known as *evolvers*. Several evolvers were introduced by the *Core War* community and tend to focus on generating warriors for smaller core settings. The latest evolver with significant success was *μGP*[\[12\]](https://en.wikipedia.org/wiki/Core_War#cite_note-12)[\[13\]](https://en.wikipedia.org/wiki/Core_War#cite_note-q133-13) which produced some of the most successful nano and tiny warriors. Nevertheless, evolutionary strategy still needs to prove its effectiveness on larger core settings.[\[14\]](https://en.wikipedia.org/wiki/Core_War#cite_note-14)
## Development
\[[edit](https://en.wikipedia.org/w/index.php?title=Core_War&action=edit§ion=5 "Edit section: Development")\]
*Core War* was inspired by a [self-replicating](https://en.wikipedia.org/wiki/Self-replication "Self-replication") program called [Creeper](https://en.wikipedia.org/wiki/Creeper_\(program\) "Creeper (program)") and a subsequent program called Reaper that destroyed copies of Creeper.[\[15\]](https://en.wikipedia.org/wiki/Core_War#cite_note-dewdney84-15) Creeper was created by Bob Thomas at [BBN](https://en.wikipedia.org/wiki/BBN_Technologies "BBN Technologies").[\[16\]](https://en.wikipedia.org/wiki/Core_War#cite_note-16) Dewdney was not aware of the origin of Creeper and Reaper and refers to them as a rumor originating from [Darwin](https://en.wikipedia.org/wiki/Darwin_\(programming_game\) "Darwin (programming game)") and the worm experiments of [Shoch](https://en.wikipedia.org/wiki/John_Shoch "John Shoch") and Hupp. The 1984 *[Scientific American](https://en.wikipedia.org/wiki/Scientific_American "Scientific American")* article on *Core War*[\[15\]](https://en.wikipedia.org/wiki/Core_War#cite_note-dewdney84-15) nevertheless cites the game *[Darwin](https://en.wikipedia.org/wiki/Darwin_\(programming_game\) "Darwin (programming game)")*, played by [Victor A. Vyssotsky](https://en.wikipedia.org/wiki/Victor_A._Vyssotsky "Victor A. Vyssotsky"), [Robert Morris](https://en.wikipedia.org/wiki/Robert_Morris_\(cryptographer\) "Robert Morris (cryptographer)"), and [Douglas McIlroy](https://en.wikipedia.org/wiki/Douglas_McIlroy "Douglas McIlroy") at [Bell Labs](https://en.wikipedia.org/wiki/Bell_Labs "Bell Labs") in 1961.
The word "Core" in the name comes from [magnetic-core memory](https://en.wikipedia.org/wiki/Magnetic-core_memory "Magnetic-core memory"), an obsolete [random-access memory](https://en.wikipedia.org/wiki/Random-access_memory "Random-access memory") technology. This term was then, and still today, typically in use as the term for [working memory](https://en.wikipedia.org/wiki/Working_memory "Working memory") in working memory dumps, called [core dumps](https://en.wikipedia.org/wiki/Core_dump "Core dump"), on [Unix](https://en.wikipedia.org/wiki/Unix "Unix") and most Unix-like systems. Additionally, the default filename used for core dumps on such systems is usually "core" or contains the word core.
The first description of the Redcode language was published in March 1984, in *Core War Guidelines* by D. G. Jones and [A. K. Dewdney](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney").[\[1\]](https://en.wikipedia.org/wiki/Core_War#cite_note-dewdneycwg-1) The game was introduced to the public in May 1984, in an article written by Dewdney in *Scientific American*. Dewdney revisited *Core War* in his "Computer Recreations" column in March 1985,[\[17\]](https://en.wikipedia.org/wiki/Core_War#cite_note-17) and again in January 1987.[\[18\]](https://en.wikipedia.org/wiki/Core_War#cite_note-18)
The International Core Wars Society (ICWS) was founded in 1985, one year after Dewdney's original article. The ICWS published new standards for the Redcode language in 1986 and 1988, and proposed an update in 1994 that was never formally set as the new standard.[\[19\]](https://en.wikipedia.org/wiki/Core_War#cite_note-19) Nonetheless, the 1994 draft was commonly adopted and extended, and forms the basis of the *de facto* standard for Redcode today. The ICWS was directed by Mark Clarkson (1985–1987), William R. Buckley (1987–1992), and Jon Newman (1992–); currently\[*[when?](https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Dates_and_numbers#Chronological_items "Wikipedia:Manual of Style/Dates and numbers")*\] the ICWS is defunct.[\[20\]](https://en.wikipedia.org/wiki/Core_War#cite_note-20)
### Redcode
\[[edit](https://en.wikipedia.org/w/index.php?title=Core_War&action=edit§ion=6 "Edit section: Redcode")\]
```
0000: ADD.AB # 4, $ 3
0001: MOV.F $ 2, @ 2
0002: JMP.B $ -2, $ 0
0003: DAT.F # 0, # 0
```
Assembled ICWS-94 style Redcode
Redcode is the [programming language](https://en.wikipedia.org/wiki/Programming_language "Programming language") used in *Core War*. It is executed by a [virtual machine](https://en.wikipedia.org/wiki/Virtual_machine "Virtual machine") known as a *Memory Array Redcode Simulator*, or *MARS*. The design of Redcode is loosely based on actual [CISC](https://en.wikipedia.org/wiki/Complex_instruction_set_computer "Complex instruction set computer") [assembly languages](https://en.wikipedia.org/wiki/Assembly_language "Assembly language") of the early 1980s, but contains several features\[*[vague](https://en.wikipedia.org/wiki/Wikipedia:Vagueness "Wikipedia:Vagueness")*\] not usually found in actual computer systems.
Both Redcode and the MARS environment are designed to provide a simple and abstract platform without the complexity of actual computers and processors. Although Redcode is meant to resemble an ordinary CISC assembly language, it is quite simplified relative to "real" assembly, and has no absolute memory addressing
The original 8 instructions are described as follows. Later versions added NOP, multiply and more complex comparisons.[\[21\]](https://en.wikipedia.org/wiki/Core_War#cite_note-21)
| Opcode | Mnemonic | Argument(s) | Action |
|---|---|---|---|
| 0 | DAT | B | A non-executable instruction used to store the data value B. |
| 1 | MOV | A, B | Move the contents of A to location B. |
| 2 | ADD | A, B | Add the contents of A to the contents of location B and store the result in location B. |
| 3 | SUB | A, B | Subtract the contents of A from the contents of location B and store the result in location B. |
| 4 | JMP | A | Jump to location A. |
| 5 | JMZ | A, B | If the contents of B is zero, jump to location A; otherwise, continue with the next instruction. |
| 6 | JMG | A, B | If the contents of B is greater than zero, jump to location A; otherwise, continue with the next instruction. |
| 7 | DJZ | A, B | Decrement the contents of location B by 1. If location B is now zero, jump to location A; otherwise, continue with the next instruction. |
| 8 | CMP | A, B | Compare the contents of A with the contents of B. If they're not equal, skip the next instruction; otherwise, execute the next instruction. |
The ICWS '94 draft standard added more addressing modes, mostly to deal with A-field indirection, to give a total of 8 modes:
| Mode | Action |
|---|---|
| \# | Immediate |
| \$ | Direct (the `$` may be omitted) |
| \* | A-field indirect (added in the '94 draft standard) |
| @ | B-field indirect |
| { | A-field indirect with predecrement (added in the '94 draft standard) |
| \< | B-field indirect with predecrement |
| } | A-field indirect with postincrement (added in the '94 draft standard) |
| \> | B-field indirect with postincrement (added in the '94 draft standard) |
## Implementations
\[[edit](https://en.wikipedia.org/w/index.php?title=Core_War&action=edit§ion=7 "Edit section: Implementations")\]
Development of implementations of the game continued over the years by several authors. There are multiple versions of the game available,[\[22\]](https://en.wikipedia.org/wiki/Core_War#cite_note-22) [ported](https://en.wikipedia.org/wiki/Porting "Porting") to several platforms. For instance *pMARS* which is [open source software](https://en.wikipedia.org/wiki/Open_source_software "Open source software") with [source code](https://en.wikipedia.org/wiki/Source_code "Source code") on [SourceForge](https://en.wikipedia.org/wiki/SourceForge "SourceForge"),[\[23\]](https://en.wikipedia.org/wiki/Core_War#cite_note-23) or the [SDL](https://en.wikipedia.org/wiki/Simple_Directmedia_Layer "Simple Directmedia Layer") based *SDL pMARS* for Windows.[\[24\]](https://en.wikipedia.org/wiki/Core_War#cite_note-24)
The common implementation pMars was downloaded from [SourceForge](https://en.wikipedia.org/wiki/SourceForge "SourceForge") over 35,000 times between 2000 and 2021.[\[25\]](https://en.wikipedia.org/wiki/Core_War#cite_note-25)
## References
\[[edit](https://en.wikipedia.org/w/index.php?title=Core_War&action=edit§ion=8 "Edit section: References")\]
1. ^ [***a***](https://en.wikipedia.org/wiki/Core_War#cite_ref-dewdneycwg_1-0) [***b***](https://en.wikipedia.org/wiki/Core_War#cite_ref-dewdneycwg_1-1)
Jones, D. G.; [Dewdney, A. K.](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney") (March 1984). ["Core War Guidelines"](https://corewar.co.uk/standards/cwg.txt). Retrieved 2023-05-27.
2. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-2)**
["rec.games.corewar on Google Groups"](https://groups.google.com/g/rec.games.corewar). Retrieved 2023-05-29.
3. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-wangsaw_3-0)**
Wangsaw, Mintardjo. ["Intro to Art in '88: Paper - Stone - Scissors Trilogy"](https://corewar.co.uk/mintard/index.htm). Retrieved 2023-05-27.
4. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-4)**
Pohjalainen, Jippo. ["Silk Warrior 1.3"](https://asdflkj.net/COREWAR/94/HILL32/silkwarrior13.red). Retrieved 2025-03-02.
5. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-5)**
Pohjalainen, Jippo (April 1995). ["replicators? -\> Phoenix & TimeScapesource"](https://groups.google.com/g/rec.games.corewar/c/D2q6OlEnXUo/m/9On9BfVvmU0J). Retrieved 2023-05-27.
6. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-6)**
Metcalf, John (April 2004). ["Anatomy of the Scanner, A Basic Introduction"](https://corewar.co.uk/metcalf/scanner.htm). Retrieved 2023-05-27.
7. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-7)**
van Rijn, Roy. ["Myrmidon"](https://asdflkj.net/COREWAR/94/HILL32/myrmidon.red). Retrieved 2025-03-02.
8. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-8)**
Paulsson, Magnus. ["myVamp v3.7"](https://asdflkj.net/COREWAR/94/HILL32/myvamp37.red). Retrieved 2025-03-02.
9. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-9)**
[Dewdney, A. K.](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney") ["Imp"](https://asdflkj.net/COREWAR/88/HILL32/imp.red). Retrieved 2025-03-02.
10. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-10)**
["Core War Strategy Guide"](https://corewar.co.uk/strategy.htm). Retrieved 2024-05-12.
11. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-11)**
["Core War Strategy Guide"](https://corewar.co.uk/strategy.htm). Retrieved 2025-05-12.
12. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-12)**
Squillero, Giovanni. ["μGP (MicroGP v2)"](https://github.com/squillero/microgp2/). *[GitHub](https://en.wikipedia.org/wiki/GitHub "GitHub")*. Retrieved 2018-09-10.
13. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-q133_13-0)**
Corno, F.; Sanchez, E.; Squillero, G. (2005). ["Evolving Assembly Programs: How Games Help Microprocessor Validation"](https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=6026078bb5915689d4a4efcc26d541617f53182a). *IEEE Transactions on Evolutionary Computation*. **9** (6): 695–706\. [doi](https://en.wikipedia.org/wiki/Doi_\(identifier\) "Doi (identifier)"):[10\.1109/TEVC.2005.856207](https://doi.org/10.1109%2FTEVC.2005.856207). [ISSN](https://en.wikipedia.org/wiki/ISSN_\(identifier\) "ISSN (identifier)") [1089-778X](https://search.worldcat.org/issn/1089-778X).
14. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-14)**
Vowk, Barkley; Wait, Alexander; Schmidt, Christian. ["An Evolutionary Approach Generates Human Competitive Corewar Programs"](https://corewar.co.uk/vowk/alife9ac.pdf) (PDF). Retrieved 2023-05-27.
15. ^ [***a***](https://en.wikipedia.org/wiki/Core_War#cite_ref-dewdney84_15-0) [***b***](https://en.wikipedia.org/wiki/Core_War#cite_ref-dewdney84_15-1)
[Dewdney, A. K.](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney") (May 1984). ["In the game called Core War hostile programs engage in a battle of bits"](https://corewar.co.uk/dewdney/1984-05.htm). *[Scientific American](https://en.wikipedia.org/wiki/Scientific_American "Scientific American")*. Retrieved 2023-05-27.
16. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-16)**
[Shoch, J.](https://en.wikipedia.org/wiki/John_Shoch "John Shoch"); Hupp, J. (March 1982). ["The 'Worm' Programs - Early Experience with a Distributed Computation"](https://doi.org/10.1145%2F358453.358455). *[Communications of the ACM](https://en.wikipedia.org/wiki/Communications_of_the_ACM "Communications of the ACM")*. **25** (3): 172–180\. [doi](https://en.wikipedia.org/wiki/Doi_\(identifier\) "Doi (identifier)"):[10\.1145/358453.358455](https://doi.org/10.1145%2F358453.358455). [S2CID](https://en.wikipedia.org/wiki/S2CID_\(identifier\) "S2CID (identifier)") [1639205](https://api.semanticscholar.org/CorpusID:1639205).
17. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-17)**
[Dewdney, A. K.](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney") (March 1985). ["A Core War bestiary of viruses, worms and other threats to computer memories"](https://corewar.co.uk/dewdney/1985-03.htm). *Scientific American*. Retrieved 2023-05-27.
18. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-18)**
[Dewdney, A. K.](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney") (January 1987). ["A program called MICE nibbles its way to victory at the first Core War tournament"](https://corewar.co.uk/dewdney/1987-01.htm). *Scientific American*. Retrieved 2023-05-27.
19. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-19)**
Doligez, Damien; Durham, Mark (8 November 1995). ["Annotated Draft of the Proposed 1994 Core War Standard"](https://corewar.co.uk/standards/icws94.txt). Retrieved 2023-05-27.
20. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-20)**
Metcalf, John. ["A Brief History of Corewar"](https://corewar.co.uk/history.htm). Retrieved 2023-05-27.
21. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-21)**
["The beginners' guide to Redcode, v1.23"](https://vyznev.net/corewar/guide.html#start_instr).
22. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-22)** [The Corewar Emulators](http://corewar.info/emulator.htm) on corewar.info
23. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-23)** [corewar](https://sourceforge.net/projects/corewar/) on [SourceForge](https://en.wikipedia.org/wiki/SourceForge "SourceForge")
24. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-24)** [pMARS-SDL](https://corewar.co.uk/pihlaja/pmars-sdl/index.htm) on corewar.co.uk by Joonas Pihlaja (7 May 2003)
25. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-25)** [download numbers corewar](https://sourceforge.net/projects/corewar/files/stats/timeline?dates=2000-03-01%20to%202021-06-01&period=monthly) on [SourceForge](https://en.wikipedia.org/wiki/SourceForge "SourceForge") (access 2021-06-07)
## External links
\[[edit](https://en.wikipedia.org/w/index.php?title=Core_War&action=edit§ion=9 "Edit section: External links")\]
- [Core War - the Ultimate Programming Game](https://corewar.co.uk/)
- [The Core War Info Page](http://corewar.info/)
- [The beginner's guide to Redcode](https://vyznev.net/corewar/guide.html)
- [Annotated Draft of the Proposed 1994 Core War Standard](https://corewar.co.uk/standards/icws94.htm)
- [Corewar Bibliography](https://corewar.co.uk/biblio.htm)

Retrieved from "<https://en.wikipedia.org/w/index.php?title=Core_War&oldid=1320067265>"
[Categories](https://en.wikipedia.org/wiki/Help:Category "Help:Category"):
- [1984 video games](https://en.wikipedia.org/wiki/Category:1984_video_games "Category:1984 video games")
- [Programming games](https://en.wikipedia.org/wiki/Category:Programming_games "Category:Programming games")
- [Artificial life models](https://en.wikipedia.org/wiki/Category:Artificial_life_models "Category:Artificial life models")
- [Programming contests](https://en.wikipedia.org/wiki/Category:Programming_contests "Category:Programming contests")
- [Digital organisms](https://en.wikipedia.org/wiki/Category:Digital_organisms "Category:Digital organisms")
- [Open-source video games](https://en.wikipedia.org/wiki/Category:Open-source_video_games "Category:Open-source video games")
- [Video games with available source code](https://en.wikipedia.org/wiki/Category:Video_games_with_available_source_code "Category:Video games with available source code")
- [Freeware games](https://en.wikipedia.org/wiki/Category:Freeware_games "Category:Freeware games")
- [Linux games](https://en.wikipedia.org/wiki/Category:Linux_games "Category:Linux games")
- [Windows games](https://en.wikipedia.org/wiki/Category:Windows_games "Category:Windows games")
- [Video games developed in Canada](https://en.wikipedia.org/wiki/Category:Video_games_developed_in_Canada "Category:Video games developed in Canada")
Hidden categories:
- [Articles with short description](https://en.wikipedia.org/wiki/Category:Articles_with_short_description "Category:Articles with short description")
- [Short description is different from Wikidata](https://en.wikipedia.org/wiki/Category:Short_description_is_different_from_Wikidata "Category:Short description is different from Wikidata")
- [All articles with vague or ambiguous time](https://en.wikipedia.org/wiki/Category:All_articles_with_vague_or_ambiguous_time "Category:All articles with vague or ambiguous time")
- [Vague or ambiguous time from May 2024](https://en.wikipedia.org/wiki/Category:Vague_or_ambiguous_time_from_May_2024 "Category:Vague or ambiguous time from May 2024")
- [All Wikipedia articles needing clarification](https://en.wikipedia.org/wiki/Category:All_Wikipedia_articles_needing_clarification "Category:All Wikipedia articles needing clarification")
- [Wikipedia articles needing clarification from May 2021](https://en.wikipedia.org/wiki/Category:Wikipedia_articles_needing_clarification_from_May_2021 "Category:Wikipedia articles needing clarification from May 2021")
- This page was last edited on 2 November 2025, at 14:53 (UTC).
- Text is available under the [Creative Commons Attribution-ShareAlike 4.0 License](https://en.wikipedia.org/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License "Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License"); additional terms may apply. By using this site, you agree to the [Terms of Use](https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use "foundation:Special:MyLanguage/Policy:Terms of Use") and [Privacy Policy](https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy "foundation:Special:MyLanguage/Policy:Privacy policy"). Wikipedia® is a registered trademark of the [Wikimedia Foundation, Inc.](https://wikimediafoundation.org/), a non-profit organization.
- [Privacy policy](https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy)
- [About Wikipedia](https://en.wikipedia.org/wiki/Wikipedia:About)
- [Disclaimers](https://en.wikipedia.org/wiki/Wikipedia:General_disclaimer)
- [Contact Wikipedia](https://en.wikipedia.org/wiki/Wikipedia:Contact_us)
- [Legal & safety contacts](https://foundation.wikimedia.org/wiki/Special:MyLanguage/Legal:Wikimedia_Foundation_Legal_and_Safety_Contact_Information)
- [Code of Conduct](https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct)
- [Developers](https://developer.wikimedia.org/)
- [Statistics](https://stats.wikimedia.org/#/en.wikipedia.org)
- [Cookie statement](https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement)
- [Mobile view](https://en.wikipedia.org/w/index.php?title=Core_War&mobileaction=toggle_view_mobile)
- [](https://www.wikimedia.org/)
- [](https://www.mediawiki.org/)
Search
Toggle the table of contents
Core War
13 languages
[Add topic](https://en.wikipedia.org/wiki/Core_War) |
| Readable Markdown | From Wikipedia, the free encyclopedia
| Core War | |
|---|---|
| [](https://en.wikipedia.org/wiki/File:Core_War_PMars_Screenshot.png)Running under the pMARS simulator | |
| [Developers](https://en.wikipedia.org/wiki/Programmer "Programmer") | D. G. Jones & [A. K. Dewdney](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney") |
| Initial release | 1 March 1984; 42 years ago |
| [Type](https://en.wikipedia.org/wiki/Software_categories#Categorization_approaches "Software categories") | [Programming game](https://en.wikipedia.org/wiki/Programming_game "Programming game") |
| Website | [corewar.co.uk](https://corewar.co.uk/) |
***Core War*** is a [programming game](https://en.wikipedia.org/wiki/Programming_game "Programming game") introduced in 1984 by D. G. Jones and [A. K. Dewdney](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney"). In the game, two or more battle programs, known as *warriors*, compete for control of a [virtual computer](https://en.wikipedia.org/wiki/Virtual_machine "Virtual machine"). These programs are written in an abstract [assembly language](https://en.wikipedia.org/wiki/Assembly_language "Assembly language") called *Redcode*. Initial standards for Redcode and the virtual machine were established by the International Core Wars Society (ICWS), with later revisions shaped by community consensus.
At the start of a match, each warrior is loaded into a random memory location. Programs take turns executing one instruction at a time. A program wins by terminating all opponents, typically by causing them to execute invalid instructions, leaving the victorious program in sole possession of the machine.
Early versions of Redcode featured only eight instructions. This number increased to 10 in the ICWS-86 standard, 11 in ICWS-88, and 16 in the 1994 draft standard, which is still widely used. With various [addressing modes](https://en.wikipedia.org/wiki/Addressing_mode "Addressing mode") and instruction modifiers introduced in the 1994 draft, the total number of possible operations is 7168. Redcode does not define how instructions are represented in memory, nor does it allow programs to inspect their own code structure beyond copying and equality comparisons. Arithmetic operations are limited to the instruction’s two address fields.
Constant instruction length and time
Each Redcode instruction occupies exactly one memory slot and takes exactly one cycle to execute. The rate at which a process executes instructions, however, depends on the number of other processes in the queue, as processing time is shared equally.
Circular memory
The memory is addressed in units of one instruction. The memory space (or *core*) is of finite size, but only [relative addressing](https://en.wikipedia.org/wiki/Relative_address "Relative address") is used, that is, address *0* always refers to the currently executing instruction, address *1* to the instruction after it, and so on. The maximum address value is set to equal one less than the number of memory locations and will wrap around if necessary. As a result, there is a one-to-one correspondence between addresses and memory locations, but it is impossible for a Redcode program to determine any absolute address. A process that encounters no invalid or jump instructions will continue executing successive instructions endlessly, eventually returning to the instruction where it started.
Low-level multiprocessing
Instead of a single [instruction pointer](https://en.wikipedia.org/wiki/Instruction_pointer "Instruction pointer") a Redcode simulator has a *process queue* for each program containing a variable number of instruction pointers which the simulator cycles through. Each program starts with only one process, but new processes may be added to the queue using the `SPL` instruction. A process dies when it executes a DAT instruction or performs a [division by zero](https://en.wikipedia.org/wiki/Division_by_zero "Division by zero"). A program is considered dead when it has no more processes left.
No external access
Redcode and the MARS architecture provide no input or output functions. The simulator is a closed system, with the only input being the initial values of the memory and the process queues, and the only output being the outcome of the battle, i.e., which programs had surviving processes. Of course, the simulator may still allow external inspections and modification of the memory while the simulation is running.
### Versions of Redcode
\[[edit](https://en.wikipedia.org/w/index.php?title=Core_War&action=edit§ion=2 "Edit section: Versions of Redcode")\]
A number of versions of Redcode exist. The earliest version described by [A. K. Dewdney](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney")[\[1\]](https://en.wikipedia.org/wiki/Core_War#cite_note-dewdneycwg-1) differs in many respects from the later standards established by the International Core War Society, and could be considered a different, albeit related, language. The form of Redcode most commonly used today is based on a draft standard submitted to the ICWS in 1994 that was never formally accepted, as the ICWS had become effectively defunct around that time. Development of Redcode, however, has continued in an informal manner, chiefly via online forums such as the `rec.games.corewar`[\[2\]](https://en.wikipedia.org/wiki/Core_War#cite_note-2) [newsgroup](https://en.wikipedia.org/wiki/Newsgroup "Newsgroup").
Warriors are commonly divided into a number of broad categories, although actual warriors may often combine the behavior of two or more of these. Three of the common strategies (*replicator*, *scanner* and *bomber*) are also known as [paper, scissors and stone](https://en.wikipedia.org/wiki/Rock_paper_scissors "Rock paper scissors"), since their performance against each other approximates that of their namesakes in the well-known playground game.[\[3\]](https://en.wikipedia.org/wiki/Core_War#cite_note-wangsaw-3)
Paper (or replicator)
A replicator makes repeated copies of itself and executes them in parallel, eventually filling the entire core with copies of its code. Replicators are hard to kill, but often have difficulty killing their opponents. Replicators therefore tend to score a lot of ties, particularly against other replicators.
A **silk** is a special type of very rapid replicator, named after *Silk Warrior*[\[4\]](https://en.wikipedia.org/wiki/Core_War#cite_note-4) by Juha Pohjalainen. Most modern replicators are of this type. Silk replicators use parallel execution to copy their entire code with one instruction, and begin execution of the copy before it is finished.[\[5\]](https://en.wikipedia.org/wiki/Core_War#cite_note-5)
Scissors (or scanner)
A scanner is designed to beat replicators. A scanner does not attack blindly, but tries to locate its enemy before launching a targeted attack. This makes it more effective against hard-to-kill opponents like replicators, but also leaves it vulnerable to decoys. A scanner usually bombs memory with SPL 0 instructions. This causes the enemy to create a huge number of processes which do nothing but create more processes, slowing down useful processes. When the enemy becomes so slow that it is unable to do anything useful, the memory is then bombed with DAT instructions. Scanners are also generally more complex, and therefore are larger and more fragile, than other types of warriors.[\[6\]](https://en.wikipedia.org/wiki/Core_War#cite_note-6)
A **one-shot** is a very simple scanner that only scans the core until it finds the first target, and then permanently switches to an attack strategy, usually a core clear. *Myrmidon*[\[7\]](https://en.wikipedia.org/wiki/Core_War#cite_note-7) by Roy van Rijn is an example of a oneshot.
Stone (or bomber)
A bomber blindly copies a "bomb" at regular intervals in the core, hoping to hit the enemy. The bomb is often a DAT instruction, although other instructions, or even multi-instruction bombs, may be used. A bomber can be small and fast, and they gain an extra edge over scanning opponents since the bombs also serve as convenient distractions. Bombers are often combined with imp spirals to gain extra resiliency against replicators.
Vampire (or pit-trapper)
A vampire tries to make its opponent's processes jump into a piece of its own code called a "pit". Vampires can be based on either bombers or scanners. A major weakness of vampires is that they can be easily attacked indirectly, since they must by necessity scatter pointers to their code all over the core. Their attacks are also slow, as it takes an extra round for the processes to reach the pit. *myVamp*[\[8\]](https://en.wikipedia.org/wiki/Core_War#cite_note-8) by Paulsson is an example of a vampire.
Imp
Imps are named after the first ever published warrior, *Imp*[\[9\]](https://en.wikipedia.org/wiki/Core_War#cite_note-9) by [A. K. Dewdney](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney"), a trivial one-instruction mobile warrior that continually copies its sole instruction just ahead of its [instruction pointer](https://en.wikipedia.org/wiki/Instruction_pointer "Instruction pointer"). Imps are hard to kill but next to useless for offense. Their use lies in the fact that they can easily be spawned in large numbers, and may survive even if the rest of the warriors are killed.
An **imp ring** (or **imp spiral**) consists of imps spaced at equal intervals around the core and executing alternately. The imps at each arm of the ring/spiral copy their instructions to the next arm, where it is immediately executed again. Rings and spirals are even harder to kill than simple imps, and they even have a (small) chance of killing warriors not protected against them. The number of arms in an imp ring or spiral must be [relatively prime](https://en.wikipedia.org/wiki/Coprime "Coprime") with the size of the core.
Hydra
Hydras launch multiple copies of tiny bombers or core clears.[\[10\]](https://en.wikipedia.org/wiki/Core_War#cite_note-10)
Quickscanner (or q-scan)
A quickscanner attempts to catch its opponent early by using a very fast unrolled scanning loop. Quickscanning is an early-game strategy, and always requires some other strategy as a backup. Adding a quickscanning component to a warrior can improve its score against long warriors such as other quickscanners. However, the unrolled scan can only target a limited number of locations, and is unlikely to catch a small opponent.
Bootstrap
Bootstraps copy one or more of their components away from their original location, leaving a decoy to attract Scanners and Quickscanners.[\[11\]](https://en.wikipedia.org/wiki/Core_War#cite_note-11)
Mixed warriors
Some warriors are of different strategies at the same or different time/times.
For example, **Stone/Imp**. **Stone/Imps** are Imps that have been paired with Stones to reduce some of the losses against paper.
Some of the most successful warriors of all time are Stone/Imps.
Core clear
A core clear sequentially overwrites every instruction in the core, sometimes even including itself. Core clears are not very common as stand-alone warriors, but are often used as an end-game strategy by bombers and scanners.
### *Core War* programming
\[[edit](https://en.wikipedia.org/w/index.php?title=Core_War&action=edit§ion=4 "Edit section: Core War programming")\]
With an understanding of *Core War* strategies, a programmer can create a warrior to achieve certain goals. Revolutionary ideas come once in a while; most of the time, however, programmers base their programs on already published warriors. Using optimizers such as OptiMax or core-step optimizer tools, a more effective warrior can be created.
Warriors can also be generated by [genetic algorithms](https://en.wikipedia.org/wiki/Genetic_algorithm "Genetic algorithm") or [genetic programming](https://en.wikipedia.org/wiki/Genetic_programming "Genetic programming"). Programs that integrate this evolutionary technique are known as *evolvers*. Several evolvers were introduced by the *Core War* community and tend to focus on generating warriors for smaller core settings. The latest evolver with significant success was *μGP*[\[12\]](https://en.wikipedia.org/wiki/Core_War#cite_note-12)[\[13\]](https://en.wikipedia.org/wiki/Core_War#cite_note-q133-13) which produced some of the most successful nano and tiny warriors. Nevertheless, evolutionary strategy still needs to prove its effectiveness on larger core settings.[\[14\]](https://en.wikipedia.org/wiki/Core_War#cite_note-14)
*Core War* was inspired by a [self-replicating](https://en.wikipedia.org/wiki/Self-replication "Self-replication") program called [Creeper](https://en.wikipedia.org/wiki/Creeper_\(program\) "Creeper (program)") and a subsequent program called Reaper that destroyed copies of Creeper.[\[15\]](https://en.wikipedia.org/wiki/Core_War#cite_note-dewdney84-15) Creeper was created by Bob Thomas at [BBN](https://en.wikipedia.org/wiki/BBN_Technologies "BBN Technologies").[\[16\]](https://en.wikipedia.org/wiki/Core_War#cite_note-16) Dewdney was not aware of the origin of Creeper and Reaper and refers to them as a rumor originating from [Darwin](https://en.wikipedia.org/wiki/Darwin_\(programming_game\) "Darwin (programming game)") and the worm experiments of [Shoch](https://en.wikipedia.org/wiki/John_Shoch "John Shoch") and Hupp. The 1984 *[Scientific American](https://en.wikipedia.org/wiki/Scientific_American "Scientific American")* article on *Core War*[\[15\]](https://en.wikipedia.org/wiki/Core_War#cite_note-dewdney84-15) nevertheless cites the game *[Darwin](https://en.wikipedia.org/wiki/Darwin_\(programming_game\) "Darwin (programming game)")*, played by [Victor A. Vyssotsky](https://en.wikipedia.org/wiki/Victor_A._Vyssotsky "Victor A. Vyssotsky"), [Robert Morris](https://en.wikipedia.org/wiki/Robert_Morris_\(cryptographer\) "Robert Morris (cryptographer)"), and [Douglas McIlroy](https://en.wikipedia.org/wiki/Douglas_McIlroy "Douglas McIlroy") at [Bell Labs](https://en.wikipedia.org/wiki/Bell_Labs "Bell Labs") in 1961.
The word "Core" in the name comes from [magnetic-core memory](https://en.wikipedia.org/wiki/Magnetic-core_memory "Magnetic-core memory"), an obsolete [random-access memory](https://en.wikipedia.org/wiki/Random-access_memory "Random-access memory") technology. This term was then, and still today, typically in use as the term for [working memory](https://en.wikipedia.org/wiki/Working_memory "Working memory") in working memory dumps, called [core dumps](https://en.wikipedia.org/wiki/Core_dump "Core dump"), on [Unix](https://en.wikipedia.org/wiki/Unix "Unix") and most Unix-like systems. Additionally, the default filename used for core dumps on such systems is usually "core" or contains the word core.
The first description of the Redcode language was published in March 1984, in *Core War Guidelines* by D. G. Jones and [A. K. Dewdney](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney").[\[1\]](https://en.wikipedia.org/wiki/Core_War#cite_note-dewdneycwg-1) The game was introduced to the public in May 1984, in an article written by Dewdney in *Scientific American*. Dewdney revisited *Core War* in his "Computer Recreations" column in March 1985,[\[17\]](https://en.wikipedia.org/wiki/Core_War#cite_note-17) and again in January 1987.[\[18\]](https://en.wikipedia.org/wiki/Core_War#cite_note-18)
The International Core Wars Society (ICWS) was founded in 1985, one year after Dewdney's original article. The ICWS published new standards for the Redcode language in 1986 and 1988, and proposed an update in 1994 that was never formally set as the new standard.[\[19\]](https://en.wikipedia.org/wiki/Core_War#cite_note-19) Nonetheless, the 1994 draft was commonly adopted and extended, and forms the basis of the *de facto* standard for Redcode today. The ICWS was directed by Mark Clarkson (1985–1987), William R. Buckley (1987–1992), and Jon Newman (1992–); currently\[*[when?](https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Dates_and_numbers#Chronological_items "Wikipedia:Manual of Style/Dates and numbers")*\] the ICWS is defunct.[\[20\]](https://en.wikipedia.org/wiki/Core_War#cite_note-20)
```
0000: ADD.AB # 4, $ 3
0001: MOV.F $ 2, @ 2
0002: JMP.B $ -2, $ 0
0003: DAT.F # 0, # 0
```
Assembled ICWS-94 style Redcode
Redcode is the [programming language](https://en.wikipedia.org/wiki/Programming_language "Programming language") used in *Core War*. It is executed by a [virtual machine](https://en.wikipedia.org/wiki/Virtual_machine "Virtual machine") known as a *Memory Array Redcode Simulator*, or *MARS*. The design of Redcode is loosely based on actual [CISC](https://en.wikipedia.org/wiki/Complex_instruction_set_computer "Complex instruction set computer") [assembly languages](https://en.wikipedia.org/wiki/Assembly_language "Assembly language") of the early 1980s, but contains several features\[*[vague](https://en.wikipedia.org/wiki/Wikipedia:Vagueness "Wikipedia:Vagueness")*\] not usually found in actual computer systems.
Both Redcode and the MARS environment are designed to provide a simple and abstract platform without the complexity of actual computers and processors. Although Redcode is meant to resemble an ordinary CISC assembly language, it is quite simplified relative to "real" assembly, and has no absolute memory addressing
The original 8 instructions are described as follows. Later versions added NOP, multiply and more complex comparisons.[\[21\]](https://en.wikipedia.org/wiki/Core_War#cite_note-21)
| Opcode | Mnemonic | Argument(s) | Action |
|---|---|---|---|
| 0 | DAT | B | A non-executable instruction used to store the data value B. |
| 1 | MOV | A, B | Move the contents of A to location B. |
| 2 | ADD | A, B | Add the contents of A to the contents of location B and store the result in location B. |
| 3 | SUB | A, B | Subtract the contents of A from the contents of location B and store the result in location B. |
| 4 | JMP | A | Jump to location A. |
| 5 | JMZ | A, B | If the contents of B is zero, jump to location A; otherwise, continue with the next instruction. |
| 6 | JMG | A, B | If the contents of B is greater than zero, jump to location A; otherwise, continue with the next instruction. |
| 7 | DJZ | A, B | Decrement the contents of location B by 1. If location B is now zero, jump to location A; otherwise, continue with the next instruction. |
| 8 | CMP | A, B | Compare the contents of A with the contents of B. If they're not equal, skip the next instruction; otherwise, execute the next instruction. |
The ICWS '94 draft standard added more addressing modes, mostly to deal with A-field indirection, to give a total of 8 modes:
| Mode | Action |
|---|---|
| \# | Immediate |
| \$ | Direct (the `$` may be omitted) |
| \* | A-field indirect (added in the '94 draft standard) |
| @ | B-field indirect |
| { | A-field indirect with predecrement (added in the '94 draft standard) |
| \< | B-field indirect with predecrement |
| } | A-field indirect with postincrement (added in the '94 draft standard) |
| \> | B-field indirect with postincrement (added in the '94 draft standard) |
Development of implementations of the game continued over the years by several authors. There are multiple versions of the game available,[\[22\]](https://en.wikipedia.org/wiki/Core_War#cite_note-22) [ported](https://en.wikipedia.org/wiki/Porting "Porting") to several platforms. For instance *pMARS* which is [open source software](https://en.wikipedia.org/wiki/Open_source_software "Open source software") with [source code](https://en.wikipedia.org/wiki/Source_code "Source code") on [SourceForge](https://en.wikipedia.org/wiki/SourceForge "SourceForge"),[\[23\]](https://en.wikipedia.org/wiki/Core_War#cite_note-23) or the [SDL](https://en.wikipedia.org/wiki/Simple_Directmedia_Layer "Simple Directmedia Layer") based *SDL pMARS* for Windows.[\[24\]](https://en.wikipedia.org/wiki/Core_War#cite_note-24)
The common implementation pMars was downloaded from [SourceForge](https://en.wikipedia.org/wiki/SourceForge "SourceForge") over 35,000 times between 2000 and 2021.[\[25\]](https://en.wikipedia.org/wiki/Core_War#cite_note-25)
1. ^ [***a***](https://en.wikipedia.org/wiki/Core_War#cite_ref-dewdneycwg_1-0) [***b***](https://en.wikipedia.org/wiki/Core_War#cite_ref-dewdneycwg_1-1)
Jones, D. G.; [Dewdney, A. K.](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney") (March 1984). ["Core War Guidelines"](https://corewar.co.uk/standards/cwg.txt). Retrieved 2023-05-27.
2. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-2)**
["rec.games.corewar on Google Groups"](https://groups.google.com/g/rec.games.corewar). Retrieved 2023-05-29.
3. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-wangsaw_3-0)**
Wangsaw, Mintardjo. ["Intro to Art in '88: Paper - Stone - Scissors Trilogy"](https://corewar.co.uk/mintard/index.htm). Retrieved 2023-05-27.
4. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-4)**
Pohjalainen, Jippo. ["Silk Warrior 1.3"](https://asdflkj.net/COREWAR/94/HILL32/silkwarrior13.red). Retrieved 2025-03-02.
5. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-5)**
Pohjalainen, Jippo (April 1995). ["replicators? -\> Phoenix & TimeScapesource"](https://groups.google.com/g/rec.games.corewar/c/D2q6OlEnXUo/m/9On9BfVvmU0J). Retrieved 2023-05-27.
6. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-6)**
Metcalf, John (April 2004). ["Anatomy of the Scanner, A Basic Introduction"](https://corewar.co.uk/metcalf/scanner.htm). Retrieved 2023-05-27.
7. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-7)**
van Rijn, Roy. ["Myrmidon"](https://asdflkj.net/COREWAR/94/HILL32/myrmidon.red). Retrieved 2025-03-02.
8. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-8)**
Paulsson, Magnus. ["myVamp v3.7"](https://asdflkj.net/COREWAR/94/HILL32/myvamp37.red). Retrieved 2025-03-02.
9. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-9)**
[Dewdney, A. K.](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney") ["Imp"](https://asdflkj.net/COREWAR/88/HILL32/imp.red). Retrieved 2025-03-02.
10. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-10)**
["Core War Strategy Guide"](https://corewar.co.uk/strategy.htm). Retrieved 2024-05-12.
11. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-11)**
["Core War Strategy Guide"](https://corewar.co.uk/strategy.htm). Retrieved 2025-05-12.
12. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-12)**
Squillero, Giovanni. ["μGP (MicroGP v2)"](https://github.com/squillero/microgp2/). *[GitHub](https://en.wikipedia.org/wiki/GitHub "GitHub")*. Retrieved 2018-09-10.
13. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-q133_13-0)**
Corno, F.; Sanchez, E.; Squillero, G. (2005). ["Evolving Assembly Programs: How Games Help Microprocessor Validation"](https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=6026078bb5915689d4a4efcc26d541617f53182a). *IEEE Transactions on Evolutionary Computation*. **9** (6): 695–706\. [doi](https://en.wikipedia.org/wiki/Doi_\(identifier\) "Doi (identifier)"):[10\.1109/TEVC.2005.856207](https://doi.org/10.1109%2FTEVC.2005.856207). [ISSN](https://en.wikipedia.org/wiki/ISSN_\(identifier\) "ISSN (identifier)") [1089-778X](https://search.worldcat.org/issn/1089-778X).
14. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-14)**
Vowk, Barkley; Wait, Alexander; Schmidt, Christian. ["An Evolutionary Approach Generates Human Competitive Corewar Programs"](https://corewar.co.uk/vowk/alife9ac.pdf) (PDF). Retrieved 2023-05-27.
15. ^ [***a***](https://en.wikipedia.org/wiki/Core_War#cite_ref-dewdney84_15-0) [***b***](https://en.wikipedia.org/wiki/Core_War#cite_ref-dewdney84_15-1)
[Dewdney, A. K.](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney") (May 1984). ["In the game called Core War hostile programs engage in a battle of bits"](https://corewar.co.uk/dewdney/1984-05.htm). *[Scientific American](https://en.wikipedia.org/wiki/Scientific_American "Scientific American")*. Retrieved 2023-05-27.
16. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-16)**
[Shoch, J.](https://en.wikipedia.org/wiki/John_Shoch "John Shoch"); Hupp, J. (March 1982). ["The 'Worm' Programs - Early Experience with a Distributed Computation"](https://doi.org/10.1145%2F358453.358455). *[Communications of the ACM](https://en.wikipedia.org/wiki/Communications_of_the_ACM "Communications of the ACM")*. **25** (3): 172–180\. [doi](https://en.wikipedia.org/wiki/Doi_\(identifier\) "Doi (identifier)"):[10\.1145/358453.358455](https://doi.org/10.1145%2F358453.358455). [S2CID](https://en.wikipedia.org/wiki/S2CID_\(identifier\) "S2CID (identifier)") [1639205](https://api.semanticscholar.org/CorpusID:1639205).
17. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-17)**
[Dewdney, A. K.](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney") (March 1985). ["A Core War bestiary of viruses, worms and other threats to computer memories"](https://corewar.co.uk/dewdney/1985-03.htm). *Scientific American*. Retrieved 2023-05-27.
18. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-18)**
[Dewdney, A. K.](https://en.wikipedia.org/wiki/A._K._Dewdney "A. K. Dewdney") (January 1987). ["A program called MICE nibbles its way to victory at the first Core War tournament"](https://corewar.co.uk/dewdney/1987-01.htm). *Scientific American*. Retrieved 2023-05-27.
19. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-19)**
Doligez, Damien; Durham, Mark (8 November 1995). ["Annotated Draft of the Proposed 1994 Core War Standard"](https://corewar.co.uk/standards/icws94.txt). Retrieved 2023-05-27.
20. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-20)**
Metcalf, John. ["A Brief History of Corewar"](https://corewar.co.uk/history.htm). Retrieved 2023-05-27.
21. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-21)**
["The beginners' guide to Redcode, v1.23"](https://vyznev.net/corewar/guide.html#start_instr).
22. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-22)** [The Corewar Emulators](http://corewar.info/emulator.htm) on corewar.info
23. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-23)** [corewar](https://sourceforge.net/projects/corewar/) on [SourceForge](https://en.wikipedia.org/wiki/SourceForge "SourceForge")
24. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-24)** [pMARS-SDL](https://corewar.co.uk/pihlaja/pmars-sdl/index.htm) on corewar.co.uk by Joonas Pihlaja (7 May 2003)
25. **[^](https://en.wikipedia.org/wiki/Core_War#cite_ref-25)** [download numbers corewar](https://sourceforge.net/projects/corewar/files/stats/timeline?dates=2000-03-01%20to%202021-06-01&period=monthly) on [SourceForge](https://en.wikipedia.org/wiki/SourceForge "SourceForge") (access 2021-06-07)
- [Core War - the Ultimate Programming Game](https://corewar.co.uk/)
- [The Core War Info Page](http://corewar.info/)
- [The beginner's guide to Redcode](https://vyznev.net/corewar/guide.html)
- [Annotated Draft of the Proposed 1994 Core War Standard](https://corewar.co.uk/standards/icws94.htm)
- [Corewar Bibliography](https://corewar.co.uk/biblio.htm) |
| Shard | 152 (laksa) |
| Root Hash | 17790707453426894952 |
| Unparsed URL | org,wikipedia!en,/wiki/Core_War s443 |