🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.corewar
Article #309

Core War Frequently Asked Questions (rec.games.corewar FAQ)

#309
From: Stefan Strack
Date: Fri, 25 Jun 1993 04:00
510 lines
23001 bytes
Archive-name: games/corewar-faq
Last-modified: 1993/04/16
Version: 2.0.4

These are the Frequently Asked Questions (and answers) from the USENET
newsgroup rec.games.corewar. This FAQ list is also available by anonymous FTP
from rtfm.mit.edu as pub/usenet/news.answers/games/corewar-faq.Z.


TABLE OF CONTENTS                                                   Line
------------------------------------------------------------------------

 1. What is Core War?                                                 67

 2. Is it Core War or Core Wars?                                      80

 3. Where can I find more information about Core War?                 88

 4. Core War has changed since Dewdney's articles. Where do I get    106
    a copy of the current instruction set?

 5. What is the ICWS?                                                120

 6. What is TCWN?                                                    130

 7. How do I join?                                                   138

 8. Are back issues of TCWNs available?                              158

 9. What is the EBS?                                                 165

10. Where are the Core War archives?                                 181

11. Where can I find a Core War system for . . . ?                   198

12. I do not have ftp.  How do I get all of this great stuff?        215

13. I do not have access to Usenet.  How do I post and receive news? 222

14. When is the next tournament?                                     243

15. What is KOTH?  How do I enter?                                   252

16. Is it DAT 0, 0 or DAT #0, #0?  How do I compare to core?         357

17. How does SLT (Skip if Less Than) work?                           369

18. What does (expression or term of your choice) mean?              381

19. Other questions?                                                 509

---------------------------------------------------------------------

Q 1: What is Core War?
A 1: Core War is a game played by two or more programs (and vicariously
by their authors) written in an assembly language called Redcode and
run in a virtual computer called MARS (for Memory Array Redcode Simulator).
The object of the game is to cause all of the opposing programs to
terminate, leaving your program in sole posession of the machine.

There are Core War systems available for most computer platforms.
Redcode has been standardized by the ICWS, and is therefore transportable
between all standard Core War systems.

----------------------------------------------------------------------

Q 2: Is it "Core War" or "Core Wars"?
A 2: Both terms are used.  Early references were to Core War.  Later
references seem to use Core Wars.  I prefer "Core War" to refer to
the game in general, "core wars" to refer to more than one specific
battle.

----------------------------------------------------------------------

Q 3: Where can I find more information about Core War?
A 3: Core War was first described in the "Core War Guidelines" of March,
1984 by D. G. Jones and A. K. Dewdney of the Department of Computer
Science at The University of Western Ontario (Canada).  Dewdney wrote
several "Computer Recreations" articles in "Scientific American" which
discussed Core War, starting with the May 1984 article.  Those articles
are contained in an anthology:

Author: Dewdney, A. K.
Title: The Armchair Universe: An Exploration of Computer Worlds
Published: New York: W. H. Freeman (c) 1988
ISBN: 0-7167-1939-8
Library of Congress Call Number: QA76.6 .D517 1988

The Redcode language has changed somewhat since; see Q 4.

---------------------------------------------------------------------

Q 4: Core War has changed since Dewdney's articles. Where do I get a
copy of the current instruction set?
A 4: A draft of the official standard (ICWS'88) is available by anonymous
FTP from the Core War archives (soda.berkeley.edu) as
pub/corewar/documents/standards/redcode-icws-88.Z

This document is formatted awkwardly and contains ambiguous statements. For a
more approachable intro to Redcode, take a look at
pub/corewar/documents/tutorial.1.Z
                      tutorial.2.Z
(See also Q10)

---------------------------------------------------------------------

Q 5: What is the ICWS?
A 5: About one year after Core War first appeared in Sci-Am, the
"International Core War Society" (ICWS) was established.  Since that
time, the ICWS has been responsible for the creation and maintenance
of Core War standards and the running of Core War tournaments.  There
have been six annual tournaments and two standards (ICWS'86 and
ICWS'88).

---------------------------------------------------------------------

Q 6: What is TCWN?
A 6: Since March of 1987, "The Core War Newsletter" (TCWN) has been the
official newsletter of the ICWS.  It is published quarterly and recent
issues are also available as Encapsulated PostScript on soda.berkeley.edu
(see Q9).

---------------------------------------------------------------------

Q 7: How do I join?
A 7: For more information about joining the ICWS (which includes a
subscription to TCWN), contact:

A 7: For more information about joining the ICWS (which includes a
subscription to TCWN), or to contribute an article, review, cartoon, letter,
joke, rumor, etc. to TCWN, please contact:

   Jon Newman
   13824 NE 87th Street
   Redmond, WA 98052-1959
   email: jonn@microsoft.com  (Note: Microsoft has NO affiliation with
                                     Core War.  Jon Newman just happens
                                     to work there, and we want to keep
                                     it that way!)

Current annual dues are $15.00 in US currency.

----------------------------------------------------------------------

Q 8: Are back issues of TCWN available?
A 8: Recent issues can be found on soda.berkeley.edu (see Q10).
Older issues (up to Winter 1991) are also available (see the next TCWN
for details).

---------------------------------------------------------------------

Q 9: What is the EBS?
A 9: The Electronic Branch Section (EBS) of the ICWS is a group of
Core War enthusiasts with access to electronic mail.  There are no fees
associated with being a member of the EBS, and members do reap some of
the benefits of full ICWS membership without the expense.  For instance,
the ten best warriors submitted to the EBS tournament are entered
into the annual ICWS tournament.  All EBS business is conducted in the
rec.games.corewar newsgroup.

The current goal of the EBS is to be at the forefront of Core War by
writing and implementing new standards and test suites in preparation for
the tenth anniversary of Core War in May of 1994.  Its immediate business
will be to set up a Charter and establish its officers.

----------------------------------------------------------------------

A10: Where is the Core War archive?
Q10: Many documents such as the guidelines and the ICWS standards 
along with previous tournament Redcode entries and complete Core War
systems are available via anonymous ftp from soda.berkeley.edu 
(128.32.149.19) in the /pub/corewar directories.  Also, most of past 
rec.games.corewar postings (including Redcode source listings) are 
archived there.  Jon Blow (blojo@soda.berkeley.edu) is the archive 
administrator.

Much of what is available on soda is also available on the German archive
at iraun1.ira.uka.de (129.13.10.90) in the /pub/X11/corewars directory.

This FAQ is automatically archived by news.answers.  See the header for
the current archive name and news.answers for how to get it.

----------------------------------------------------------------------

Q11: Where can I find a Core War system for . . . ?
A11: Core War systems are available via anonymous ftp from
soda.berkeley.edu in the pub/corewar/systems directory.
Currently, there are Unix X-Window, IBM PC-compatible (sorry, no systems
specifically designed for MS-Windows yet), Macintosh, and Amiga
Core War systems available there.

CAUTION!  There are many, many Core War systems available which are NOT
ICWS'88 (or even ICWS'86) compatible available at various archive sites
other than soda.berkeley.edu.  Generally, the older the program - the less
likely it will be ICWS compatible.

Reviews of Core War systems would be greatly appreciated in the newsgroup
and in the newsletter.

----------------------------------------------------------------------

Q12: I do not have ftp.  How do I get all of this great stuff?
A12: There is an ftp email server at ftpmail@decwrl.dec.com.  Send
email with a subject and body text of "help" (without the quotes) for
more information on its usage.

----------------------------------------------------------------------

Q13: I do not have access to Usenet.  How do I post and receive news?
A13: If you have access to telnet, you can read rec.games.corewar (and
many more groups) through the gopher information retrieval system. Telnet to
consultant.micro.umn.edu (134.84.132.4) or any of the other gopher servers
and go through these menus:

        1  - Information about Gopher
        10 - Gopher+ example server
        11 - non-Gopher+ link
        7  - News
        11 - USENET news
        24 - rec
        21 - games
        6  - corewar

If you somehow receive rec.games.corewar but just can't post, you can email
your post to rec-games-corewar@cs.utexas.edu and it will be automatically
posted for you.

----------------------------------------------------------------------

Q14: When is the next tournament?
A14: The ICWS holds an annual tournament.  Traditionally, the deadline
for entering is the 15th of December.

The EBS usually holds a preliminary tournament around the 15th of November
and sends the top finishers on to the ICWS tournament.

----------------------------------------------------------------------

Q15: What is KOTH?  How do I enter?
A15: King Of The Hill (KOTH) is an ongoing Core War tournament available
to anyone with email provided by William Shubert (wms@iwarp.intel.com).  You
enter by submitting via email a Redcode program with special comment lines.
You will receive a reply indicating how well your program did against the
current top twenty programs "on the hill".  Your program will play 100
battles against each of the 20 other programs currently on the Hill. You
receive 3 points for each win and 1 point for each tie.  (The existing
programs do not replay each other, but their previous battles are recalled.)
All scores are updated to reflect your battles and all 21 programs are ranked
from high to low.  If you are number 21 you are pushed off the Hill, if you
are higher than 21 someone else is pushed off.

Entry rules for King of the Hill Corewar:

1) Write a corewar program.  KotH is fully ICWS '88 compatible, EXCEPT that
   a comma (",") is required between two arguments.

2) Put the line ";redcode" at the top of your program.  This MUST be the
   first line.  Anything before it will be lost.  If you wish to receive
   mail on every new entrant, use ";redcode verbose".  Otherwise you will
   only receive mail if a challenger makes it onto the hill.  Use
   ";redcode quiet" if you wish to receive mail only when you get shoved
   off the hill.  (Also, see 5 below).

   Additionally, adding ";name <program name>" and ";author <your name>"
   will be helpful in the performance reports.  Do NOT have a line
   beginning with ";address" in your code; this will confuse the mail daemon
   and you won't get mail back.

   In addition, it would be nice if you have lines beginning with
   ";strategy" that describe the algorithm you use.

3) Mail this file to "wms@iwarp.intel.com".

4) Within a few minutes you should get mail back telling you whether your
   program assembled correctly or not.  If it did assemble correctly,
   sit back and wait; if not, make the change required and re-submit.

5) In an hour or so you should get more mail telling you how your program
   performed against the current top 20 programs.  If no news arrives in an
   hour, don't worry; entries are put in a queue and run through the
   tournament one at a time.  A backlog may develop.  Be patient.

   If your program makes it onto the hill, you will get mail every time a
   new program makes it onto the hill.  If this is too much mail, you can use
   ";redcode quiet" when you first mail in your program; then you will only
   get mail when you make it on the top 20 list or when you are knocked off.
   Using ";redcode verbose" will give you even more mail; here you get mail
   every time a new challenger arrives, even if they don't make it onto the
   top 20 list.

   Often programmers want to try out slight variations in their programs.
   If you already have a program named "foo V1.0" on the hill, adding the
   line ";kill foo" to a new program will automatically bump foo 1.0 off the
   hill.  Just ";kill" will remove all of your programs when you submit the
   new one.


MORE ON KOTH COREWAR IMPLEMENTATION
       Core size: 8 000 instructions
   Max processes: 8 000 per program
        Duration: After 80 000 cycles per program, a tie is declared.
Max entry length: 100 instructions

   Programs are guaranteed a 100 instruction block (inclusive of their
   warrior's instructions) without overlapping their opponent.


SAMPLE ENTRY:
;redcode
;name Dwarf
;author A. K. Dewdney
;strategy Throw DAT bombs around memory, hitting every 4th memory cell.
;strategy This program was presented in the first Corewar article.
bomb  DAT   #0
dwarf ADD   #4,    bomb
      MOV   bomb, @bomb
      JMP   dwarf
      END   dwarf          ; Programs start at the first line unless
                           ; an "END start" pseudo-op appears to indicate
                           ; the first logical instruction.  Also, nothing
                           ; after the END instruction will be assembled.

Rule variants for "eXperimental" corewar:
The same as above but use ";redcode-x" to start your program.

Your program will be entered into a second tournament with slightly
different rules.  The rules are:
   - All addressing modes are allowed with all instructions.
   - There is an additional addressing mode, called "postincrement".  To use
     it try an instruction like "mov >5,6".
   - The maximum write distance is 250 instructions.  That is, every time
     your program tries to modify memory, the address is checked; if it is
     more than 250 instructions from the process doing the modify, then
     memory is left unchanged, but the instruction continues as normal.
   - A tie is not declared until 150,000 cycles per program have elapsed.

KotH runs on any Unix system with an X windows interface.  The source code
to KotH is available by email from William Shubert.  Write to him at
(wms@iwarp.intel.com) for a copy or get it by anonymous FTP from
soda.berkeley.edu in the pub/corewar/systems directory.

----------------------------------------------------------------------

Q16: Is it DAT 0, 0 or DAT #0, #0?  How do I compare to core?
A16: Core is initialized to DAT 0, 0.  This is an "illegal" instruction
under ICWS'88 rules and strictly compliant assemblers (such as KotH)
will not let you write a DAT 0, 0 instruction - only DAT #0, #0.  So
this begs the question, how to compare something to see if it is empty
core.  The answer is, most likely the instruction before your first
instruction and the instruction after your last instruction are both
DAT 0, 0.  You can use them, or any other likely unmodified instructions,
for comparison.

----------------------------------------------------------------------

Q17: How does SLT (Skip if Less Than) work?
A17: SLT gives some people trouble because of the way modular arithmetic
works.  It is important to note that all negative numbers are converted
to positive numbers before a battles begins.  Example: (-1) becomes
(M - 1) where M is the memory size.

Once you realize that all numbers are treated as positive, it is clear 
what is meant by "less than".  It should also be clear that no number is
less than zero.

----------------------------------------------------------------------

Q18: What does (expression or term of your choice) mean?
A18: Here is a selected glossary of terms.  If you have a definition and/or
term you wish to see here, please send it to me.

(References to an X-like program mean that the term X is derived from the
   specific program X and has become a generic term).

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.

B-Scanners - Scanners which only recognize non-zero B-fields.
           example  add #10,scan
           scan     jmz example,10

C - Measure of speed, equal to one location per cycle.  Speed of light.

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.

Decoys - Bogus or unused instructions meant to slow down Scanners.
   Typically, DATs with non-zero B-fields.

DJN-Stream (also DJN-Train) - Using a DJN command to rapidly decrement core
   locations.
           example   . . .
                     . . .
                     djn example,<4000

Dwarf - the prototypical small bomber.

Imp - Program which only uses the MOV instruction.
           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 can not 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.
            d        EQU (coresize+1)/3
            A        MOV 0,d   ; copy self to B
            B        MOV 0,d   ; copy self to C
            C        MOV 0,d   ; copy self to A+1

Imp-Spiral - An Imp-like program with two or more processes supporting
   each other.  A three-point spiral, with six processes running in this
   sequence:
            d        EQU (coresize+1)/3
            A        MOV 0,d   ; copy self to B
            B        MOV 0,d   ; copy self to C
            C        MOV 0,d   ; copy self to A+1
            A+1      MOV 0,d   ; copy self to B+1
            B+1      MOV 0,d   ; copy self to C+1
            C+1      MOV 0,d   ; copy self to A+2

Incendiary Bomb - A type of Stun bomb which creates a SPL 0 carpet.
           example   SPL 0, 8
                     MOV -1, <-1

Mirror - see reflection

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

Paper - A Paper-like program.  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 JMPs to a SPL 0 pit with an
   optional core-clear routine.

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

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

Self-Splitting - Strategy of amplifying the number of processes executing
   a piece of code.
           example   SPL 0
           loop      ADD #10, example
                     MOV example, @example
                     JMP loop

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) vampire.  Part of the Paper-Scissors-Stone analogy.

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

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 - A type of bomb which makes the opponent multiply useless processes,
   thus slowing it down.  Example is referred to as a spl-jmp bomb.
          example spl 0
                  jmp -1

Vampire - See Pit-Trapper.

----------------------------------------------------------------------

Q19: Other questions?
A19: Just ask in the rec.games.corewar newsgroup or contact me (address
below). If you are shy, check out the Core War archives on soda first to
see if your question has been answered before (see Q10).

----------------------------------------------------------------------

Additions/Corrections/etc. to this document are solicited.
The rec.games.corewar FAQ has been compiled by Mark Durham and is being
maintained by:

Stefan Strack, PhD                      stst@vuse.vanderbilt.edu
Dept. Pharmacology, 424 MRB             stracks@vuctrvax.bitnet
Vanderbilt Univ. Medical Center         Voice: +615-322-4890
Nashville, TN 37232-6600, USA           FAX:   +615-343-6532
Technical Details
Message-ID: <games/corewar-faq_740980807@GZA.COM>
Path: arc1-ca.pugleaf.net!senator-bedfellow.mit.edu!enterpoop.mit.edu!pad-thai.aktis.com!pad-thai.aktis.com!not-for-mail

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!senator-bedfellow.mit.edu!enterpoop.mit.edu!pad-thai.aktis.com!pad-thai.aktis.com!not-for-mail
From: stst@vuse.vanderbilt.edu (Stefan Strack)
Newsgroups: rec.games.corewar,rec.answers,news.answers
Subject: Core War Frequently Asked Questions (rec.games.corewar FAQ)
Supersedes: <games/corewar-faq_739684808@GZA.COM>
Followup-To: rec.games.corewar
Date: 25 Jun 1993 00:00:12 -0400
Organization: The Core War Newsletter
Lines: 510
Sender: faqserv@GZA.COM
Approved: news-answers-request@MIT.Edu
Message-ID: <games/corewar-faq_740980807@GZA.COM>
Reply-To: stst@vuse.vanderbilt.edu (Stefan Strack)
NNTP-Posting-Host: pad-thai.aktis.com
Summary: This posting contains a list of Frequently Asked Questions
         (and their answers) about the game Core War.  It should be
         read by anyone interested in posting to the rec.games.corewar
         newsgroup or submitting warriors to the ongoing Core War
         tournament - KotH.
X-Last-Updated: 1993/04/25