From: Koth Subject: KOTH.ORG: Status - 94 No Pspace 01/01/01 Date: 1 Jan 2001 09:04:53 -0500 Message-ID: <200101010500.AAA02626@gevjon.ttsg.com> Weekly Status on 01/01/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG 94 No Pspace CoreWar Hill: Last battle concluded at : Sun Dec 31 05:39:08 EST 2000 # %W/ %L/ %T Name Author Score Age 1 37/ 22/ 41 Olivia Ben Ford 151 78 2 36/ 24/ 40 Uninvited John Metcalf 148 32 3 43/ 39/ 18 Behemot Michal Janeczek 147 173 4 36/ 26/ 38 Quicksilver Michal Janeczek 147 112 5 32/ 20/ 48 nPaper II Paul-V Khuong 145 350 6 33/ 20/ 47 The Dark One Christian Schmidt 145 143 7 43/ 42/ 16 Eraser II Ken Espiritu 144 307 8 39/ 35/ 26 Recount P.Kline 144 35 9 43/ 43/ 14 G2-b David Moore 143 136 10 45/ 48/ 7 He Scans Alone P.Kline 142 34 11 36/ 30/ 34 Blacken Ian Oversby 142 597 12 42/ 43/ 15 Stalker P.Kline 142 335 13 33/ 24/ 43 Jade Ben Ford 141 419 14 42/ 43/ 16 Jinx Christian Schmidt 141 313 15 25/ 11/ 64 The Phantom Menace Anton Marsden 139 50 16 27/ 20/ 53 KafuFFLe John Metcalf 134 33 17 34/ 35/ 30 Keyser Soze Anton Marsden 134 51 18 37/ 42/ 21 myBlur Paulsson 133 15 19 21/ 24/ 55 jam test 3 John Metcalf 118 16 20 36/ 55/ 10 Hyperclear 2+ Steve Gunnell 117 1 21 5/ 75/ 20 Jolly Jumper 10 Stefan Foerster 34 0 From: Koth Subject: KOTH.ORG: Status - MultiWarrior 94 01/01/01 Date: 1 Jan 2001 09:04:57 -0500 Message-ID: <200101010500.AAA02613@gevjon.ttsg.com> Weekly Status on 01/01/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG Multiwarrior 94 CoreWar Hill: Last battle concluded at : Fri Dec 22 14:27:31 EST 2000 # Name Author Score Age 1 Dracula's Cape Ben Ford 42 25 2 D-clearM Ken Espiritu 40 47 3 QuiVa John Metcalf 35 140 4 Her Majesty P.Kline 31 66 5 fclear Brian Haskin 30 31 6 Pitbull Christian Schmidt 29 3 7 Scan Test Tester 23 6 8 CrazyShot Christian Schmidt 22 2 9 Foo John Metcalf 19 1 10 Friction Ken Espiritu 11 19 11 Crazy Lukasz Anforowicz 1 0 From: Koth Subject: KOTH.ORG: Status - ICWS Experimental 94 01/01/01 Date: 1 Jan 2001 09:04:49 -0500 Message-ID: <200101010500.AAA02620@gevjon.ttsg.com> Weekly Status on 01/01/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG ICWS Experimental 94 CoreWar Hill: Last battle concluded at : Thu Dec 28 11:22:51 EST 2000 # %W/ %L/ %T Name Author Score Age 1 49/ 31/ 19 Random Reaper Dave Hillis 167 1 2 45/ 29/ 27 Controlled Aggression Ian Oversby 160 63 3 44/ 33/ 23 Black Moods Ian Oversby 156 59 4 46/ 38/ 17 Greetings From Asbury Par JKW 153 23 5 39/ 34/ 27 Ogre Christian Schmidt 145 11 6 29/ 15/ 56 Katafutr Michal Janeczek 144 3 7 33/ 26/ 40 Damage Inflicted Robert Macrae 141 2 8 25/ 13/ 63 Denial David Moore 137 4 9 28/ 21/ 51 Venom v0.2b Christian Schmidt 135 85 10 20/ 4/ 76 Black Box v1.1 JKW 135 26 11 23/ 12/ 65 Evol Cap 4 X John Wilkinson 133 132 12 18/ 5/ 77 Evolve X v4.0 John Wilkinson 131 80 13 33/ 37/ 30 Dr. Gate X Franz 129 103 14 30/ 35/ 36 test CS 124 20 15 33/ 42/ 26 Pattel's Virus X Ben Ford 123 7 16 22/ 24/ 54 Purple v0.1 Christian Schmidt 120 84 17 24/ 28/ 48 Rosebud Beppe 120 111 18 32/ 45/ 23 Pagan John K W 118 117 19 26/ 39/ 35 MorphinMerlin Jeremy K 114 46 20 32/ 51/ 18 S.E.T.I. 4-X JKW 112 133 21 2/ 66/ 32 Jolly Jumper 6 Stefan Foerster Subject: KOTH.ORG: Status - Standard 01/01/01 Date: 1 Jan 2001 09:05:01 -0500 Message-ID: <200101010500.AAA02609@gevjon.ttsg.com> Weekly Status on 01/01/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG Standard KotH CoreWar Hill : Last battle concluded at : Fri Dec 22 12:46:27 EST 2000 # %W/ %L/ %T Name Author Score Age 1 34/ 20/ 46 Freight Train David Moore 148 73 2 33/ 21/ 45 sIMPly.Red v0.95 Leonardo Humberto 145 30 3 32/ 20/ 47 Test Alexander (Sasha) Wa 144 12 4 32/ 21/ 47 Guardian Ian Oversby 142 72 5 37/ 35/ 28 PacMan David Moore 138 102 6 37/ 39/ 24 Stasis David Moore 135 180 7 25/ 16/ 59 EV Paper John K Wilkinson 135 86 8 40/ 44/ 16 Foggy Swamp Beppe Bezzi 135 69 9 28/ 22/ 50 Shish-Ka-Bob Ben Ford 133 28 10 39/ 45/ 16 Blur '88 Anton Marsden 133 110 11 26/ 19/ 55 Test I Ian Oversby 132 129 12 31/ 31/ 37 Frog Sticker P.Kline 132 22 13 26/ 21/ 53 Evoltmp 88 John K W 130 123 14 35/ 42/ 23 Beholder's Eye V1.7 W. Mintardjo 129 348 15 37/ 46/ 16 Iron Gate Wayne Sheppard 129 398 16 33/ 38/ 29 Stillborn Bomber v0.2 mjp 128 13 17 33/ 39/ 28 Tangle Trap David Moore 128 146 18 25/ 23/ 53 sic Leonardo H. Liporati 127 2 19 15/ 3/ 82 ]enigma[ Michal Janeczek 127 1 20 36/ 50/ 14 Blurstone '88 M. J. Pihlaja 123 67 21 19/ 59/ 22 Crazy Lukasz Anforowicz 80 0 Message-ID: From: anton@paradise.net.nz (Anton Marsden) Subject: Core War Frequently Asked Questions (rec.games.corewar FAQ) Date: 02 Jan 2001 12:20:06 GMT Archive-name: games/corewar-faq Last-Modified: September 4, 1999 Version: 4.2 URL: http://homepages.paradise.net.nz/~anton/cw/corewar-faq.html Copyright: (c) 1999 Anton Marsden Maintainer: Anton Marsden Posting-Frequency: once every 2 weeks Core War Frequently Asked Questions (rec.games.corewar FAQ) These are the Frequently Asked Questions (and answers) from the Usenet newsgroup rec.games.corewar. A plain text version of this document is posted every two weeks. The latest hypertext version is available at http://homepages.paradise.net.nz/~anton/cw/corewar-faq.html and the latest plain text version is available at http://homepages.paradise.net.nz/~anton/cw/corewar-faq.txt. This document is currently being maintained by Anton Marsden (anton@paradise.net.nz). Last modified: Sat Sep 4 00:22:22 NZST 1999 ------------------------------------------------------------------------ To Do * Add the new No-PSpace '94 hill location * Add online location of Dewdney's articles * Make question 17 easier to understand. Add a state diagram? * Add info about infinite hills, related games (C-Robots, Tierra?, ...) * New question: How do I know if my warrior is any good? Refer to beginners' benchmarks, etc. * Add a Who's Who list? * Would very much like someone to compile a collection of the "revolutionary" warriors so that beginners can see how the game has developed over the years. Mail me if interested. ------------------------------------------------------------------------ What's New * Changed primary location of FAQ (again!) * Changed Philip Kendall's home page address. * Updated list server information * Changed primary location of FAQ * Vector-launching code was fixed thanks to Ting Hsu. * Changed the location of Ryan Coleman's paper (LaunchPad -> Launchpad) * Changed pauillac.inria.fr to para.inria.fr ------------------------------------------------------------------------ Table of Contents 1. What is Core War 2. Is it "Core War" or "Core Wars"? 3. Where can I find more information about Core War? 4. Core War has changed since Dewdney's articles. Where do I get a copy of the current instruction set? 5. What is ICWS'94? Which simulators support ICWS'94? 6. What is the ICWS? 7. What is Core Warrior? 8. Where are the Core War archives? 9. Where can I find a Core War system for ...? 10. Where can I find warrior code? 11. I do not have FTP. How do I get all this great stuff? 12. I do not have access to Usenet. How do I post and receive news? 13. Are there any Core War related WWW sites? 14. What is KotH? How do I enter? 15. Is it DAT 0, 0 or DAT #0, #0? How do I compare to core? 16. How does SLT (Skip if Less Than) work? 17. What is the difference between in-register and in-memory evaluation? 18. What is P-space? 19. What does "Missing ;assert .." in my message from KotH mean? 20. How should I format my code? 21. Are there any other Core War related resources I should know about? 22. What does (expression or term of your choice) mean? 23. Other questions? ------------------------------------------------------------------------ 1. What is Core War? 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 processes of the opposing program to terminate, leaving your program in sole posession of the machine. There are Core War systems available for most computer platforms. Redcode has been standardised by the ICWS, and is therefore transportable between all standard Core War systems. The system in which the programs run is quite simple. The core (the memory of the simulated computer) is a continuous array of instructions, empty except for the competing programs. The core wraps around, so that after the last instruction comes the first one again. There are no absolute addresses in Core War. That is, the address 0 doesn't mean the first instruction in the memory, but the instruction that contains the address 0. The next instruction is 1, and the previous one obviously -1. However, all numbers are treated as positive, and are in the range 0 to CORESIZE-1 where CORESIZE is the amount of memory locations in the core - this means that -1 would be treated as CORESIZE-1 in any arithmetic operations, eg. 3218 + 7856 = (3218 + 7856) mod CORESIZE. Many people get confused by this, and it is particularly important when using the SLT instruction. Note that the source code of a program can still contain negative numbers, but if you start using instructions like DIV #-2, #5 it is important to know what effect they will have when executed. The basic unit of memory in Core War is one instruction. Each Redcode instruction contains three parts: * the opcode * the source address (a.k.a. the A-field) * the destination address (a.k.a. the B-field) The execution of the programs is equally simple. The MARS executes one instruction at a time, and then proceeds to the next one in the memory, unless the instruction explicitly tells it to jump to another address. If there is more than one program running, (as is usual) the programs execute alternately, one instruction at a time. The execution of each instruction takes the same time, one cycle, whether it is MOV, DIV or even DAT (which kills the process). Each program may have several processes running. These processes are stored in a task queue. When it is the program's turn to execute an instruction it dequeues a process and executes the corresponding instruction. Processes that are not killed during the execution of the instruction are put back into the task queue. Processes created by a SPL instruction are added to the task queue after the creating process is put back into the task queue. [ToC] ------------------------------------------------------------------------ 2. Is it "Core War" or "Core Wars"? 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. [ToC] ------------------------------------------------------------------------ 3. Where can I find more information about Core War? 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 two anthologies: Library of Author Title Published ISBN Congress Call Number The Armchair Dewdney, Universe: An New York: W. QA76.6 .D517 A. K. Exploration of H. Freeman �0-7167-1939-8 1988 Computer Worlds 1988 The Magic 0-7167-2125-2 Dewdney, Machine: A New York: W.(Hardcover), QA76.6 A. K. Handbook of H. Freeman �0-7167-2144-9 .D5173 1990 Computer Sorcery 1990 (Paperback) A.K. Dewdney's articles are still the most readable introduction to Core War, even though the Redcode dialect described in there is no longer current. For those who are interested, Dewdney has a home page at http://www.csd.uwo.ca/faculty/akd/. [ToC] ------------------------------------------------------------------------ 4. Core War has changed since Dewdney's articles. Where do I get a copy of the current instruction set? A draft of the official standard (ICWS'88) is available as ftp://www.koth.org/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 Mark Durham's tutorials, ftp://www.koth.org/corewar/documents/tutorial.1.Z and ftp://www.koth.org/corewar/documents/tutorial.2.Z. Steven Morrell has prepared a more practically oriented Redcode tutorial that discusses different warrior classes with lots of example code. This and various other tutorials can be found at http://www.koth.org/papers.html. Even though ICWS'88 is still the "official" standard, you will find that most people are playing by ICWS'94 draft rules and extensions. [ToC] ------------------------------------------------------------------------ 5. What is ICWS'94? Which simulators support ICWS'94? There is an ongoing discussion about future enhancements to the Redcode language. A proposed new standard, dubbed ICWS'94, is currently being evaluated. A major change is the addition of "instruction modifiers" that allow instructions to modify A-field, B-field or both. Also new is a new addressing modes and unrestricted opcode and addressing mode combination ("no illegal instructions"). ICWS'94 is backwards compatible; i.e. ICWS'88 warriors will run correctly on an ICWS'94 system. Take a look at the ICWS'94 draft at ftp://www.koth.org/corewar/documents/icws94.0202.Z for more information. There is a HTML version of this document available at http://www.koth.org/info/icws94.html. You can try out the new standard by submitting warriors to the '94 hills of the KotH servers. Two corewar systems currently support ICWS'94, pMARS (many platforms) and Redcoder (Mac), both available at ftp://www.koth.org/corewar. Note that Redcoder only supports a subset of ICWS'94. [ToC] ------------------------------------------------------------------------ 6. What is the ICWS? About one year after Core War first appeared in Scientific American, 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). The ICWS is no longer active. [ToC] ------------------------------------------------------------------------ 7. What is Core Warrior? Following in the tradition of the Core War News Letter, Push Off, and The 94 Warrior, Core Warrior is a newsletter about strategies and current standings in Core War. Started in October 1995, back issues of Core Warrior (and the other newsletters) are available at http://para.inria.fr/~doligez/corewar/. There is also a Core Warrior index page at http://www.kendalls.demon.co.uk/pak21/corewar/warrior.html which has a summary of the contents of each issue of Core Warrior. Many of the earlier issues contain useful information for beginners. [ToC] ------------------------------------------------------------------------ 8. Where are the Core War archives? 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 ftp://ftp.csua.berkeley.edu/pub/corewar. Also, most of past rec.games.corewar postings (including Redcode source listings) are archived there. Jon Blow (blojo@csua.berkeley.edu) is the archive administrator. When uploading to /pub/corewar/incoming, ask Jon to move your upload to the appropriate directory and announce it on the net. This site is mirrored at: * http://www.koth.org/corewar/ * ftp://www.koth.org/corewar/ * ftp://ftp.inria.fr/INRIA/Projects/para/doligez/cw/mirror The plain text version of this FAQ is automatically archived by news.answers (but this version is probably out-of-date). [ToC] ------------------------------------------------------------------------ 9. Where can I find a Core War system for . . . ? Core War systems are available via anonymous FTP from www.koth.org in the corewar/systems directory. Currently, there are UNIX, IBM PC-compatible, Macintosh, and Amiga Core War systems available there. It is a good idea to check ftp://www.koth.org/corewar/incoming for program updates first. 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 www.koth.org. Generally, the older the program - the less likely it will be ICWS compatible. If you are looking for an ICWS'94 simulator, get pMARS, which is available for many platforms and can be downloaded from: * ftp://ftp.csua.berkeley.edu/pub/corewar (original site) * ftp://www.koth.org/corewar (koth.org mirror) * ftp://ftp.inria.fr/INRIA/Projects/para/doligez/cw/mirror (Planar mirror) * http://www.nc5.infi.net/~wtnewton/corewar/ (Terry Newton) * ftp://members.aol.com/ofechner/corewar (Fechter) Notes: * If you have trouble running pMARS with a graphical display under Win95 then check out http://www.koth.org/pmars.html which should have a pointer to the latest compilation of pMARS for this environment. * RPMs for the Alpha, PowerPC, Sparc and i386 can be found at ftp://ftp.inria.fr/INRIA/Projects/para/doligez/cw/pmars-rpm/ Reviews of Core War systems would be greatly appreciated in the newsgroup and in the newsletter. Below is a not necessarily complete or up-to-date list of what's available at www.koth.org: MADgic41.lzh corewar for the Amiga, v4.1 MAD4041.lzh older version? MAD50B.lha corewar for the Amiga, beta version 5.0 Redcoder-21.hqx corewar for the Mac, supports ICWS'88 and '94 (without extensions) core-11.hqx corewar for the Mac core-wars-simulator.hqx same as core-11.hqx? corewar_unix_x11.tar.Z corewar for UNIX/X-windows, ICWS'86 but not ICWS'88 compatible koth31.tar.Z corewar for UNIX/X-windows. This program ran the former KotH server at intel.com koth.shar.Z older version kothpc.zip port of older version of KotH to the PC deluxe20c.tar.Z corewar for UNIX (broken X-windows or curses) and PC mars.tar.Z corewar for UNIX, likely not ICWS'88 compatible icons.zip corewar icons for MS-Windows macrored.zip a redcode macro-preprocessor (PC) c88v49.zip PC corewar, textmode display mars88.zip PC corewar, graphics mode display corwp302.zip PC corewar, textmode display, slowish mercury2.zip PC corewar written in assembly, fast! mtourn11.zip tournament scheduler for mercury (req. 4DOS) pmars08s.zip portable system, ICWS'88 and '94, runs on UNIX, PC, Mac, Amiga. C source archive pmars08s.tar.Z same as above pmars08.zip PC executables with graphics display, req 386+ macpmars02.sit.hqx pMARS executable for Mac (port of version 0.2) buggy, no display MacpMARS1.99a.cpt.hqx port of v0.8 for the Mac, with display and debugger MacpMARS1.0s.cpt.hqx C source (MPW, ThinkC) for Mac frontend pvms08.zip pMARS v0.8 for VMS build files/help (req. pmars08s.zip) ApMARS03.lha pMARS executable for Amiga (port of version 0.3.1) wincor11.zip MS-Windows system, shareware ($15) [ToC] ------------------------------------------------------------------------ 10. Where can I find warrior code? To learn the game, it is a good idea to study previously posted warrior code. The FTP archives have code in the ftp://www.koth.org/corewar/redcode directory. A clearly organized on-line warrior collection is available at the Core War web sites (see below). [ToC] ------------------------------------------------------------------------ 11. I do not have FTP. How do I get all this great stuff? There is an FTP email server at bitftp@pucc.princeton.edu. This address may no longer exist. I haven't tested it yet. Send email with a subject and body text of "help" (without the quotes) for more information on its usage. Note that many FTP email gateways are shutting down due to abuse. To get a current list of FTP email servers, look at the Accessing the Internet by E-mail FAQ posted to news.answers. If you don't have access to Usenet, you can retrieve this FAQ one of the following ways: * Send mail to mail-server@rtfm.mit.edu with the body containing "send usenet/news.answers/internet-services/access-via-email". * Send mail to mailbase@mailbase.ac.uk with the body containing "send lis-iis e-access-inet.txt". [ToC] ------------------------------------------------------------------------ 12. I do not have access to Usenet. How do I post and receive news? To receive rec.games.corewar articles by email, join the COREWAR-L list run on the Koth.Org list processor. To join, send the message SUB COREWAR-L FirstName LastName to listproc@koth.org. You can send mail to corewar-l@koth.org to post even if you are not a member of the list. Responsible for the listserver is Scott J. Ellentuch (ttsg@ttsg.com). Servers that allow you to post (but not receive) articles are available. Refer to the Accessing the Internet by E-Mail FAQ for more information. [ToC] ------------------------------------------------------------------------ 13. Are there any Core War related WWW sites? You bet. Each of the two KotH sites sport a world-wide web server. Stormking's Core War page is http://www.koth.org; pizza's is http://www.ecst.csuchico.edu/~pizza/koth . Damien Doligez (a.k.a. Planar) has a web page that features convenient access to regular newsletters (Push Off, The '94 Warrior, Core Warrior) and a well organized library of warriors: http://para.inria.fr/~doligez/corewar/. Convenient for U.S. users, this site is also mirrored at koth.org. [ToC] ------------------------------------------------------------------------ 14. What is KotH? How do I enter? King Of The Hill (KotH) is an ongoing Core War tournament available to anyone with email. You enter by submitting via email a Redcode program (warrior) with special comment lines. You will receive a reply indicating how well your program did against the current top programs "on the hill". There are two styles of KotH tournaments, "classical" and "multi-warrior". The "classical" KotH is a one-on-one tournament, that is your warrior 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. In "multi-warrior" KotH, all warriors on the hill fight each other at the same time. Score calculation is a bit more complex than for the one-on-one tournament. Briefly, points are awarded based on how many warriors survive until the end of a round. A warrior that survives by itself gets more points than a warrior that survives together with other warriors. Points are calculated from the formula (W*W-1)/S, where W is the total number of warriors and S the number of surviving warriors. The pMARS documentation has more information on multi-warrior scoring. The idea for an email-based Core War server came from David Lee. The original KotH was developed and run by William Shubert at Intel starting in 1991, and discontinued after almost three years of service. Currently, KotHs based on Bill's UNIX scripts but offering a wider variety of hills are are running at two sites: koth@koth.org is maintained by Scott J. Ellentuch (tuc@ttsg.com) and pizza@ecst.csuchico.edu by Thomas H. Davies (sd@ecst.csuchico.edu). Up until May '95, the two sites provided overlapping services, i.e. the some of the hill types were offered by both "pizza" and "stormking". To conserve resources, the different hill types are now divided up among the sites. The way you submit warriors to both KotHs is pretty much the same. Therefore, the entry rules described below apply to both "pizza" and "stormking" unless otherwise noted. Entry Rules for King of the Hill Corewar * Write a corewar program. KotH is fully ICWS '88 compatible, EXCEPT that a comma (",") is required between two arguments. * Put a line starting with ";redcode" (or ";redcode-94", etc., see below) 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. Additionally, adding ";name " and ";author " 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. Using ";name" is mandatory on the Pizza hills. In addition, it would be nice if you have lines beginning with ";strategy" that describe the algorithm you use. There are currently seven separate hills you can select by starting your program with ;redcode-94, ;redcode-b, ;redcode-lp, ;redcode-x, ;redcode, ;redcode-94x or ;redcode-94m. The former four run at "pizza", the latter three at "stormking". More information on these hills is listed below. * Mail this file to koth@koth.org or pizza@ecst.csuchico.edu. "Pizza" requires a subject of "koth" (use the -s flag on most mailers). * 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. * In an hour or so you should get more mail telling you how your program performed against the current top 20 (or 10) programs. If no news arrives during that time, 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 25 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 25 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. The server kills programs by assigning an impossibly low score; it may therefore take another successful challenge before a killed program is actually removed from the hill. 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. Duration Max. Hill Name Hill Core Max. Before Entry Min. Rounds Instr. Size Size Processes Distance Fought Set Tie Length Pizza's ICWS '94 Draft Hill Extended (Accessed with 25 8000 8000 80000 100 100 200 ICWS '94 ";redcode-94") Draft Pizza's Beginner's Extended Hill (Accessed 25 8000 8000 80000 100 100 200 ICWS '94 with ";redcode-b") Draft Pizza's Experimental Extended (Small) Hill 25 800 800 8000 20 20 200 ICWS '94 (Accessed with Draft ";redcode-x") Pizza's Limited Process (LP) Hill Extended (Accessed with 25 8000 8 80000 200 200 200 ICWS '94 ";redcode-lp") Draft Stormking's ICWS '88 Standard Hill (Accessed with 20 8000 8000 80000 100 100 250 ICWS '88 ";redcode") Stormking's ICWS '94 No Pspace Hill (Accessed with 20 8000 8000 80000 100 100 250 ICWS '94 ";redcode-94nop") Stormking's ICWS '94 Experimental Extended (Big) Hill 20 55440 55440 500000 200 200 250 ICWS '94 (Accessed with Draft ";redcode-94x") Stormking's ICWS '94 Multi-Warrior Extended Hill (Accessed 10 8000 8000 80000 100 100 200 ICWS '94 with Draft ";redcode-94m") Note: Warriors on the beginner's hill are retired at age 100. If you just want to get a status report without actually challenging the hills, send email with ";status" as the message body (and don't forget "Subject: koth" for "pizza"). If you send mail to "pizza" with "Subject: koth help" you will receive instructions that may be more up to date than those contained in this document. At "stormking", a message body with ";help" will return brief instructions. If you submit code containing a ";test" line, your warrior will be assembled but not actually pitted against the warriors on the hill. At "pizza", you can use ";redcode[-??] test" to do a test challenge of the Hill without affecting the status of the Hill. These challenges can be used to see how well your warrior does against the current Hill warriors. All hills run portable MARS (pMARS) version 0.8, a platform-independent Core War system available at www.koth.org. The '94 and '94x hills allow five experimental opcodes and three experimental addressing modes currently not covered in the ICWS'94 draft document: * LDP - Load P-Space * STP - Store P-Space * SEQ - Skip if EQual (synonym for CMP) * SNE - Skip if Not Equal * NOP - (No OPeration) * * - indirect using A-field as pointer * { - predecrement indirect using A-field * } - postincrement indirect using A-field [ToC] ------------------------------------------------------------------------ 15. Is it DAT 0, 0 or DAT #0, #0? How do I compare to core? Core is initialized to DAT 0, 0. This is an illegal instruction (in source code) under ICWS'88 rules and strictly compliant assemblers (such as KotH or pmars -8) will not let you have a DAT 0, 0 instruction in your source code - 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. Note that under ICWS'94, DAT 0, 0 is a legal instruction. [ToC] ------------------------------------------------------------------------ 16. How does SLT (Skip if Less Than) work? 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 (core 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. [ToC] ------------------------------------------------------------------------ 17. What is the difference between in-register and in-memory evaluation? These terms refer to the way instruction operands are evaluated. The '88 Redcode standard ICWS'88 is unclear about whether a simulator should "buffer" the result of A-operand evaluation before the B-operand is evaluated. Simulators that do buffer are said to use in-register evaluation, those that don't, in-memory evaluation. ICWS'94 clears this confusion by mandating in-register evaluation. Instructions that execute differently under these two forms of evaluation are MOV, ADD, SUB, MUL, DIV and MOD where the effective address of the A-operand is modified by evaluation of the B-operand. This is best illustrated by an example: L1 mov L2, mov.i #0, impsize 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 Colour 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. Decrement Resistant Property of warriors making them functional (or at least partially functional) when overrun by a DJN-stream. DJN-Stream (also DJN-Train) Using a DJN command to rapidly decrement core locations. example ... ... djn example, <4000 Dwarf The prototypical small bomber. Gate-busting (also gate-crashing) technique to "interweave" a decrement-resistant imp-spiral (e.g. MOV 0, 2668) with a standard one to overrun imp-gates. Hybrids warriors that combine two or more of the basic strategies, either in sequence (e.g. stone->paper) or in parallel (e.g. imp/stone). 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, mov.i #0,IMPSIZE 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. Optimal Constants (also optima-type constants) Bomb or scan increments chosen to cover core most effectively, i.e. leaving gaps of uniform size. Programs to calculate optimal constants and lists of optimal numbers are available at www.koth.org. Paper A Paper-like program is one which replicates itself many times. Part of the Scissors (beats) Paper (beats) Stone (beats Scissors) analogy. P-Warrior A warrior which uses the results of previous round(s) in order to determine which strategy it will use. 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. Q^2 Scan A modern version of the Quick Scan where anything found is attacked almost immediately. Quick Scan 2c scan of a set group of core locations with bombing if anything is found. Both of the following codes snips scan 16 locations and check for a find. If anything is found, it is attacked, otherwise 16 more locations are scanned. Example: start s1 for 8 ;'88 scan cmp start+100*s1, start+100*s1+4000 ;check two locations mov #start+100*s1-found, found ;they differ so set pointer rof jmn attack, found ;if we have something, get it s2 for 8 cmp start+100*(s2+6), start+100*(s2+6)+4000 mov #start+100*(s2+6)-found, found rof found jmz moveme, #0 ;skip attack if qscan found nothing attack cmp @found, start-1 ;does found points to empty space? add #4000, found ;no, so point to correct location mov start-1, @found ;move a bomb moveme jmp 0, 0 In ICWS'94, the quick scan code is more compact because of the SNE opcode: start ;'94 scan s1 for 4 sne start+400*s1, start+400*s1+100 ;check two locations seq start+400*s1+200, start+400*s1+300 ;check two locations mov #start+400*s1-found, found ;they differ so set pointer rof jmn which, found ;if we have something, get it s2 for 4 sne start+400*(s2+4), start+400*(s2+4)+100 seq start+400*(s2+4)+200, start+400*(s2+4)+300 mov #start+400*(s2+4)-found-100, found rof found jmz moveme, #0 ;skip attack if qscan found nothing add #100, -1 ;increment pointer till we get the which jmn -1, @found ;right place mov start-1, @found ;move a bomb moveme jmp 0, 0 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. Silk A replicator which splits off a process to each new copy before actually copying the code. This allows it to replicate extremely quickly. This technique is only possible under the '94 draft, because it requires post-increment indirect addressing. Example: spl 1 mov -1, 0 spl 1 ;generate 6 consecutive processes silk spl 3620, #0 ;split to new copy mov >-1, }-1 ;copy self to new location mov bomb, >2000 ;linear bombing mov bomb, }2042 ;A-indirect bombing for anti-vamp jmp silk, {silk ;reset source pointer, make new copy bomb dat >2667, >5334 ;anti-imp bomb Slaver see Pit-Trapper. Stealth Property of programs, or program parts, which are invisible to scanners, accomplished by using zero B-fields and reflections. Stone A Stone-like program designed to be a small bomber. Part of the Paper-Scissors-Stone analogy. Stun 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 Two-Pass Core-Clear (also SPL/DAT Core-Clear) core clear that fills core first with SPL instructions, then with DATs. This is very effective in killing paper and certain imp-spiral variations. Vampire see Pit-Trapper. Vector Launch one of several means to start an imp-spiral running. As fast as Binary Launch, but requiring much less code. See also JMP/ADD Launch and Binary Launch. This example is one form of a Vector Launch: sz EQU 2667 spl 1 spl 1 jmp @vt, }0 vt dat #0, imp+0*sz ; start of vector table dat #0, imp+1*sz dat #0, imp+2*sz dat #0, imp+3*sz ; end of vector table imp mov.i #0, sz [ToC] ------------------------------------------------------------------------ 23. Other questions? Just ask in the rec.games.corewar newsgroup or contact me. If you are shy, check out the Core War archives first to see if your question has been answered before. [ToC] ------------------------------------------------------------------------ Credits Additions, corrections, etc. to this document are solicited. Thanks in particular to the following people who have contributed major portions of this document: * Mark Durham (wrote the original version of the FAQ) * Paul Kline * Randy Graham * Stefan Strack (maintained a recent version of the FAQ) ------------------------------------------------------------------------ Copyright � 1999 Anton Marsden. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. ------------------------------------------------------------------------ From: jkw@koth.org Subject: Re: Turing Wars Date: 3 Jan 2001 17:44:08 -0500 Message-ID: <4.1.20010103145544.00996950@pop-server> >> >Is anybody interested in the developing a Turing machine war. >> >I thought about this idea for a few days now, >> >maybe some of you would find this an interesting idea to explore. >> >My knowledge about Turing machines or Corewars isn't much, >> >but i hope that this can be a start of an interesting discussion. >> > >I think you are confusing a turing machine with the turing test. > >http://www.ams.org/new-in-math/cover/turing.html Oh boy, now this makes even less sense to me. I read the stuff about what a real 'Turing Machine' is... and I fail to see the purpose of having a them battle. Some people think redcode is obtuse... I'd rather not start simulating giant rolls of paper tape... :-) -jkw From: "Tim" Subject: Newbie question - stone, paper, scissor Message-ID: <6ZM46.77326$59.21575923@news3.rdc1.on.home.com> Date: Wed, 03 Jan 2001 21:38:10 GMT Hi... quick newbie question. I've heard and seen different warriors classified into 3 general areas - stone, paper, scissors. I see that generally scissor warriors beat paper warriors, stone beats scissors, and paper beats stones. Do "stone" warriors tend to "bomb"? "scissor" warriors "scan"? and paper.. I have no idea what strategy paper warriors tend to follow. Can anyone clear these three up for me? Are there any resources that describe the basics of how to build each type of warrior? Thanks, Tim From: jkw@koth.org Subject: Re: Newbie question - stone, paper, scissor Date: 3 Jan 2001 21:39:31 -0500 Message-ID: <4.1.20010103195847.00ae5490@pop-server> >> Are there any resources that describe the *basics* of how to build >each type >> of warrior? > >Best method is to look at some examples. Try Carbonite and Freight >Train for relatively simple stones, and Blur, Memories, or Taking >Names for a scissors. For a paper I'm not sure; Thermite II has a >reasonably simple one. Go to Koenigstuhl or Planar's Archive for >source, locations on www.koth.org Thermite for a paper? Um Thermite's got some good stone/qscan (incendiary if I remember correctly), but no paper. See TimeScape for a paper... http://www.KOTH.org/planar/rc/TimeScape(1.0).txt -jkw From: "Tim" Subject: Re: Newbie question - stone, paper, scissor Message-ID: Date: Wed, 03 Jan 2001 21:42:17 GMT I just answered most of my questions by reading the FAQ! Sorry... But there is one I didn't see in the FAQ.. Are there any resources that describe the *basics* of how to build each type of warrior? Tim "Tim" wrote in message news:6ZM46.77326$59.21575923@news3.rdc1.on.home.com... > Hi... quick newbie question. > > I've heard and seen different warriors classified into 3 general areas - > stone, paper, scissors. I see that generally scissor warriors beat paper > warriors, stone beats scissors, and paper beats stones. > > Do "stone" warriors tend to "bomb"? > "scissor" warriors "scan"? > and paper.. I have no idea what strategy paper warriors tend to follow. > > Can anyone clear these three up for me? > Are there any resources that describe the basics of how to build each type > of warrior? > > Thanks, > Tim > > > > From: "Robert Macrae" Subject: Re: Turing Wars Date: Wed, 3 Jan 2001 23:33:12 -0000 Message-ID: <930da1$ro7$1@lure.pipex.net> > >> >Is anybody interested in the developing a Turing machine war. > >> >I thought about this idea for a few days now, > >> >maybe some of you would find this an interesting idea to explore. > >> >My knowledge about Turing machines or Corewars isn't much, > >> >but i hope that this can be a start of an interesting discussion. > >> > > >I think you are confusing a turing machine with the turing test. > > > >http://www.ams.org/new-in-math/cover/turing.html > > Oh boy, now this makes even less sense to me. I read the stuff > about what a real 'Turing Machine' is... and I fail to see the > purpose of having a them battle. Some people think redcode is > obtuse... I'd rather not start simulating giant rolls of paper > tape... :-) Pass this to the team who wanted to do Ray-tracing in Redcode. They could code a MARS on a virtual turing machine... or indeed vice versa 8-) Robert From: "Robert Macrae" Subject: Re: Newbie question - stone, paper, scissor Date: Wed, 3 Jan 2001 23:38:27 -0000 Message-ID: <930ddd$rqh$1@lure.pipex.net> > Are there any resources that describe the *basics* of how to build each type > of warrior? Best method is to look at some examples. Try Carbonite and Freight Train for relatively simple stones, and Blur, Memories, or Taking Names for a scissors. For a paper I'm not sure; Thermite II has a reasonably simple one. Go to Koenigstuhl or Planar's Archive for source, locations on www.koth.org BTW all these warriors have lots of other stuff in them; just concentrate on the main warrior. Robert Macrae Message-ID: <3A53D23A.A4C7445D@epix.net> From: Nathan McKenzie Subject: Re: Newbie question - stone, paper, scissor Date: Thu, 04 Jan 2001 02:27:57 GMT This is a multi-part message in MIME format. --------------8A58384862F0402278FA1328 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Here are two tutorials on paper, scissor, and stone programs that also have sample programs and how they work. Hope this helps, Brandon Tim wrote: > > I just answered most of my questions by reading the FAQ! Sorry... > > But there is one I didn't see in the FAQ.. > Are there any resources that describe the *basics* of how to build each type > of warrior? > > Tim > > "Tim" wrote in message > news:6ZM46.77326$59.21575923@news3.rdc1.on.home.com... > > Hi... quick newbie question. > > > > I've heard and seen different warriors classified into 3 general areas - > > stone, paper, scissors. I see that generally scissor warriors beat paper > > warriors, stone beats scissors, and paper beats stones. > > > > Do "stone" warriors tend to "bomb"? > > "scissor" warriors "scan"? > > and paper.. I have no idea what strategy paper warriors tend to follow. > > > > Can anyone clear these three up for me? > > Are there any resources that describe the basics of how to build each type > > of warrior? > > > > Thanks, > > Tim > > > > > > > > --------------8A58384862F0402278FA1328 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Base: "http://www.koth.org/info/intro_to_art_ in_88/" Content-Location: "http://www.koth.org/info/intro_to_art_ in_88/" Intro to Art in '88: Index

Index of Intro to Art in '88

[DIR] code/                   02-Jun-1999 01:15      -  
[TXT] misc.html               02-Jun-1999 01:12     7k  
[TXT] paper.html              02-Jun-1999 01:12     5k  
[TXT] replicator.html         02-Jun-1999 01:12     6k  
[TXT] scanner.html            02-Jun-1999 01:12    12k  
[TXT] vamp.html               02-Jun-1999 01:12     2k  
[TXT] vampire.html            02-Jun-1999 01:12     2k
--------------8A58384862F0402278FA1328 Content-Type: text/html; charset=us-ascii; name="chapter2.html" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="chapter2.html" Content-Base: "http://www.koth.org/info/chapter2.html" Content-Location: "http://www.koth.org/info/chapter2.html" MFCWB: Chapter Two

MY FIRST COREWAR BOOK


Chapter 2: Stones


If you are fast and small, you can find the enemy before the enemy finds you. This is the philosophy of pattern bombers, a group of warriors much maligned by frustrated corewar enthusiasts trying to make intelligent warriors. But the fact remains, frenzied maniacs can often kill the slow brooding kind.

Pattern Bombers are also refered to as stones, as part of the stone - scissors - paper analogy. Scissors, which includes vampires and scanners, are bigger than stones and therefore tend to get beat up by them more often. Paper, also known as a replicator, is a program that makes copies of itself throughout the core faster than a pattern bomber can destroy all of them. Stones are thus ineffectual against paper, or at least they were until W. Mintardjo stuck a two-pass core-clear on one of his stones. 


--1--

Name:           Dwarf
Author:         A.K.Dewdney
Speed:          33.33% of c
Size:           4
Durability:     Weak
Effectiveness:  Average
Score:

bomb   DAT #0
dwarf  ADD #4, bomb
       MOV bomb, @bomb
       JMP dwarf
end dwarf
Dwarf bombs every fourth instruction with DAT instructions in hopes that enemy processes will execute this code and die. Since 4 divides coresize, Dwarf will never drop a bomb on itself. Because Dwarf only hits every fourth instruction, it is a mod-4 bomber.

HOW IT WORKS: Before anything executes, core looks like this:

DAT #0, #0          ;bomb
ADD #4, -1    (1)
MOV -2, @-2
JMP -2, 0
Then process (1) adds 4 to the B-field of bomb:
DAT #0, #4          ;bomb
ADD #4, -1
MOV -2, @-2   (2)
JMP -2, 0
Process (2) moves bomb 4 instuctions forward, where the B-field of bomb points to:
DAT #0, #4          ;bomb
ADD #4, -1
MOV -2, @-2
JMP -2, 0     (3)
DAT #0, #4
Process (3) simply makes the program loop back to the beginning.
DAT #0, #4          ;bomb
ADD #4, -1    (4)
MOV -2, @-2
JMP -2, 0
DAT #0, #4
Process (4) adds 4 to the B-field of bomb:
DAT #0, #8          ;bomb
ADD #4, -1
MOV -2, @-2   (5)
JMP -2, 0
DAT #0, #4
Process (5) drops the next bomb where the B-field of bomb is pointing.
DAT #0, #8
ADD #4, -1
MOV -2, @-2
JMP -2, 0     (6)
DAT #0, #4



DAT #0, #8
Process (6) loops back, and bomb after bomb are dropped forward through core. 

--2--

Name:           Stone
Author:         Matthew Householder
Speed:          33.34% of c
Size:           4
Durability:     Weak
Effectiveness:  Average
Score:

start MOV <2, 3
      ADD d1, start
      JMP start
      DAT #0
d1    DAT #-5084, #5084
end start
Stone is a mod-4 bomber like Dwarf, but with two important improvements. First, the step-size has been increased somewhat for better distribution of bombs against larger opponents. Second, Stone decrements other adresses while it bombs. Decrementing opponent's code may wound it so that DAT bombs can destroy it later.

HOW IT WORKS: Pre-decrement indirect addressing can be tricky, so we shall use the intuitive approach, even though it yields wrong results for weird instructions like MOV <0,<1. See "tutorial.2" or the ICWS '94 standard for precise details.

When Stone is loaded, core looks like this below. The DAT #0,#0 instruction is used only as a spacer between the executable code and the other DAT statement, as we shall shortly see.

MOV <2, 3          (1)
ADD 3, -1
JMP -2, 0
DAT #0, #0
DAT #-5084, #5084
The B-field of the JMP instruction (pointed to by the A-field of the MOV instruction) is decremented, so that it now points to the ADD instruction. This ADD instruction is now moved to the DAT #0,#0 instruction (pointed to by the B-field of the MOV instruction). Core now looks like this:
MOV <2, 3
ADD 3, -1          (2)
JMP -2, -1             ;this has been decremented
ADD 3, -1              ;this has been copied
DAT #-5084, #5084
This last sequence may be a little misleading, because it looks like we are dropping ADD 3,-1 bombs throughout core. We shall see this is not usually the case.

We now come to the ADD 3,-1 instruction. Since this ADD is not immediate, as it was in Dwarf, the A-operand of the DAT instruction is added to the A-operand of the MOV instruction and the B-operand of the DAT instruction is added to the B-operand of the MOV instruction:

MOV <-5082, 5087
ADD 3, -1
JMP -2, -1         (3)
ADD 3, -1
DAT #-5084, #5084
The executing process now jumps back (the -1 in the B-field is ignored).
MOV <-5082, 5087   (4)
ADD 3, -1
JMP -2, -1
ADD 3, -1
DAT #-5084, #5084
Process (4) drops another bomb: the location -5082 behind the MOV instruction is decremented and whatever it points to is moved 5087 in front of the MOV instruction. The pattern continues until someone is killed or time runs out.

Stone, then, doesn't really drop bombs as such, but rather moves instructions around core in a pseudo-random fashion. But since core is initialized to DAT 0,0, most of the instructions it moves are deadly DAT statements. This process is called transposition in the literature. 


--3--

Name:           Armadillo
Author:         Stefan Strack
Speed:          32.86% of c
Size:           5
Durability:     Strong
Effectiveness:  Average
Score:

bomb    SPL 0
loop    ADD #3039, ptr
ptr     MOV bomb, 81
        JMP loop
        MOV 1, <-1
end bomb
Armadillo drops SPL 0 bombs throughout core to stun the enemy, and then lays down a DAT carpet (also called a core-clear) to kill the enemy. This is one of the earliest bombers that used a core-clear to erase all of memory. It scores 100% wins against Wait (program 1, chapter 1) where Dwarf and Stone only score 25% wins and 75% ties. In my experience, SPL bombs are the most effective single-instruction bomb a warrior can drop. However, SPL bombs don't kill many programs cleanly, don't allow you to simultaneously bomb the rest of the core with decrements, and don't paralyze the opponent as well as the multi-instruction bombs that scanners drop.

Another innovation in Armadillo is the use of a SPL 0 instruction inside the warrior. If any of the other instuctions are hit with DAT bombs, the program may not operate correctly, but the bomb doesn't kill all of the processes. Additionally, this self-splitting code generates enough processes that imps cannot kill Armadillo by themselves.

HOW IT WORKS: When Armadillo is loaded into core, it looks like this:

SPL 0, 0       (1)
ADD #3039, 1
MOV -2, 81
JMP -2, 0
MOV 1, <-1
Process (1) splits into processes (2) and (3).
SPL 0, 0      (3)
ADD #3039, 1  (2)
MOV -2, 81
JMP -2, 0
MOV 1, <-1
Process (2) executes and process (3) splits.
SPL 0, 0      (6)
ADD #3039, 1  (5)
MOV -2, 3120  (4)
JMP -2, 0
MOV 1, <-1
Process (4) drops a split bomb, process (5) changes the bombing location, and process (6) splits.
SPL 0, 0      (10)
ADD #3039, 1   (9)
MOV -2, -1841  (8)
JMP -2, 0      (7)
MOV 1, <-1
Process (7) jumps back in order to conserve processes, (8) bombs, (9) changes the bombing location, and (10) splits.
SPL 0, 0      (15)
ADD #3039, 1  (14) (11)
MOV -2, 1198  (13)
JMP -2, 0     (12)
MOV 1, <-1
And so the process continues. The ever-lengthening string of processes executes the code (backwards!) that drops the SPL bombs. Eventually, a SPL 0,0 gets dropped on the JMP statement:
SPL 0, 0
ADD #3039, 1
MOV -2, 1
SPL 0, 0      (1)
MOV 1, <-1
The loop is broken, and all of the processes fall through to this second SPL instruction eventually. We examine this last bit of code as if there were only one process running at the SPL instruction, since the program doesn't depend on process order from this point on. Process (1) splits:
SPL 0, 0
ADD #3039, 1
MOV -2, 1
SPL 0, 0      (3)
MOV 1, <-1    (2)
Process (2) decrements the B-field of the SPL instruction (which the SPL instruction doesn't need) and moves the blank (DAT 0,0) instruction to where the SPL instruction points:
SPL 0, 0
ADD #3039, 1

SPL 0, -1    (3)
MOV 1, <-1
            (4)
Process (3) splits:
SPL 0, 0
ADD #3039, 1

SPL 0, -1    (6)
MOV 1, <-1   (5)
             (4)
Now process (4) executes an illegal instruction and dies, (5) decrements the SPL instruction again and bombs the next instruction backwards, and (6) splits:
SPL 0, 0


SPL 0, -2    (9)
MOV 1, <-1   (8)
             (7)
This pattern repeats until eventually the core clear wraps around and erases itself. Just before this erasure occurs, core looks like this:
SPL 0, 2     (23997)
MOV 1, <-1   (23996)
             (23995)
Process (23995) dies as usual, but this time, when process (23996) bombs, it erases the bombing instruction:
SPL 0, 2     (23997)

             (23998)
Now, if we ignore all of the dying processes, we see that this SPL command keeps splitting processes to itself, keeping the warrior alive. 

--4--

Name:           Cannonade Stone
Speed:          24.51% of c
Size:           5
Durability:     Average
Effectiveness:  Good
Score:

      MOV <6, 1
start SPL -1, <5144
      ADD 3, -2
      DJN -2, <5142
      DAT #0, #0
      MOV 190, <-190
end start
Cannonade Stone takes the idea of self-splitting code to another level. Altough it bombs somewhat slower than other bombers, it splits off processes so quickly that a stun attack on other components of the warrior will not halt the execution of the stone. The bombing run hits every fifth instruction, with a transposition at every tenth position and a decrement between each transposition. Additionally, a DJN-stream is laid through memory, giving another form of attack without increasing the size or speed of the program. At the end of the bombing run, Cannonade Stone converts into a core-clear and partial imp-gate.

HOW IT WORKS: When Cannonade Stone is first loaded into memory, it looks like this:

MOV <6, 1
SPL -1, <5144   (1)
ADD 3, -2
DJN -2, <5142
DAT #0, #0
MOV 190, <-190
Process (1) splits:
MOV <6, 1       (3)
SPL -1, <5144
ADD 3, -2       (2)
DJN -2, <5142
DAT #0, #0
MOV 190, <-190
Now processes (2) and (3) execute, adding and then bombing like every other stone.
MOV <196, -189
SPL -1, <5144   (5)
ADD 3, -2
DJN -2, <5142   (4)
DAT #0, #0
MOV 190, <-190
Process (4) usually jumps back to the SPL instruction (more on this in a moment), and the pattern repeats: each process at the SPL command splits into two processes, which add and bomb in rapid succession.

At the end of the bomb run, the bomber mutates itself into a core-clear. The SPL -1,<5144 instruction is overwritten with the MOV 190,<-190 instruction. The executng portion of code then looks like this:

MOV 190, <-190
ADD 3, -2
DJN -2, <5142
The first instruction performs the core-clear, the second instruction does nothing of strategic worth, and the third instruction loops processes back to the first instruction. Additionally, the decrement in the MOV command sets up a partial (33%) imp-gate 190 instructions before it, and the decrement in the DJN instruction sets up a second partial (33%) imp gate 2666 instructions before the first one. Since 2667 is the magic number for 3-point imps, these instructions defend the bomber against 3-point imps at roughly 67% efficiency.

Let us examine in more detail how the DJN -2,<5142 instruction works. When it is executed, the predecrement in the B-field decrements the instruction 5142 after the DJN intstruction, which is probably a DAT 0,0 command:

DJN -2, <5142
...
DAT 0, -1
The DJN instruction now decrements the instruction before that, which probably doesn't have a B-value of 1, so the executing process jumps back to the beginning of the loop:
DJN -2, <5142
...
DAT 0, -1        ;this was decremented by the DJN
DAT 0, -1        ;this was decremented by the <
The next time the DJN instruction is executed, the B-field 5142 after the instruction is decremented, and so is the instruction pointed by that B-field (2 before it):
DJN -2, <5142
...
DAT 0, -1        ;this was decremented by the DJN
DAT 0, -1
DAT 0, -2        ;this was decremented by the <
As the DJN instruction is repeatedly executed, a carpet of decrements is laid down backwards through core.

This is not exactly the pattern that is laid down in core, because the SPL -1,<5144 command decrements the same B-field as the DJN instruction does. This adds gaps in the DJN-stream, making it more spread out and liable to hit the enemy program. Additionally, it turns the B-field into a better partial imp-gate.

We have made two assumptions: First, that the instruction 5142 after the DJN instruction is DAT 0,0; second, that the instruction pointed to by that instruction does not have a B-field of 1. If the first assumption fails, the worst that can happen is a non-zero B-field, in which case the DJN stream is laid somewhere else. If the second assumption fails, then the executing process does not jump back and proceeds instead to an illegal instruction. Fortunately, this is just one of many processes, so the bombing loop is not seriously affected. This result may be compunded, however, if the enemy has lots of B-fields with value 1. 


--5--

Name:           Night Crawler Stone
Author:         Wayne Sheppard
Speed:          32.86% of c
Size:           4
Durability:     Strong
Effectiveness:  Good
Score:

start SPL 0, <-1001
      MOV <21, 1+2234
      SUB 1, -1
      DJN -2, <-2234
end start
Night Crawler Stone is a self-splitting mod-2 bomber with a DJN-stream. When it finishes its bombing run, it turns into code that performs an addition core-clear.

HOW IT WORKS: Night Crawler Stone bombs memory similarly to Stone, with the obvious improvements that Night Crawler Stone bombs in a tighter mod-2 pattern, is self-splitting, uses a DJN-stream, and embeds the bombing step size in the executing code, making it one instruction smaller.

After the SPL 0,<-1001 instruction has split off about 144 processes into the main loop, it is bombed, making the effective size of Night Crawler Stone only 3 instructions long. Just before the bomber hits the bombing loop, the SUB 1,-1 instruction is decremented, starting an addition core-clear.

Unlike traditional core-clears, the addition core-clear doesn't overwrite core with DAT statements. Instead, it modifies the A- and B-fields of the instructions to mess up the enemy's control structures. For example, a SPL 0 that survived the bombing run becomes a SPL 2 which will not hold processes by itself. An addition core-clear is only slightly less effective than a traditional core-clear, and requires no additional instructions to run.

Just before the addition core-clear takes effect, Night Crawler Stone looks like this:

DAT 0, -1
MOV <1, 3895     (12938) (12941) ...
SUB 1, -1        (12940) (12943) ...
DJN -2, <-2234   (12939) (12942) ...
Process (*38) executes, decrementing the SUB instruction and doing a copy:
DAT 0, -1
MOV <1, 3895     (12941) ...
SUB 1, -2        (12940) (12943) ...
DJN -2, <-2234   (12939) (12942) ...
Process (*39) executes, laying down another decrement in the DJN stream. Process (*40) then executes, changing the A- and B-operands of the DAT statement:
DAT 2, 2233
MOV <1, 3895     (12941) ...
SUB 1, -2        (12943) ...
DJN -2, <-2234   (12942) ...
Process (*41) executes, decrementing the SUB instruction again, and then (*43) modifies the operands of the next instruction back:
DAT 2, 2234
DAT 2, 2233
MOV <1, 3895
SUB 1, -3
DJN -2, <-2234
So goes the core-clear, until at the end the DJN instruction is hit and turns into DJN 0,<0, where all of the processes go and execute repeatedly, laying down a DJN stream until time expires. 

--6--

Name:           Keystone Stone
Speed:          32.86% of c
Size:           5
Durability:     Strong
Effectiveness:  Good
Score:

step equ 2517
emerald SPL 0, <-25
        MOV <-step+1, 92
        SUB 2, -1
        DJN -2, <2002
        JMP step, <-step
wait    DJN 0, <-12
paper   DJN 0, <-12
boot    MOV emerald+4, paper-step
        MOV emerald+3, <boot
        MOV emerald+2, <boot
        MOV emerald+1, <boot
        MOV emerald,   <boot
        MOV wait, paper+3053
        JMP @boot
end boot
After initialization, Keystone Stone bombs with a mod-1 pattern which approximates mod-4. If paper is detected, processes are split to the label "paper," where some code can be inserted to withstand paper attacks. When the bombimg run is over, Keystone Stone turns itself into an imp gate. (P.Kline's Keystone uses this gate as a backup strategy. Under normal operation, an external core-clear erases this stone.)

HOW IT WORKS: To set things up, the imp-gate (labelled "wait") needs to be copied away from the main block of code. Rather than adding an instruction to the main block to do this, the boot-strapping code (imaginatively labelled "boot") copies the stone and the imp-gate away from itself.

This has two advantages when fighting warriors that search through memory for the enemy. First, the copied code containing the executing stone is kept small, making it more difficult to locate. Second, the original code acts as a decoy for the enemy. In fact, many programs pad the block of original code with nonsense instructions to make a larger decoy for the enemy to grapple with. Almost all modern stones use boot-strapping and decoys to slow down the enemy.

When the initialization is finished, the stone starts a typical bombing run. If a process executing the DJN instruction finds a B-operand of 1, it falls out of the loop, executes the JMP instruction, and ends up at the label "paper," where some paper-stomping code should be inserted. The rationale behind this is that typically only paper has a B-operand of 1.

The bombing run ends with the DJN -2,<2002 instruction being hit, but not with a typical DAT bomb. Because of clever planning, the imp-gate instruction overwrites the DJN -2 instruction. The bomber now looks like this:

SPL 0, <-25
MOV <-step+1, 2
SUB 2, -1
DJN 0, <-12
JMP 2517, <-2517
Nearly all of the processes in the stone end up executing the DJN 0 instruction, forming an imp-gate. Along with killing imps, this imp-gate lays down a DJN-stream for extra program mangling. And processes falling through the DJN instruction don't matter much, because the SPL 0 instruction slowly generates new processes. 

--7--

Name:           Winter Werewolf
Author:         W. Mintardjo
Speed:          25% of c
Size:           7
Durability:     Weak
Effectiveness:  Excellent
Score:

step equ 153
init equ 152
n equ ((12*8)-2)
data    DAT <-4-n, #0
split   SPL 0, <-3-step-n
main    MOV jump, @3
        MOV split, <2
        ADD #step, 1
        JMP main, init
        MOV @-4, <n
jump    JMP -1, 1
boot    MOV main+5, -500+5
        MOV main+4, <boot
        MOV main+3, <boot
        MOV main+2, <boot
        MOV main+1, <boot
        MOV main,   <boot
        MOV main-1, <boot
        MOV data, boot-500-3-n
        JMP boot-500
end boot
Winter Werewolf is a mod-8 bomber more in the spirit of Armadillo than Stone -- it drops specialized bombs througout core to stun the enemy, and then kills the enemy with a core-clear. It outscores Armadillo in three major aspects: It drops a more effective SPL/JMP bomb, it uses a two-pass core-clear, and it degrades into a perfect imp-gate to mop up any stray imps. The first pass of the core-clear lays down a SPL 0 stream to make sure the enemy is Really Stunned, and the second pass of the core-clear lays down DAT statements that kill the enemy. Winter Werewolf was one of the first modern programs that could compete against imp-rings.

HOW IT WORKS: After the boot-strapping routine, Winter Werewolf looks like this:

DAT <-98, #0
...
SPL 0, <-250
MOV 5, @3     (1)
MOV -2, <2
ADD #153, 1
JMP -3, 152
MOV @-4, <94
JMP -1, 1
The next two instructions drop a SPL/JMP bomb. Fist the JMP -1,1 instruction is copied:
DAT <-98, #0
...
SPL 0, <-250
MOV 5, @3
MOV -2, <2    (2)
ADD #153, 1
JMP -3, 152
MOV @-4, <94
JMP -1, 1
...
JMP -1, 1
The next instruction decrements the bomb pointer and copies the SPL 0,<-250 instruction to the new location:
DAT <-98, #0
...
SPL 0, <-250
MOV 5, @3
MOV -2, <2
ADD #153, 1   (3)
JMP -3, 151
MOV @-4, <94
JMP -1, 1
...
SPL 0, <-250
JMP -1, 1
The next instruction changes the bomb pointer in preparation for dropping the next bomb.
DAT <-98, #0
...
SPL 0, <-250
MOV 5, @3
MOV -2, <2
ADD #153, 1
JMP -3, 302   (4)
MOV @-4, <94
JMP -1, 1
...
SPL 0, <-250
JMP -1, 1
Finally, the JMP instrction loops to bomb the next location. The B-operand of the JMP instruction is ignored, allowing it to be used as the bomb pointer. The bombing run hits every eighth locoation with one of these bombs. The big trick at this point is to have the program bomb itself without getting trapped in a SPL/JMP loop itselfÈthe bombing run is over, the program looks like this (if we reset the process counter):
DAT <-98, #0
...
SPL 0, <-250
MOV 5, @3     (1)
MOV -2, <2
ADD #153, 1
JMP -3, 0
MOV @-4, <94
JMP -1, 1
When this first instruction is executed, the bomb pointer is bombed with the JMP -1, 1 instruction.
DAT <-98, #0
...
SPL 0, <-250
MOV 5, @3
MOV -2, <2    (2)
ADD #153, 1
JMP -1,1
MOV @-4, <94
JMP -1, 1
But, since the B-field of the bomb pointer just got changed to 1, the next bomb hits the bomb pointer, too. Remember, first the pointer is decremented...
DAT <-98, #0
...
SPL 0, <-250
MOV 5, @3
MOV -2, <2
ADD #153, 1
JMP -1,0
MOV @-4, <94
JMP -1, 1
...and then the SPL bomb is dropped.
DAT <-98, #0
...
SPL 0, <-250
MOV 5, @3
MOV -2, <2
ADD #153, 1   (3)
SPL 0, <-250
MOV @-4, <94
JMP -1, 1
Now the most subtle command of the whole program executes: The B-field of the new SPL 0,<-250 command is altered. We shall see later why this is important.
DAT <-98, #0
...
SPL 0, <-250
MOV 5, @3
MOV -2, <2
ADD #153, 1
SPL 0, <-97   (4)
MOV @-4, <94
JMP -1, 1
Now the core-clear begins. The SPL 0,<-97 instruction splits off processes and the JMP -1,1 instruction speeds up the core-clear, but it is the MOV @-4,<94 command that does the actual core-clear, and this deserves further comment.

The A-field of the MOV @-4,<94 instruction points to the MOV 5,@3 command that points to the SPL 0,<-97 instruction. Since the A-field uses indirect addressing, we are carpteing the core with SPL 0,<97 instructions for now. If the B-field of the MOV @-4,<94 instruction pointed to an instruction with zero B-field, this would yeild a very short (93 instruction) core-clear before the MOV command erased itself. But because of the bombing run, the B-field points to a SPL 0,<-250 command. So the pointers look like this:

     <---------------------------------
...                                   |
DAT <-98, #0                          |
...                                   |
SPL 0, <-250                          |
MOV 5, @3    ---- <----               |
MOV -2, <2      |     |               |
ADD #153, 1     |     |               |
SPL 0, <-97 <----     |               |
MOV @-4, <94 A-field---  B-field---   |
JMP -1, 1                         |   |
...                               |   |
SPL 0, <-250 <--------------------- ---
After the first process executes the MOV @-4,<94 instruction, the pointers look like this:
SPL 0, <-97 <--------------------------
...                                   |
DAT <-98, #0                          |
...                                   |
SPL 0, <-250                          |
MOV 5, @3    ---- <----               |
MOV -2, <2      |     |               |
ADD #153, 1     |     |               |
SPL 0, <-97 <----     |               |
MOV @-4, <94 A-field---  B-field---   |
JMP -1, 1                         |   |
...                               |   |
SPL 0, <-251 <--------------------- ---
And after the second process executes this instruction, the pointers look like this:
SPL 0, <-97 <--------------------------
SPL 0, <-97                           |
...                                   |
DAT <-98, #0                          |
...                                   |
SPL 0, <-250                          |
MOV 5, @3    ---- <----               |
MOV -2, <2      |     |               |
ADD #153, 1     |     |               |
SPL 0, <-97 <----     |               |
MOV @-4, <94 A-field---  B-field---   |
JMP -1, 1                         |   |
...                               |   |
SPL 0, <-251 <--------------------- ---
And so the core-clear goes, filling the entire core with SPL 0,<-97 commands, until the B-field pointer gets overwritten:
DAT <-98, #0
...
SPL 0, <-250
MOV 5, @3    ---- <----
MOV -2, <2      |     |  <-------------
ADD #153, 1     |     |               |
SPL 0, <-97 <----     |               |
MOV @-4, <94 A-field---  B-field---   |
JMP -1, 1                         |   |
...                               |   |
SPL 0, <-97 <---------------------- ---
This is where the ADD instruction mentioned above becomes so vital. If this pointer were overwritten by a SPL 0,<-250 command, the SPL core-clear would repeat, and the program would never get around to killing off the opponent.

Note that the new pointer value skips over most of the core-clearing code, allowing the program to start a second core-clear. And the next iteration of MOV @-4,<94 does even more pointer magic, overwriting the A-field pointer with the SPL 0,<-97 instruction:

DAT <-98, #0 <---
...             |
SPL 0, <-250    |
SPL 0, <-97  ---- <----  <-------------
MOV -2, <2            |               |
ADD #153, 1           |               |
SPL 0, <-97           |               |
MOV @-4, <94 A-field---  B-field---   |
JMP -1, 1                         |   |
...                               |   |
SPL 0, <-98 <---------------------- ---
Because the A-field pointer now points to the DAT <-98,#0 command, this bomb is dropped next:
DAT <-98, #0 <---
...             |
DAT <-98, #0    | <--------------------
SPL 0, <-97  ---- <----               |
MOV -2, <2            |               |
ADD #153, 1           |               |
SPL 0, <-97           |               |
MOV @-4, <94 A-field---  B-field---   |
JMP -1, 1                         |   |
...                               |   |
SPL 0, <-98 <---------------------- ---
This starts the second core-clear, using DAT statements to finally kill the enemy processes. Like the first core-clear, this one continues until it wraps around and overwrites the B-field pointer again:
DAT <-98, #0 <---
...             |
SPL 0, <-97  ---- <----
MOV -2, <2            |
ADD #153, 1           |
SPL 0, <-97           |
MOV @-4, <94 A-field---  B-field---
JMP -1, 1                         |
...                        |
DAT <-98, #0 <---------------------
But this time, the new pointer does not cause the coreclear to skip the code. The core-clear continues until the MOV @-4,<94 instruction overwrites itself with the DAT <-98,#0 instruction:
SPL 0, <-97
MOV -2, <2
ADD #153, 1
SPL 0, <-97
DAT <-98, #0
DAT <-98, #0
The SPL 0,<-97 instruction keeps splitting processes to itself, keeping the program alive. The only other instruction that executes is the next one, which kills off all of the processes that execute it. Both of these instructions decrement the same instruction before the executing code, forming an imp-gate to kill off any remaining imp-spirals the enemy might have. 

--Conclusion--


One factor that could mean the difference between a top-rate stone and an unsuccessful stone is the choice of step size. The program that manages to bomb the enemy first has a decided advantage, and some bombing step sizes are more efficient at scanning for the enemy than others. So what makes a good step size?

Ideally, it ought to hit every location in 8000 bombs, every other location in 8000/2=4000 bombs, every third location in 8000/3=2667 bombs, etc. Unfortunately, this is impossible, especially with a single step size, but it suggests a basic strategy -- go for the biggest programs first and then fill in the gaps.

One way of rating the efficiency of a step size is to find the length of the largest unbombed section of code after each bomb is dropped. By adding up all of these lengths, we get a number that tells us how big an average gap is. (Indeed, by dividing this number by the number of bombs dropped, we get the average gap size.) If we minimize this number over all step sizes, we get the "Optima Numbers." For a coresize of 8000, these optima numbers are:

    mod-1  3359/3039  under-100 -> 73
    mod-2  3094/2234  under-100 -> 98
    mod-4  3364/3044  under-100 -> 76
    mod-5  3315/2365  under-100 -> 95
    mod-8  2936/2376
    mod-10 2930/2430
The constant for Night Crawler Stone, for instance, is taken from this table.

Another common rating is how closely to in half the new bomb subdivides the old gap when it is dropped. By taking the differences between where the bombs fall and the middle of each gap and adding these distances up, we get an alternate method for testing efficiency.

Both of these methods are useful for finding general-purpose step sizes. But suppose you wanted to find a step size optimized for killing other stones. Since stones usually have four or five instructions, you would want a step size that would bomb every 4th and 5th instruction quickly, regardless of how it does in general.

Fortunately, there is a program in the public domain that calculates all of these things quicky. Corestep by Jay Han can be found as misc/corestep.c, and calcutates optima numbers and optimal step sizes. You will need a C compiler to use it, but it is otherwise self-contained. For more infromation, FTP a copy and read through it. The classic formula calculates optima numbers, the alternate formula calculates the sum of the distances between bombs and midpoints, and find-X calculates optimal step sizes against a specific program length.

If you don't have access to a C compiler or want this for some other reason, P. Kline has compiled a list of all 8000 step-sizes with their mod, find-4, find-5, find-10, and find-13 numbers, along with imp-killing constants and imp-numbers. This table is designed for use in spreadsheets or databases. It is available in the misc/ directory under the name num8000.txt with documentation in num8000.doc. He used this on Keystone Stone to come up with a mod-1 constant with a low find-4 score, so that it would act like a mod-4 bomber but interfere with enemy scans (more about this in the next chapter).

Here is a list of successful stones. All of these can be found in warrior10.tar in the 88 directory, except for SJ-4A and Keystone t21, which are buried deep within the file feb94.txt.Z (in the newsgroup directory last time I checked.) Everything here by P.Kline has an anti-vamp component, which will be talked about in a later chapter.

"Leprechaun 1b" by Anders Ivner (leprechaun)
"Emerald 2" by P.Kline (emerald2)
"ExtraExtra 2" by P.Kline (extra2)
"Keystone t21" by P.Kline
"SJ-4A" by J.Layland
"Moonstone 1" by Dan Nabutovsky (moonstone)

Self-splitting stones with imp-rings can be very effective. Here is a list of imp-stone combos that are worth investigating. All of them except Cannonade can be found in warrior10.tar, and Cannonade can be found in the feb94.txt.Z file.

"Cannonade" by P.Kline
"Imprimis 6" by P.Kline (imprimis6)
"Night Crawler III" by Wayne Sheppard (nightcrawl)
"Sphinx 2.8" by W. Mintardjo (sphinx)


Program 1, Dwarf, was written by A.K. Dewdney for his Scientific American articles.

Program 2, Stone, was taken from the ICWS 1990 corewar tournament. It bears a remarkable resemblance to Rock by Scott Nelson, which was posted to the net a couple of months before the tournament. Strange, eh?

Program 4, Cannonade Stone was extracted from P.Kline's Cannonade.

Program 5, Night Crawler Stone without the SPL 0 was submitted as "No Ties Allowed," and confused the experts as to how something so deadly could fit into 3 lines.

Program 6, Keystone Stone, was stolen from P.Kline's "Keystone t21." The bootstrapping code in the example differs somewhat from the bootstrapping code used in Keystone.

Program 7, Winter Werewolf, originally did not copy the stone away from a decoy. I am led to speculate that the code as it exists here with a bigger decoy resembles Winter Werewolf 3, a program that was very successful on the hill. --------------8A58384862F0402278FA1328-- From: Lukasz Adamowski Subject: Re: Turing Wars Date: 4 Jan 2001 15:42:11 -0500 Message-ID: > > >I think you are confusing a turing machine with the turing test. > > > > > >http://www.ams.org/new-in-math/cover/turing.html > > > > Oh boy, now this makes even less sense to me. I read the stuff > > about what a real 'Turing Machine' is... and I fail to see the > > purpose of having a them battle. Some people think redcode is > > obtuse... I'd rather not start simulating giant rolls of paper > > tape... :-) Redcode is obtuse?! Never! It's brilliant, good looking and for professional hackers. And why not try to simulate Redcode on giant rolls of paper tape? %) > Pass this to the team who wanted to do Ray-tracing in Redcode. They I want to. Is there still anybody interested in this? (only joking ;) BTW I'm working at Flatcode simulator (afair Reinhard was thinking about this too) and will tell you what I worked out. I had some problems with... everything, but now it's going rather well (till I find another mistake and will have to change half of the code:). Lukasz From: aiforge@flatmem.de ("Dennis Luehring") Subject: Re: Re: Turing Wars Date: 5 Jan 2001 13:52:24 +0100 Message-ID: <000301c07716$589d17d0$1500a8c0@heindl.de> >Pass this to the team who wanted to do Ray-tracing in Redcode rey-tracing in redcode??? ... is there an homepage? ciao dennis -- Posted from natmail2.webmailer.de [192.67.198.65] via Mailgate.ORG Server - http://www.Mailgate.ORG From: Paul-V Khuong Subject: Re: Re: Turing Wars Date: 6 Jan 2001 12:06:08 -0500 Message-ID: <20010106165740.73903.qmail@web11603.mail.yahoo.com> No... the project was aborted 8) It was to do an entry in redcode, in a contest, but when they saw the challenge, well, they aborted it, i think... --- Dennis Luehring wrote: > >Pass this to the team who wanted to do Ray-tracing > in Redcode > rey-tracing in redcode??? ... is there an homepage? > > ciao dennis > > > > -- > Posted from natmail2.webmailer.de [192.67.198.65] > via Mailgate.ORG Server - http://www.Mailgate.ORG __________________________________________________ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.com/ From: Koth Subject: KOTH.ORG: Status - ICWS Experimental 94 01/08/01 Date: 8 Jan 2001 08:30:13 -0500 Message-ID: <200101080500.AAA02975@gevjon.ttsg.com> Weekly Status on 01/08/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG ICWS Experimental 94 CoreWar Hill: Last battle concluded at : Thu Dec 28 11:22:51 EST 2000 # %W/ %L/ %T Name Author Score Age 1 49/ 31/ 19 Random Reaper Dave Hillis 167 1 2 45/ 29/ 27 Controlled Aggression Ian Oversby 160 63 3 44/ 33/ 23 Black Moods Ian Oversby 156 59 4 46/ 38/ 17 Greetings From Asbury Par JKW 153 23 5 39/ 34/ 27 Ogre Christian Schmidt 145 11 6 29/ 15/ 56 Katafutr Michal Janeczek 144 3 7 33/ 26/ 40 Damage Inflicted Robert Macrae 141 2 8 25/ 13/ 63 Denial David Moore 137 4 9 28/ 21/ 51 Venom v0.2b Christian Schmidt 135 85 10 20/ 4/ 76 Black Box v1.1 JKW 135 26 11 23/ 12/ 65 Evol Cap 4 X John Wilkinson 133 132 12 18/ 5/ 77 Evolve X v4.0 John Wilkinson 131 80 13 33/ 37/ 30 Dr. Gate X Franz 129 103 14 30/ 35/ 36 test CS 124 20 15 33/ 42/ 26 Pattel's Virus X Ben Ford 123 7 16 22/ 24/ 54 Purple v0.1 Christian Schmidt 120 84 17 24/ 28/ 48 Rosebud Beppe 120 111 18 32/ 45/ 23 Pagan John K W 118 117 19 26/ 39/ 35 MorphinMerlin Jeremy K 114 46 20 32/ 51/ 18 S.E.T.I. 4-X JKW 112 133 21 2/ 66/ 32 Jolly Jumper 6 Stefan Foerster Subject: KOTH.ORG: Status - 94 No Pspace 01/08/01 Date: 8 Jan 2001 08:30:04 -0500 Message-ID: <200101080500.AAA02981@gevjon.ttsg.com> Weekly Status on 01/08/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG 94 No Pspace CoreWar Hill: Last battle concluded at : Tue Jan 2 12:11:17 EST 2001 # %W/ %L/ %T Name Author Score Age 1 37/ 23/ 40 Olivia Ben Ford 152 79 2 38/ 26/ 37 Quicksilver Michal Janeczek 150 113 3 37/ 24/ 39 Uninvited John Metcalf 149 33 4 44/ 39/ 18 Behemot Michal Janeczek 149 174 5 34/ 20/ 46 The Dark One Christian Schmidt 147 144 6 34/ 20/ 47 nPaper II Paul-V Khuong 147 351 7 44/ 41/ 15 Eraser II Ken Espiritu 146 308 8 40/ 34/ 26 Recount P.Kline 146 36 9 44/ 43/ 14 G2-b David Moore 145 137 10 37/ 30/ 33 Blacken Ian Oversby 144 598 11 34/ 24/ 42 Jade Ben Ford 144 420 12 45/ 47/ 7 He Scans Alone P.Kline 144 35 13 43/ 43/ 14 Stalker P.Kline 143 336 14 26/ 11/ 63 The Phantom Menace Anton Marsden 142 51 15 42/ 42/ 16 Jinx Christian Schmidt 142 314 16 29/ 20/ 51 KafuFFLe John Metcalf 139 34 17 35/ 35/ 30 Keyser Soze Anton Marsden 136 52 18 38/ 42/ 20 myBlur Paulsson 135 16 19 23/ 24/ 53 jam test 3 John Metcalf 121 17 20 36/ 54/ 10 Spray 'n Wipe 142 1 Steve Gunnell 119 1 21 2/ 98/ 0 1 1 7 0 From: Koth Subject: KOTH.ORG: Status - Standard 01/08/01 Date: 8 Jan 2001 08:30:09 -0500 Message-ID: <200101080500.AAA02963@gevjon.ttsg.com> Weekly Status on 01/08/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG Standard KotH CoreWar Hill : Last battle concluded at : Fri Dec 22 12:46:27 EST 2000 # %W/ %L/ %T Name Author Score Age 1 34/ 20/ 46 Freight Train David Moore 148 73 2 33/ 21/ 45 sIMPly.Red v0.95 Leonardo Humberto 145 30 3 32/ 20/ 47 Test Alexander (Sasha) Wa 144 12 4 32/ 21/ 47 Guardian Ian Oversby 142 72 5 37/ 35/ 28 PacMan David Moore 138 102 6 37/ 39/ 24 Stasis David Moore 135 180 7 25/ 16/ 59 EV Paper John K Wilkinson 135 86 8 40/ 44/ 16 Foggy Swamp Beppe Bezzi 135 69 9 28/ 22/ 50 Shish-Ka-Bob Ben Ford 133 28 10 39/ 45/ 16 Blur '88 Anton Marsden 133 110 11 26/ 19/ 55 Test I Ian Oversby 132 129 12 31/ 31/ 37 Frog Sticker P.Kline 132 22 13 26/ 21/ 53 Evoltmp 88 John K W 130 123 14 35/ 42/ 23 Beholder's Eye V1.7 W. Mintardjo 129 348 15 37/ 46/ 16 Iron Gate Wayne Sheppard 129 398 16 33/ 38/ 29 Stillborn Bomber v0.2 mjp 128 13 17 33/ 39/ 28 Tangle Trap David Moore 128 146 18 25/ 23/ 53 sic Leonardo H. Liporati 127 2 19 15/ 3/ 82 ]enigma[ Michal Janeczek 127 1 20 36/ 50/ 14 Blurstone '88 M. J. Pihlaja 123 67 21 19/ 59/ 22 Crazy Lukasz Anforowicz 80 0 From: John Metcalf Subject: Rubbish new email address... Date: Mon, 08 Jan 2001 11:00:54 +0000 Message-ID: <3A599DE6.2947D2FB@interbulletin.com> Hi, I've got a new email address, but it is really rubbish, mail vanishes without a trace. Please can anyone who has sent email to me at ORANGE.NET but not received a reply, please resend it my old (undesirable) email address - GRUMPY3039@HOTMAIL.COM, particularly if you sent me a text message about it :-) For those who don't know yet, my UK mobile number is 07866 049839, and there are dozens of Web sites which let you send SMS Messages to mobiles, e.g. LYCOS.CO.UK or UBOOT.COM CW79 very soon :-) Regards, John _______________________________________________ Submitted via WebNewsReader of http://www.interbulletin.com Complaint against spamming pls. to: abuse @ InterBulletin.com From: ransom@localhost.localdomain (Ransom Smith) Subject: Re: Turing Wars Message-ID: Date: Wed, 10 Jan 2001 00:52:43 GMT Atom Coffee wrote: > This is what i could come up with: > The 2 programs should take turns, these are just like corewars I think better would be to synchronize the turns, so that the tape scrolls all at one time. > The Turing arena is a circular tape of fixed length. One thing about a Turing machine is that it can scroll its tape forward or backward. If they're going different directions... ouch. Perhaps better to supply each machine with an input tape that it scrolls back and forth, and an output tape that it writes as the other sucks it up. > A Universal Turing Machine could be used so that the programmers have to > program the states. No, just hardwire the states instead of putting the directions on the tape. > All Programs must be able to terminate. Ay, there's the rub. My prototype warrior only terminates if, immediately after startup, it receives an EBCDIC representation of the theme song from Mister Ed, sung backwards and encoded with my own PGP key. I won't bother with offensive capability, as yours is probably the same way. -- ***tin/slrn trouble; sorry if this screws up*** From: Jon Nall Subject: Speaking of pMars clients was: Re: Windows pMARS? Date: Wed, 10 Jan 2001 18:54:01 -0800 Message-ID: also, i am pretty new to core wars, and am looking for a mac version. the pMars mac client on the page, seems to be quite feature-lacking, and redcoder won't even compile files on my iBook. i guess when OSX comes out, i can just compile the sourceforge version... thanks. nall. > Why hasn't pMARs been ported to Windows? I hate going to a DOS box as it is, > but when I switch to Win2k and their DOS emulator.... Who knows what pMARS > will be like. Would it be much too ard for the developers to simply take the > existing code and output it to a window somehow? I'm not complaining, just > curious. > > Thanks > > - Tim - > > From: jkw@austin.rr.com Subject: Re: Turing Wars Date: 10 Jan 2001 19:14:04 -0500 Message-ID: <4.1.20010110164444.00af4d30@pop-server> >> The Turing arena is a circular tape of fixed length. > >One thing about a Turing machine is that it can scroll its tape forward >or backward. If they're going different directions... ouch. Perhaps >better to supply each machine with an input tape that it scrolls back >and forth, and an output tape that it writes as the other sucks it up. >> All Programs must be able to terminate. > >Ay, there's the rub. My prototype warrior only terminates if, >immediately after startup, it receives an EBCDIC representation of >the theme song from Mister Ed, sung backwards and encoded with my own >PGP key. I won't bother with offensive capability, as yours is probably >the same way. Well if you have two seperate tapes, there's no such thing as offense. They're no longer Turing Machines if they have a seperate tape for offense? The only way there would be any possibility of offense is if they shared the same tape... but really this is just silly and I suggest we forget the whole thing. :) -jkw From: Lukasz Adamowski Subject: Re: Program Date: 11 Jan 2001 13:40:35 -0500 Message-ID: On Thu, 11 Jan 2001, Norbert Kilen wrote: > I have simple question. Could you recomend me good, shareware/freeware > corewars-programm > (to visualize battle, to edit warriors etc.). > > Norbert Are you using Windows? Notepad is the best warrior editor I know. :) Lukasz From: "Norbert Kilen" Subject: Program Date: Thu, 11 Jan 2001 17:14:47 +0100 Message-ID: <3a5dd9d8@news.vogel.pl> hi everybody! I have simple question. Could you recomend me good, shareware/freeware corewars-programm (to visualize battle, to edit warriors etc.). thanks, Norbert From: pak@ast.cam.ac.uk (Philip Kendall) Subject: Re: Program Date: 11 Jan 2001 17:16:33 -0000 Message-ID: <93kpph$edn@cass52> In article <3a5dd9d8@news.vogel.pl>, Norbert Kilen wrote: >hi everybody! >I have simple question. Could you recomend me good, shareware/freeware >corewars-programm >(to visualize battle, to edit warriors etc.). No, but I can recommend a very good open source [1] one: pMARS. The latest version is always on SourceForge: https://sourceforge.net/projects/corewar/ With regard to editing warriors, they're just plain text files, so get out your favourite editor [2]. HTH, Phil [1] Free Software. Whatever :-) [2] Has anyone ever written a Redcode mode for Emacs? From: jkw@austin.rr.com Subject: Re: Program Date: 12 Jan 2001 09:48:52 -0500 Message-ID: <4.1.20010111234707.00aeeda0@pop-server> >[2] Has anyone ever written a Redcode mode for Emacs? No but I've got a wordfile.txt UltraEdit file that does some decent color coding for redcode... (I know lots are missing, but I just added ones on as I noticed they were missing, heh...) -----cut/paste into wordfile.txt---- /L6"RedCode" Line Comment = ; Escape Char = \ File Extensions = RED /C1 add add.a add.ab add.i add.f cmp.i dat div.i djn djn.a djn.b djn.f djn.i jmn jmn.a jmn.b jmn.f jmp jmp.ba jmp.f jmp.i jmz jmz.a jmz.f jmz.b ldp.a ldp.b mod.ba mov mov.a mov.ab mov.b mov.ba mov.i mov.x mul.x nop seq.i slt.ab slt.b sne.i sne.f spl spl spl.i spl.ba stp.b stp.a sub sub.f sub.x /C2 for rof equ end org From: Koth Subject: KOTH.ORG: Status - Standard 01/15/01 Date: 15 Jan 2001 01:18:48 -0500 Message-ID: <200101150500.AAA27993@gevjon.ttsg.com> Weekly Status on 01/15/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG Standard KotH CoreWar Hill : Last battle concluded at : Fri Dec 22 12:46:27 EST 2000 # %W/ %L/ %T Name Author Score Age 1 34/ 20/ 46 Freight Train David Moore 148 73 2 33/ 21/ 45 sIMPly.Red v0.95 Leonardo Humberto 145 30 3 32/ 20/ 47 Test Alexander (Sasha) Wa 144 12 4 32/ 21/ 47 Guardian Ian Oversby 142 72 5 37/ 35/ 28 PacMan David Moore 138 102 6 37/ 39/ 24 Stasis David Moore 135 180 7 25/ 16/ 59 EV Paper John K Wilkinson 135 86 8 40/ 44/ 16 Foggy Swamp Beppe Bezzi 135 69 9 28/ 22/ 50 Shish-Ka-Bob Ben Ford 133 28 10 39/ 45/ 16 Blur '88 Anton Marsden 133 110 11 26/ 19/ 55 Test I Ian Oversby 132 129 12 31/ 31/ 37 Frog Sticker P.Kline 132 22 13 26/ 21/ 53 Evoltmp 88 John K W 130 123 14 35/ 42/ 23 Beholder's Eye V1.7 W. Mintardjo 129 348 15 37/ 46/ 16 Iron Gate Wayne Sheppard 129 398 16 33/ 38/ 29 Stillborn Bomber v0.2 mjp 128 13 17 33/ 39/ 28 Tangle Trap David Moore 128 146 18 25/ 23/ 53 sic Leonardo H. Liporati 127 2 19 15/ 3/ 82 ]enigma[ Michal Janeczek 127 1 20 36/ 50/ 14 Blurstone '88 M. J. Pihlaja 123 67 21 19/ 59/ 22 Crazy Lukasz Anforowicz 80 0 From: Koth Subject: KOTH.ORG: Status - 94 No Pspace 01/15/01 Date: 15 Jan 2001 01:18:52 -0500 Message-ID: <200101150500.AAA28008@gevjon.ttsg.com> Weekly Status on 01/15/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG 94 No Pspace CoreWar Hill: Last battle concluded at : Sun Jan 14 19:16:32 EST 2001 # %W/ %L/ %T Name Author Score Age 1 35/ 23/ 43 Olivia Ben Ford 146 84 2 42/ 39/ 18 Behemot Michal Janeczek 146 179 3 43/ 43/ 14 G2-b David Moore 143 142 4 42/ 42/ 16 Eraser II Ken Espiritu 143 313 5 45/ 48/ 7 He Scans Alone P.Kline 143 40 6 38/ 35/ 27 Recount P.Kline 142 41 7 36/ 30/ 35 Blacken Ian Oversby 141 603 8 42/ 43/ 15 Stalker P.Kline 140 341 9 33/ 26/ 41 Quicksilver Michal Janeczek 140 118 10 30/ 20/ 50 The Dark One Christian Schmidt 140 149 11 32/ 25/ 43 Uninvited John Metcalf 140 38 12 41/ 43/ 16 Jinx Christian Schmidt 139 319 13 29/ 20/ 52 nPaper II Paul-V Khuong 138 356 14 30/ 24/ 46 Jade Ben Ford 135 425 15 33/ 35/ 32 Keyser Soze Anton Marsden 132 57 16 36/ 42/ 21 myBlur Paulsson 130 21 17 20/ 11/ 68 The Phantom Menace Anton Marsden 130 56 18 25/ 20/ 56 KafuFFLe John Metcalf 130 39 19 35/ 53/ 13 Hyperclear 4+ Steve Gunnell 117 1 20 19/ 24/ 57 jam test 3 John Metcalf 115 22 21 6/ 44/ 50 Monty Lukasz Adamowski 69 0 From: Koth Subject: KOTH.ORG: Status - ICWS Experimental 94 01/15/01 Date: 15 Jan 2001 01:18:44 -0500 Message-ID: <200101150500.AAA28003@gevjon.ttsg.com> Weekly Status on 01/15/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG ICWS Experimental 94 CoreWar Hill: Last battle concluded at : Thu Dec 28 11:22:51 EST 2000 # %W/ %L/ %T Name Author Score Age 1 49/ 31/ 19 Random Reaper Dave Hillis 167 1 2 45/ 29/ 27 Controlled Aggression Ian Oversby 160 63 3 44/ 33/ 23 Black Moods Ian Oversby 156 59 4 46/ 38/ 17 Greetings From Asbury Par JKW 153 23 5 39/ 34/ 27 Ogre Christian Schmidt 145 11 6 29/ 15/ 56 Katafutr Michal Janeczek 144 3 7 33/ 26/ 40 Damage Inflicted Robert Macrae 141 2 8 25/ 13/ 63 Denial David Moore 137 4 9 28/ 21/ 51 Venom v0.2b Christian Schmidt 135 85 10 20/ 4/ 76 Black Box v1.1 JKW 135 26 11 23/ 12/ 65 Evol Cap 4 X John Wilkinson 133 132 12 18/ 5/ 77 Evolve X v4.0 John Wilkinson 131 80 13 33/ 37/ 30 Dr. Gate X Franz 129 103 14 30/ 35/ 36 test CS 124 20 15 33/ 42/ 26 Pattel's Virus X Ben Ford 123 7 16 22/ 24/ 54 Purple v0.1 Christian Schmidt 120 84 17 24/ 28/ 48 Rosebud Beppe 120 111 18 32/ 45/ 23 Pagan John K W 118 117 19 26/ 39/ 35 MorphinMerlin Jeremy K 114 46 20 32/ 51/ 18 S.E.T.I. 4-X JKW 112 133 21 2/ 66/ 32 Jolly Jumper 6 Stefan Foerster Subject: Re: Turing Wars Date: 16 Jan 2001 09:05:28 -0500 Message-ID: On Tue, 16 Jan 2001, Alex wrote: > Hi Folks, > why has this project been aborted? It sounds really....interesting! > *schluchz* > CU Alex When someone writes code for IEEE-754 doubles[1] in redcode I'll consider restarting the project. For a general idea as to how to go about it see Don Knuth's implementation in his MMIX interpreter in C: http://www-cs-faculty.stanford.edu/~knuth/mmix.html Joonas [1] The ray tracing programming challenge required this representation for real values. From: "Wayne Sheppard" Subject: Re: Newbie Message-ID: <1Q196.34$_j3.77507@news.nyc.globix.net> Date: Tue, 16 Jan 2001 15:05:03 -0500 You might try the FAQ that was posted to this same newsgroup just 2 hours before you posted your message. The Bl@ck Knight wrote in message news:wH%86.72821$JT5.2351368@news20.bellglobal.com... > Hello, I recently have gotten snagged by Corewars and have been intrested in > it and looking at the warriors that came with my linux mandrake, and have > been looking and am having some confusions about the redcode and corewar > languages..is there any documentation that gives a detailed break down on > the commands? in a easy to understand way? > I've come across a document out there corewars for dummies which is very > nice but not complete, and am looking for something like that.. > > but any detailed break down would be great if anyone can help me... > Thanks!!!! > > > Message-ID: From: anton@paradise.net.nz (Anton Marsden) Subject: Core War Frequently Asked Questions (rec.games.corewar FAQ) Date: 16 Jan 2001 15:41:55 GMT Archive-name: games/corewar-faq Last-Modified: September 4, 1999 Version: 4.2 URL: http://homepages.paradise.net.nz/~anton/cw/corewar-faq.html Copyright: (c) 1999 Anton Marsden Maintainer: Anton Marsden Posting-Frequency: once every 2 weeks Core War Frequently Asked Questions (rec.games.corewar FAQ) These are the Frequently Asked Questions (and answers) from the Usenet newsgroup rec.games.corewar. A plain text version of this document is posted every two weeks. The latest hypertext version is available at http://homepages.paradise.net.nz/~anton/cw/corewar-faq.html and the latest plain text version is available at http://homepages.paradise.net.nz/~anton/cw/corewar-faq.txt. This document is currently being maintained by Anton Marsden (anton@paradise.net.nz). Last modified: Sat Sep 4 00:22:22 NZST 1999 ------------------------------------------------------------------------ To Do * Add the new No-PSpace '94 hill location * Add online location of Dewdney's articles * Make question 17 easier to understand. Add a state diagram? * Add info about infinite hills, related games (C-Robots, Tierra?, ...) * New question: How do I know if my warrior is any good? Refer to beginners' benchmarks, etc. * Add a Who's Who list? * Would very much like someone to compile a collection of the "revolutionary" warriors so that beginners can see how the game has developed over the years. Mail me if interested. ------------------------------------------------------------------------ What's New * Changed primary location of FAQ (again!) * Changed Philip Kendall's home page address. * Updated list server information * Changed primary location of FAQ * Vector-launching code was fixed thanks to Ting Hsu. * Changed the location of Ryan Coleman's paper (LaunchPad -> Launchpad) * Changed pauillac.inria.fr to para.inria.fr ------------------------------------------------------------------------ Table of Contents 1. What is Core War 2. Is it "Core War" or "Core Wars"? 3. Where can I find more information about Core War? 4. Core War has changed since Dewdney's articles. Where do I get a copy of the current instruction set? 5. What is ICWS'94? Which simulators support ICWS'94? 6. What is the ICWS? 7. What is Core Warrior? 8. Where are the Core War archives? 9. Where can I find a Core War system for ...? 10. Where can I find warrior code? 11. I do not have FTP. How do I get all this great stuff? 12. I do not have access to Usenet. How do I post and receive news? 13. Are there any Core War related WWW sites? 14. What is KotH? How do I enter? 15. Is it DAT 0, 0 or DAT #0, #0? How do I compare to core? 16. How does SLT (Skip if Less Than) work? 17. What is the difference between in-register and in-memory evaluation? 18. What is P-space? 19. What does "Missing ;assert .." in my message from KotH mean? 20. How should I format my code? 21. Are there any other Core War related resources I should know about? 22. What does (expression or term of your choice) mean? 23. Other questions? ------------------------------------------------------------------------ 1. What is Core War? 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 processes of the opposing program to terminate, leaving your program in sole posession of the machine. There are Core War systems available for most computer platforms. Redcode has been standardised by the ICWS, and is therefore transportable between all standard Core War systems. The system in which the programs run is quite simple. The core (the memory of the simulated computer) is a continuous array of instructions, empty except for the competing programs. The core wraps around, so that after the last instruction comes the first one again. There are no absolute addresses in Core War. That is, the address 0 doesn't mean the first instruction in the memory, but the instruction that contains the address 0. The next instruction is 1, and the previous one obviously -1. However, all numbers are treated as positive, and are in the range 0 to CORESIZE-1 where CORESIZE is the amount of memory locations in the core - this means that -1 would be treated as CORESIZE-1 in any arithmetic operations, eg. 3218 + 7856 = (3218 + 7856) mod CORESIZE. Many people get confused by this, and it is particularly important when using the SLT instruction. Note that the source code of a program can still contain negative numbers, but if you start using instructions like DIV #-2, #5 it is important to know what effect they will have when executed. The basic unit of memory in Core War is one instruction. Each Redcode instruction contains three parts: * the opcode * the source address (a.k.a. the A-field) * the destination address (a.k.a. the B-field) The execution of the programs is equally simple. The MARS executes one instruction at a time, and then proceeds to the next one in the memory, unless the instruction explicitly tells it to jump to another address. If there is more than one program running, (as is usual) the programs execute alternately, one instruction at a time. The execution of each instruction takes the same time, one cycle, whether it is MOV, DIV or even DAT (which kills the process). Each program may have several processes running. These processes are stored in a task queue. When it is the program's turn to execute an instruction it dequeues a process and executes the corresponding instruction. Processes that are not killed during the execution of the instruction are put back into the task queue. Processes created by a SPL instruction are added to the task queue after the creating process is put back into the task queue. [ToC] ------------------------------------------------------------------------ 2. Is it "Core War" or "Core Wars"? 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. [ToC] ------------------------------------------------------------------------ 3. Where can I find more information about Core War? 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 two anthologies: Library of Author Title Published ISBN Congress Call Number The Armchair Dewdney, Universe: An New York: W. QA76.6 .D517 A. K. Exploration of H. Freeman �0-7167-1939-8 1988 Computer Worlds 1988 The Magic 0-7167-2125-2 Dewdney, Machine: A New York: W.(Hardcover), QA76.6 A. K. Handbook of H. Freeman �0-7167-2144-9 .D5173 1990 Computer Sorcery 1990 (Paperback) A.K. Dewdney's articles are still the most readable introduction to Core War, even though the Redcode dialect described in there is no longer current. For those who are interested, Dewdney has a home page at http://www.csd.uwo.ca/faculty/akd/. [ToC] ------------------------------------------------------------------------ 4. Core War has changed since Dewdney's articles. Where do I get a copy of the current instruction set? A draft of the official standard (ICWS'88) is available as ftp://www.koth.org/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 Mark Durham's tutorials, ftp://www.koth.org/corewar/documents/tutorial.1.Z and ftp://www.koth.org/corewar/documents/tutorial.2.Z. Steven Morrell has prepared a more practically oriented Redcode tutorial that discusses different warrior classes with lots of example code. This and various other tutorials can be found at http://www.koth.org/papers.html. Even though ICWS'88 is still the "official" standard, you will find that most people are playing by ICWS'94 draft rules and extensions. [ToC] ------------------------------------------------------------------------ 5. What is ICWS'94? Which simulators support ICWS'94? There is an ongoing discussion about future enhancements to the Redcode language. A proposed new standard, dubbed ICWS'94, is currently being evaluated. A major change is the addition of "instruction modifiers" that allow instructions to modify A-field, B-field or both. Also new is a new addressing modes and unrestricted opcode and addressing mode combination ("no illegal instructions"). ICWS'94 is backwards compatible; i.e. ICWS'88 warriors will run correctly on an ICWS'94 system. Take a look at the ICWS'94 draft at ftp://www.koth.org/corewar/documents/icws94.0202.Z for more information. There is a HTML version of this document available at http://www.koth.org/info/icws94.html. You can try out the new standard by submitting warriors to the '94 hills of the KotH servers. Two corewar systems currently support ICWS'94, pMARS (many platforms) and Redcoder (Mac), both available at ftp://www.koth.org/corewar. Note that Redcoder only supports a subset of ICWS'94. [ToC] ------------------------------------------------------------------------ 6. What is the ICWS? About one year after Core War first appeared in Scientific American, 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). The ICWS is no longer active. [ToC] ------------------------------------------------------------------------ 7. What is Core Warrior? Following in the tradition of the Core War News Letter, Push Off, and The 94 Warrior, Core Warrior is a newsletter about strategies and current standings in Core War. Started in October 1995, back issues of Core Warrior (and the other newsletters) are available at http://para.inria.fr/~doligez/corewar/. There is also a Core Warrior index page at http://www.kendalls.demon.co.uk/pak21/corewar/warrior.html which has a summary of the contents of each issue of Core Warrior. Many of the earlier issues contain useful information for beginners. [ToC] ------------------------------------------------------------------------ 8. Where are the Core War archives? 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 ftp://ftp.csua.berkeley.edu/pub/corewar. Also, most of past rec.games.corewar postings (including Redcode source listings) are archived there. Jon Blow (blojo@csua.berkeley.edu) is the archive administrator. When uploading to /pub/corewar/incoming, ask Jon to move your upload to the appropriate directory and announce it on the net. This site is mirrored at: * http://www.koth.org/corewar/ * ftp://www.koth.org/corewar/ * ftp://ftp.inria.fr/INRIA/Projects/para/doligez/cw/mirror The plain text version of this FAQ is automatically archived by news.answers (but this version is probably out-of-date). [ToC] ------------------------------------------------------------------------ 9. Where can I find a Core War system for . . . ? Core War systems are available via anonymous FTP from www.koth.org in the corewar/systems directory. Currently, there are UNIX, IBM PC-compatible, Macintosh, and Amiga Core War systems available there. It is a good idea to check ftp://www.koth.org/corewar/incoming for program updates first. 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 www.koth.org. Generally, the older the program - the less likely it will be ICWS compatible. If you are looking for an ICWS'94 simulator, get pMARS, which is available for many platforms and can be downloaded from: * ftp://ftp.csua.berkeley.edu/pub/corewar (original site) * ftp://www.koth.org/corewar (koth.org mirror) * ftp://ftp.inria.fr/INRIA/Projects/para/doligez/cw/mirror (Planar mirror) * http://www.nc5.infi.net/~wtnewton/corewar/ (Terry Newton) * ftp://members.aol.com/ofechner/corewar (Fechter) Notes: * If you have trouble running pMARS with a graphical display under Win95 then check out http://www.koth.org/pmars.html which should have a pointer to the latest compilation of pMARS for this environment. * RPMs for the Alpha, PowerPC, Sparc and i386 can be found at ftp://ftp.inria.fr/INRIA/Projects/para/doligez/cw/pmars-rpm/ Reviews of Core War systems would be greatly appreciated in the newsgroup and in the newsletter. Below is a not necessarily complete or up-to-date list of what's available at www.koth.org: MADgic41.lzh corewar for the Amiga, v4.1 MAD4041.lzh older version? MAD50B.lha corewar for the Amiga, beta version 5.0 Redcoder-21.hqx corewar for the Mac, supports ICWS'88 and '94 (without extensions) core-11.hqx corewar for the Mac core-wars-simulator.hqx same as core-11.hqx? corewar_unix_x11.tar.Z corewar for UNIX/X-windows, ICWS'86 but not ICWS'88 compatible koth31.tar.Z corewar for UNIX/X-windows. This program ran the former KotH server at intel.com koth.shar.Z older version kothpc.zip port of older version of KotH to the PC deluxe20c.tar.Z corewar for UNIX (broken X-windows or curses) and PC mars.tar.Z corewar for UNIX, likely not ICWS'88 compatible icons.zip corewar icons for MS-Windows macrored.zip a redcode macro-preprocessor (PC) c88v49.zip PC corewar, textmode display mars88.zip PC corewar, graphics mode display corwp302.zip PC corewar, textmode display, slowish mercury2.zip PC corewar written in assembly, fast! mtourn11.zip tournament scheduler for mercury (req. 4DOS) pmars08s.zip portable system, ICWS'88 and '94, runs on UNIX, PC, Mac, Amiga. C source archive pmars08s.tar.Z same as above pmars08.zip PC executables with graphics display, req 386+ macpmars02.sit.hqx pMARS executable for Mac (port of version 0.2) buggy, no display MacpMARS1.99a.cpt.hqx port of v0.8 for the Mac, with display and debugger MacpMARS1.0s.cpt.hqx C source (MPW, ThinkC) for Mac frontend pvms08.zip pMARS v0.8 for VMS build files/help (req. pmars08s.zip) ApMARS03.lha pMARS executable for Amiga (port of version 0.3.1) wincor11.zip MS-Windows system, shareware ($15) [ToC] ------------------------------------------------------------------------ 10. Where can I find warrior code? To learn the game, it is a good idea to study previously posted warrior code. The FTP archives have code in the ftp://www.koth.org/corewar/redcode directory. A clearly organized on-line warrior collection is available at the Core War web sites (see below). [ToC] ------------------------------------------------------------------------ 11. I do not have FTP. How do I get all this great stuff? There is an FTP email server at bitftp@pucc.princeton.edu. This address may no longer exist. I haven't tested it yet. Send email with a subject and body text of "help" (without the quotes) for more information on its usage. Note that many FTP email gateways are shutting down due to abuse. To get a current list of FTP email servers, look at the Accessing the Internet by E-mail FAQ posted to news.answers. If you don't have access to Usenet, you can retrieve this FAQ one of the following ways: * Send mail to mail-server@rtfm.mit.edu with the body containing "send usenet/news.answers/internet-services/access-via-email". * Send mail to mailbase@mailbase.ac.uk with the body containing "send lis-iis e-access-inet.txt". [ToC] ------------------------------------------------------------------------ 12. I do not have access to Usenet. How do I post and receive news? To receive rec.games.corewar articles by email, join the COREWAR-L list run on the Koth.Org list processor. To join, send the message SUB COREWAR-L FirstName LastName to listproc@koth.org. You can send mail to corewar-l@koth.org to post even if you are not a member of the list. Responsible for the listserver is Scott J. Ellentuch (ttsg@ttsg.com). Servers that allow you to post (but not receive) articles are available. Refer to the Accessing the Internet by E-Mail FAQ for more information. [ToC] ------------------------------------------------------------------------ 13. Are there any Core War related WWW sites? You bet. Each of the two KotH sites sport a world-wide web server. Stormking's Core War page is http://www.koth.org; pizza's is http://www.ecst.csuchico.edu/~pizza/koth . Damien Doligez (a.k.a. Planar) has a web page that features convenient access to regular newsletters (Push Off, The '94 Warrior, Core Warrior) and a well organized library of warriors: http://para.inria.fr/~doligez/corewar/. Convenient for U.S. users, this site is also mirrored at koth.org. [ToC] ------------------------------------------------------------------------ 14. What is KotH? How do I enter? King Of The Hill (KotH) is an ongoing Core War tournament available to anyone with email. You enter by submitting via email a Redcode program (warrior) with special comment lines. You will receive a reply indicating how well your program did against the current top programs "on the hill". There are two styles of KotH tournaments, "classical" and "multi-warrior". The "classical" KotH is a one-on-one tournament, that is your warrior 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. In "multi-warrior" KotH, all warriors on the hill fight each other at the same time. Score calculation is a bit more complex than for the one-on-one tournament. Briefly, points are awarded based on how many warriors survive until the end of a round. A warrior that survives by itself gets more points than a warrior that survives together with other warriors. Points are calculated from the formula (W*W-1)/S, where W is the total number of warriors and S the number of surviving warriors. The pMARS documentation has more information on multi-warrior scoring. The idea for an email-based Core War server came from David Lee. The original KotH was developed and run by William Shubert at Intel starting in 1991, and discontinued after almost three years of service. Currently, KotHs based on Bill's UNIX scripts but offering a wider variety of hills are are running at two sites: koth@koth.org is maintained by Scott J. Ellentuch (tuc@ttsg.com) and pizza@ecst.csuchico.edu by Thomas H. Davies (sd@ecst.csuchico.edu). Up until May '95, the two sites provided overlapping services, i.e. the some of the hill types were offered by both "pizza" and "stormking". To conserve resources, the different hill types are now divided up among the sites. The way you submit warriors to both KotHs is pretty much the same. Therefore, the entry rules described below apply to both "pizza" and "stormking" unless otherwise noted. Entry Rules for King of the Hill Corewar * Write a corewar program. KotH is fully ICWS '88 compatible, EXCEPT that a comma (",") is required between two arguments. * Put a line starting with ";redcode" (or ";redcode-94", etc., see below) 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. Additionally, adding ";name " and ";author " 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. Using ";name" is mandatory on the Pizza hills. In addition, it would be nice if you have lines beginning with ";strategy" that describe the algorithm you use. There are currently seven separate hills you can select by starting your program with ;redcode-94, ;redcode-b, ;redcode-lp, ;redcode-x, ;redcode, ;redcode-94x or ;redcode-94m. The former four run at "pizza", the latter three at "stormking". More information on these hills is listed below. * Mail this file to koth@koth.org or pizza@ecst.csuchico.edu. "Pizza" requires a subject of "koth" (use the -s flag on most mailers). * 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. * In an hour or so you should get more mail telling you how your program performed against the current top 20 (or 10) programs. If no news arrives during that time, 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 25 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 25 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. The server kills programs by assigning an impossibly low score; it may therefore take another successful challenge before a killed program is actually removed from the hill. 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. Duration Max. Hill Name Hill Core Max. Before Entry Min. Rounds Instr. Size Size Processes Distance Fought Set Tie Length Pizza's ICWS '94 Draft Hill Extended (Accessed with 25 8000 8000 80000 100 100 200 ICWS '94 ";redcode-94") Draft Pizza's Beginner's Extended Hill (Accessed 25 8000 8000 80000 100 100 200 ICWS '94 with ";redcode-b") Draft Pizza's Experimental Extended (Small) Hill 25 800 800 8000 20 20 200 ICWS '94 (Accessed with Draft ";redcode-x") Pizza's Limited Process (LP) Hill Extended (Accessed with 25 8000 8 80000 200 200 200 ICWS '94 ";redcode-lp") Draft Stormking's ICWS '88 Standard Hill (Accessed with 20 8000 8000 80000 100 100 250 ICWS '88 ";redcode") Stormking's ICWS '94 No Pspace Hill (Accessed with 20 8000 8000 80000 100 100 250 ICWS '94 ";redcode-94nop") Stormking's ICWS '94 Experimental Extended (Big) Hill 20 55440 55440 500000 200 200 250 ICWS '94 (Accessed with Draft ";redcode-94x") Stormking's ICWS '94 Multi-Warrior Extended Hill (Accessed 10 8000 8000 80000 100 100 200 ICWS '94 with Draft ";redcode-94m") Note: Warriors on the beginner's hill are retired at age 100. If you just want to get a status report without actually challenging the hills, send email with ";status" as the message body (and don't forget "Subject: koth" for "pizza"). If you send mail to "pizza" with "Subject: koth help" you will receive instructions that may be more up to date than those contained in this document. At "stormking", a message body with ";help" will return brief instructions. If you submit code containing a ";test" line, your warrior will be assembled but not actually pitted against the warriors on the hill. At "pizza", you can use ";redcode[-??] test" to do a test challenge of the Hill without affecting the status of the Hill. These challenges can be used to see how well your warrior does against the current Hill warriors. All hills run portable MARS (pMARS) version 0.8, a platform-independent Core War system available at www.koth.org. The '94 and '94x hills allow five experimental opcodes and three experimental addressing modes currently not covered in the ICWS'94 draft document: * LDP - Load P-Space * STP - Store P-Space * SEQ - Skip if EQual (synonym for CMP) * SNE - Skip if Not Equal * NOP - (No OPeration) * * - indirect using A-field as pointer * { - predecrement indirect using A-field * } - postincrement indirect using A-field [ToC] ------------------------------------------------------------------------ 15. Is it DAT 0, 0 or DAT #0, #0? How do I compare to core? Core is initialized to DAT 0, 0. This is an illegal instruction (in source code) under ICWS'88 rules and strictly compliant assemblers (such as KotH or pmars -8) will not let you have a DAT 0, 0 instruction in your source code - 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. Note that under ICWS'94, DAT 0, 0 is a legal instruction. [ToC] ------------------------------------------------------------------------ 16. How does SLT (Skip if Less Than) work? 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 (core 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. [ToC] ------------------------------------------------------------------------ 17. What is the difference between in-register and in-memory evaluation? These terms refer to the way instruction operands are evaluated. The '88 Redcode standard ICWS'88 is unclear about whether a simulator should "buffer" the result of A-operand evaluation before the B-operand is evaluated. Simulators that do buffer are said to use in-register evaluation, those that don't, in-memory evaluation. ICWS'94 clears this confusion by mandating in-register evaluation. Instructions that execute differently under these two forms of evaluation are MOV, ADD, SUB, MUL, DIV and MOD where the effective address of the A-operand is modified by evaluation of the B-operand. This is best illustrated by an example: L1 mov L2, mov.i #0, impsize 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 Colour 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. Decrement Resistant Property of warriors making them functional (or at least partially functional) when overrun by a DJN-stream. DJN-Stream (also DJN-Train) Using a DJN command to rapidly decrement core locations. example ... ... djn example, <4000 Dwarf The prototypical small bomber. Gate-busting (also gate-crashing) technique to "interweave" a decrement-resistant imp-spiral (e.g. MOV 0, 2668) with a standard one to overrun imp-gates. Hybrids warriors that combine two or more of the basic strategies, either in sequence (e.g. stone->paper) or in parallel (e.g. imp/stone). 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, mov.i #0,IMPSIZE 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. Optimal Constants (also optima-type constants) Bomb or scan increments chosen to cover core most effectively, i.e. leaving gaps of uniform size. Programs to calculate optimal constants and lists of optimal numbers are available at www.koth.org. Paper A Paper-like program is one which replicates itself many times. Part of the Scissors (beats) Paper (beats) Stone (beats Scissors) analogy. P-Warrior A warrior which uses the results of previous round(s) in order to determine which strategy it will use. 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. Q^2 Scan A modern version of the Quick Scan where anything found is attacked almost immediately. Quick Scan 2c scan of a set group of core locations with bombing if anything is found. Both of the following codes snips scan 16 locations and check for a find. If anything is found, it is attacked, otherwise 16 more locations are scanned. Example: start s1 for 8 ;'88 scan cmp start+100*s1, start+100*s1+4000 ;check two locations mov #start+100*s1-found, found ;they differ so set pointer rof jmn attack, found ;if we have something, get it s2 for 8 cmp start+100*(s2+6), start+100*(s2+6)+4000 mov #start+100*(s2+6)-found, found rof found jmz moveme, #0 ;skip attack if qscan found nothing attack cmp @found, start-1 ;does found points to empty space? add #4000, found ;no, so point to correct location mov start-1, @found ;move a bomb moveme jmp 0, 0 In ICWS'94, the quick scan code is more compact because of the SNE opcode: start ;'94 scan s1 for 4 sne start+400*s1, start+400*s1+100 ;check two locations seq start+400*s1+200, start+400*s1+300 ;check two locations mov #start+400*s1-found, found ;they differ so set pointer rof jmn which, found ;if we have something, get it s2 for 4 sne start+400*(s2+4), start+400*(s2+4)+100 seq start+400*(s2+4)+200, start+400*(s2+4)+300 mov #start+400*(s2+4)-found-100, found rof found jmz moveme, #0 ;skip attack if qscan found nothing add #100, -1 ;increment pointer till we get the which jmn -1, @found ;right place mov start-1, @found ;move a bomb moveme jmp 0, 0 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. Silk A replicator which splits off a process to each new copy before actually copying the code. This allows it to replicate extremely quickly. This technique is only possible under the '94 draft, because it requires post-increment indirect addressing. Example: spl 1 mov -1, 0 spl 1 ;generate 6 consecutive processes silk spl 3620, #0 ;split to new copy mov >-1, }-1 ;copy self to new location mov bomb, >2000 ;linear bombing mov bomb, }2042 ;A-indirect bombing for anti-vamp jmp silk, {silk ;reset source pointer, make new copy bomb dat >2667, >5334 ;anti-imp bomb Slaver see Pit-Trapper. Stealth Property of programs, or program parts, which are invisible to scanners, accomplished by using zero B-fields and reflections. Stone A Stone-like program designed to be a small bomber. Part of the Paper-Scissors-Stone analogy. Stun 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 Two-Pass Core-Clear (also SPL/DAT Core-Clear) core clear that fills core first with SPL instructions, then with DATs. This is very effective in killing paper and certain imp-spiral variations. Vampire see Pit-Trapper. Vector Launch one of several means to start an imp-spiral running. As fast as Binary Launch, but requiring much less code. See also JMP/ADD Launch and Binary Launch. This example is one form of a Vector Launch: sz EQU 2667 spl 1 spl 1 jmp @vt, }0 vt dat #0, imp+0*sz ; start of vector table dat #0, imp+1*sz dat #0, imp+2*sz dat #0, imp+3*sz ; end of vector table imp mov.i #0, sz [ToC] ------------------------------------------------------------------------ 23. Other questions? Just ask in the rec.games.corewar newsgroup or contact me. If you are shy, check out the Core War archives first to see if your question has been answered before. [ToC] ------------------------------------------------------------------------ Credits Additions, corrections, etc. to this document are solicited. Thanks in particular to the following people who have contributed major portions of this document: * Mark Durham (wrote the original version of the FAQ) * Paul Kline * Randy Graham * Stefan Strack (maintained a recent version of the FAQ) ------------------------------------------------------------------------ Copyright � 1999 Anton Marsden. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. ------------------------------------------------------------------------ From: "The Bl@ck Knight" Subject: Newbie Message-ID: Date: Tue, 16 Jan 2001 17:39:40 GMT Hello, I recently have gotten snagged by Corewars and have been intrested in it and looking at the warriors that came with my linux mandrake, and have been looking and am having some confusions about the redcode and corewar languages..is there any documentation that gives a detailed break down on the commands? in a easy to understand way? I've come across a document out there corewars for dummies which is very nice but not complete, and am looking for something like that.. but any detailed break down would be great if anyone can help me... Thanks!!!! From: Ilmari Karonen Subject: Re: Newbie Date: 16 Jan 2001 20:29:51 GMT Message-ID: <979676705.25976@itz.pp.sci.fi> In article , The Bl@ck Knight wrote: >Hello, I recently have gotten snagged by Corewars and have been intrested in >it and looking at the warriors that came with my linux mandrake, and have >been looking and am having some confusions about the redcode and corewar >languages..is there any documentation that gives a detailed break down on >the commands? in a easy to understand way? >I've come across a document out there corewars for dummies which is very >nice but not complete, and am looking for something like that.. You could try my Beginner's Guide to Redcode: http://www.sci.fi/~iltzu/corewar/guide.html If you're new to Core War, it should be a good first tutorial that will get you to the point where you can move on to the more advanced material. Even if you already know some of it, you should be able to jump to the parts you're interested in. -- Ilmari Karonen - http://www.sci.fi/~iltzu/ "And, should you resort to sticking a martini olive up their nose, implacable universal laws require that they'll _like_ that sort of thing." -- Graydon in rec.arts.sf.composition From: walterhnospam@gmx.de (Walter Hofmann) Subject: Re: Newbie Date: Tue, 16 Jan 2001 20:50:35 +0100 Message-ID: On Tue, 16 Jan 2001 17:39:40 GMT, The Bl@ck Knight wrote: > >Hello, I recently have gotten snagged by Corewars and have been intrested in >it and looking at the warriors that came with my linux mandrake, and have >been looking and am having some confusions about the redcode and corewar >languages..is there any documentation that gives a detailed break down on >the commands? in a easy to understand way? The first language is described in the README file (and check out the example programs), information on the latter can be found at http://www.KOTH.org/info.html Walter From: "The Bl@ck Knight" Subject: Re: Newbie Message-ID: Date: Tue, 16 Jan 2001 21:04:39 GMT Thanks alot for your help :) Greatly apperciated. "Ilmari Karonen" wrote in message news:979676705.25976@itz.pp.sci.fi... > In article , The Bl@ck Knight wrote: > >Hello, I recently have gotten snagged by Corewars and have been intrested in > >it and looking at the warriors that came with my linux mandrake, and have > >been looking and am having some confusions about the redcode and corewar > >languages..is there any documentation that gives a detailed break down on > >the commands? in a easy to understand way? > >I've come across a document out there corewars for dummies which is very > >nice but not complete, and am looking for something like that.. > > You could try my Beginner's Guide to Redcode: > > http://www.sci.fi/~iltzu/corewar/guide.html > > If you're new to Core War, it should be a good first tutorial that > will get you to the point where you can move on to the more advanced > material. Even if you already know some of it, you should be able to > jump to the parts you're interested in. > > -- > Ilmari Karonen - http://www.sci.fi/~iltzu/ > "And, should you resort to sticking a martini olive up their nose, > implacable universal laws require that they'll _like_ that sort of > thing." -- Graydon in rec.arts.sf.composition > From: Nathan F Russell Subject: Getting started Date: Thu, 18 Jan 2001 21:51:12 -0500 Message-ID: <3A67ABA0.2115755F@acsu.buffalo.edu> Hi folks, I recall learning about Core Wars on a BBS a decade ago, when I was in elementary school. I just searched the net again and found one of the pages on it, and would like to start playing. I am a freshman in computational physics, and have very limited coding experience out of Java, and certainly none dealing with memory directly in the 'C' fashion, never mind the 'ASM' fashion. What basic types of programs would be easy for a beginner to modify or work with? Do I really need to worry about multiple threads? I tried to hand-trace some of the imp spirals on the web and just tracing them took five minutes - I can't imagine making modifications to one, or making it work properly in combination with a larger program. If I submitted a program that crashed, or that lost for a stupid reason, would the "community" be upset at me? Which tournament is easiest for a beginner? Thanks much! Nathan Russell From: Hillis Subject: Re: Getting started Date: Fri, 19 Jan 2001 10:03:29 -0500 Message-ID: <3A685741.32258B7B@erols.com> > .............. > >Which tournament is easiest for a beginner? > > Check out the Beginner's Hill (:-)) on Pizza: > > http://www.ecst.csuchico.edu/~pizza/koth/ > Despite the name, it's very hard for a beginner to write a warrior that can even get onto the Beginner's hill - a frustrating introduction to the game. Try the "redcode standard" hill at http://corewars.sourceforge.net (The hills there that are labeled "corewars" are actually part of a different game.) Dave Hillis From: Aaron Sawyer Subject: Re: Getting started Date: Fri, 19 Jan 2001 10:25:12 -0500 Message-ID: <3A685C58.C873BD46@iris.com> Philip Kendall wrote: > Nathan F Russell wrote: > > [much good advice & pointers snipped] > > > >If I submitted a program that crashed, or that lost for a stupid reason, > >would the "community" be upset at me? > > Certainly not -- you can't do any harm to other people's warriors. Well, the point of corewars is to do precisely that--harm other people's warriors. Do sufficient harm, and people will be _very_ interested to know just exactly what technique you are using. This is very much a communal learning experience. At risk of putting words in Philip's keyboard...I think he meant you needn't worry that any warrior you devise in Redcode will crash the emulator program that runs it for you against your opponent's program (the 'Hill'). Trash your opponents' programs! Trash 'em all! Become King of the Hill! Still lurking about in the weeds at the bottom of the hill, enthralled by the mystic power of the Carbonite stone, =Aaron -- .============================v============================. | D. Aaron Sawyer : Aaron.Sawyer@IrisSP.AMcom | | Iris Associates : Voice: +1.978.392.5298 | | Five Technology Park Drive : Fax: +1.978.392.6669 | | Westford, MA 01886 : Email: s/SP.AM/./ above | `============================^============================' From: pak@ast.cam.ac.uk (Philip Kendall) Subject: Re: Getting started Date: 19 Jan 2001 11:02:40 -0000 Message-ID: <9496sg$6oe@cass52> In article <3A67ABA0.2115755F@acsu.buffalo.edu>, Nathan F Russell wrote: > >I recall learning about Core Wars on a BBS a decade ago, when I was in >elementary school. I just searched the net again and found one of the >pages on it, and would like to start playing. Hi :-) >I am a freshman in computational physics, and have very limited coding >experience out of Java, and certainly none dealing with memory directly >in the 'C' fashion, never mind the 'ASM' fashion. > >What basic types of programs would be easy for a beginner to modify or >work with? What I'd recommend would be starting at Ilmari Karonen's `Beginner's Guide to Redcode': http://www.sci.fi/~iltzu/corewar/guide.html and/or Steve Bailey's Guide for Beginners: http://www.koth.org/sgb/ >Do I really need to worry about multiple threads? Probably not yet (IMHO). >If I submitted a program that crashed, or that lost for a stupid reason, >would the "community" be upset at me? Certainly not -- you can't do any harm to other people's warriors. >Which tournament is easiest for a beginner? Check out the Beginner's Hill (:-)) on Pizza: http://www.ecst.csuchico.edu/~pizza/koth/ HTH, Phil -- Philip Kendall http://www.srcf.ucam.org/~pak21/ From: Nathan F Russell Subject: Re: Getting started Date: Sat, 20 Jan 2001 10:01:58 -0500 Message-ID: <3A69A866.9DB6F1EF@acsu.buffalo.edu> Aaron Sawyer wrote: > > Philip Kendall wrote: > > Nathan F Russell wrote: > > > > [much good advice & pointers snipped] > > > > > >If I submitted a program that crashed, or that lost for a stupid reason, > > >would the "community" be upset at me? > > > > Certainly not -- you can't do any harm to other people's warriors. > > Well, the point of corewars is to do precisely that--harm other people's > warriors. Do sufficient harm, and people will be _very_ interested to > know just exactly what technique you are using. This is very much a > communal learning experience. I see. I have an idea for a program of probably 2 or 3 lines that would fill the entire memory with itself in (ideally) 14, or (realistically) closer to 30 turns. I haven't written it yet, but it looks possible (the problem is making each thread aware of its own position). I don't want to discuss quite yet exactly what I'm doing, but I'll give a hint: Remember when you were a little kid and used to do things in math class like guess a number from 1 to 100, and be told whether you were high or low? Well, my program wants to put itself on top of where its opponent is (thereby hopefully confusing the opponent enough to get a tie). It doesn't know whether it's high or low, so instead it guesses fifty and then BOTH 25 and 75, etc. The problem I'm running into is making every thread aware of exactly where that thread is. I'm sure there's an obvious flaw in what I'm thinking, since if it were possible to get a certain kill that quickly I'd have heard about it! > At risk of putting words in Philip's keyboard...I think he meant you > needn't worry that any warrior you devise in Redcode will crash the > emulator program that runs it for you against your opponent's program > (the 'Hill'). Yeah... I was somewhat concerned that I'd write something that would overrun the emulator and then somehow become an internet-wide virus, but in rhetrospect that would be difficult for even a specifically designed program to do while accessing neither disc nor the network! > Trash your opponents' programs! Trash 'em all! Become King of the > Hill! > > Still lurking about in the weeds at the bottom of the hill, > enthralled by the mystic power of the Carbonite stone, > =Aaron Nathan Russell From: jkw@koth.org Subject: Re: Getting started Date: 20 Jan 2001 11:18:32 -0500 Message-ID: <4.1.20010119230613.00aed870@pop-server> >>If I submitted a program that crashed, or that lost for a stupid reason, >>would the "community" be upset at me? > >Certainly not -- you can't do any harm to other people's warriors. Just -determining- the reason your warrior lost or won against theirs is nearly impossible without seeing the actual code, heh. -jkw From: oversby@hotmail.com Subject: SoV Date: Sat, 20 Jan 2001 16:38:24 GMT Message-ID: <94cetv$nj4$1@nnrp1.deja.com> Hey Joonas, Are you still interested in finishing this one off ? Ta, Ian Sent via Deja.com http://www.deja.com/ From: Ilmari Karonen Subject: Re: Getting started Date: 20 Jan 2001 19:00:10 GMT Message-ID: <980016611.6419@itz.pp.sci.fi> In article <3A69A866.9DB6F1EF@acsu.buffalo.edu>, Nathan F Russell wrote: > >I see. I have an idea for a program of probably 2 or 3 lines that would >fill the entire memory with itself in (ideally) 14, or (realistically) >closer to 30 turns. I haven't written it yet, but it looks possible [snip] >I'm sure there's an obvious flaw in what I'm thinking, since if it were >possible to get a certain kill that quickly I'd have heard about it! It's called a replicator, a.k.a. a paper. Most papers don't work exactly like you describe, but the general concept is the same. The flaw is that the threads are executed alternately, not at the same time. So the more threads you have, the slower they run. (I have on my hard disk the first draft of an SF story based on the postulate that the real universe worked the same way. It's bloody hard to get across in a story, however.) -- Ilmari Karonen - http://www.sci.fi/~iltzu/ "Regretfully I decided that the ability to turn _The Hobbit_ into a regency romance wasn't a particularly useful skill after all." -- Michelle Bottorff in rec.arts.sf.composition From: bjoern@blinker.NOSPAM.net (Bjoern) Subject: Re: Getting started Date: Sun, 21 Jan 2001 12:24:31 GMT Message-ID: <3a6a0986.13759432@news.lrz-muenchen.de> On Sat, 20 Jan 2001 10:01:58 -0500, Nathan F Russell wrote: [...] >I'm sure there's an obvious flaw in what I'm thinking, since if it were >possible to get a certain kill that quickly I'd have heard about it! MARS won't tell you wether your guess was too high or too low. [...] Bjoern From: Lukasz Adamowski Subject: Re: Getting started Date: 21 Jan 2001 18:22:14 -0500 Message-ID: On Sat, 20 Jan 2001, Nathan F Russell wrote: > > I see. I have an idea for a program of probably 2 or 3 lines that would > fill the entire memory with itself in (ideally) 14, or (realistically) > closer to 30 turns. I haven't written it yet, but it looks possible > (the problem is making each thread aware of its own position). I don't > want to discuss quite yet exactly what I'm doing, but I'll give a hint: What do you mean saying 14/30 turns? AFAIK the fastest paper (imp, I mean) needs CORESIZE cycles to fill whole the core. If your turn is round, I think it is misunderstanding: after every round core is cleaned by MARS. I'm affraid I don't understand it. And "2 or 3 lines" looks strange to me too. Of course, there are many short warriors, but it's really hard to write warrior using your idea in 2 or 3 lines. > Remember when you were a little kid and used to do things in math class > like guess a number from 1 to 100, and be told whether you were high or > low? Well, my program wants to put itself on top of where its opponent > is (thereby hopefully confusing the opponent enough to get a tie). It > doesn't know whether it's high or low, so instead it guesses fifty and > then BOTH 25 and 75, etc. The problem I'm running into is making every > thread aware of exactly where that thread is. OK I can understand it. I even do think it's a good idea. I thought about something similar to this idea, but not for paper, for scanner. I thought it would be fast and effective, but then I gave up. Why? There are faster ways to scan the core. > > Trash your opponents' programs! Trash 'em all! Become King of the > > Hill! Easy to say... However, I agree: Kill'em all! That's the point, isn't it? ;) Lukasz From: Koth Subject: KOTH.ORG: Status - Standard 01/22/01 Date: 22 Jan 2001 13:03:44 -0500 Message-ID: <200101220500.AAA20434@gevjon.ttsg.com> Weekly Status on 01/22/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG Standard KotH CoreWar Hill : Last battle concluded at : Fri Dec 22 12:46:27 EST 2000 # %W/ %L/ %T Name Author Score Age 1 34/ 20/ 46 Freight Train David Moore 148 73 2 33/ 21/ 45 sIMPly.Red v0.95 Leonardo Humberto 145 30 3 32/ 20/ 47 Test Alexander (Sasha) Wa 144 12 4 32/ 21/ 47 Guardian Ian Oversby 142 72 5 37/ 35/ 28 PacMan David Moore 138 102 6 37/ 39/ 24 Stasis David Moore 135 180 7 25/ 16/ 59 EV Paper John K Wilkinson 135 86 8 40/ 44/ 16 Foggy Swamp Beppe Bezzi 135 69 9 28/ 22/ 50 Shish-Ka-Bob Ben Ford 133 28 10 39/ 45/ 16 Blur '88 Anton Marsden 133 110 11 26/ 19/ 55 Test I Ian Oversby 132 129 12 31/ 31/ 37 Frog Sticker P.Kline 132 22 13 26/ 21/ 53 Evoltmp 88 John K W 130 123 14 35/ 42/ 23 Beholder's Eye V1.7 W. Mintardjo 129 348 15 37/ 46/ 16 Iron Gate Wayne Sheppard 129 398 16 33/ 38/ 29 Stillborn Bomber v0.2 mjp 128 13 17 33/ 39/ 28 Tangle Trap David Moore 128 146 18 25/ 23/ 53 sic Leonardo H. Liporati 127 2 19 15/ 3/ 82 ]enigma[ Michal Janeczek 127 1 20 36/ 50/ 14 Blurstone '88 M. J. Pihlaja 123 67 21 19/ 59/ 22 Crazy Lukasz Anforowicz 80 0 From: Koth Subject: KOTH.ORG: Status - MultiWarrior 94 01/22/01 Date: 22 Jan 2001 13:03:41 -0500 Message-ID: <200101220500.AAA20438@gevjon.ttsg.com> Weekly Status on 01/22/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG Multiwarrior 94 CoreWar Hill: Last battle concluded at : Sun Jan 14 19:22:42 EST 2001 # Name Author Score Age 1 QuiVa John Metcalf 36 141 2 Her Majesty P.Kline 34 67 3 Dracula's Cape Ben Ford 32 26 4 D-clearM Ken Espiritu 30 48 5 Friction Ken Espiritu 30 20 6 Pitbull Christian Schmidt 28 4 7 Scan Test Tester 26 7 8 Foo John Metcalf 25 2 9 fclear Brian Haskin 25 32 10 Pustka Lukasz Adamowski 18 1 11 Monty Lukasz Adamowski 0 0 From: Koth Subject: KOTH.ORG: Status - ICWS Experimental 94 01/22/01 Date: 22 Jan 2001 13:03:36 -0500 Message-ID: <200101220500.AAA20444@gevjon.ttsg.com> Weekly Status on 01/22/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG ICWS Experimental 94 CoreWar Hill: Last battle concluded at : Thu Dec 28 11:22:51 EST 2000 # %W/ %L/ %T Name Author Score Age 1 49/ 31/ 19 Random Reaper Dave Hillis 167 1 2 45/ 29/ 27 Controlled Aggression Ian Oversby 160 63 3 44/ 33/ 23 Black Moods Ian Oversby 156 59 4 46/ 38/ 17 Greetings From Asbury Par JKW 153 23 5 39/ 34/ 27 Ogre Christian Schmidt 145 11 6 29/ 15/ 56 Katafutr Michal Janeczek 144 3 7 33/ 26/ 40 Damage Inflicted Robert Macrae 141 2 8 25/ 13/ 63 Denial David Moore 137 4 9 28/ 21/ 51 Venom v0.2b Christian Schmidt 135 85 10 20/ 4/ 76 Black Box v1.1 JKW 135 26 11 23/ 12/ 65 Evol Cap 4 X John Wilkinson 133 132 12 18/ 5/ 77 Evolve X v4.0 John Wilkinson 131 80 13 33/ 37/ 30 Dr. Gate X Franz 129 103 14 30/ 35/ 36 test CS 124 20 15 33/ 42/ 26 Pattel's Virus X Ben Ford 123 7 16 22/ 24/ 54 Purple v0.1 Christian Schmidt 120 84 17 24/ 28/ 48 Rosebud Beppe 120 111 18 32/ 45/ 23 Pagan John K W 118 117 19 26/ 39/ 35 MorphinMerlin Jeremy K 114 46 20 32/ 51/ 18 S.E.T.I. 4-X JKW 112 133 21 2/ 66/ 32 Jolly Jumper 6 Stefan Foerster Subject: KOTH.ORG: Status - 94 No Pspace 01/22/01 Date: 22 Jan 2001 13:03:23 -0500 Message-ID: <200101220500.AAA20449@gevjon.ttsg.com> Weekly Status on 01/22/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG 94 No Pspace CoreWar Hill: Last battle concluded at : Sat Jan 20 07:22:16 EST 2001 # %W/ %L/ %T Name Author Score Age 1 37/ 23/ 40 Olivia Ben Ford 152 84 2 38/ 26/ 37 Quicksilver Michal Janeczek 150 118 3 37/ 24/ 39 Uninvited John Metcalf 149 38 4 44/ 39/ 18 Behemot Michal Janeczek 149 179 5 34/ 20/ 47 The Dark One Christian Schmidt 148 149 6 34/ 20/ 47 nPaper II Paul-V Khuong 148 356 7 40/ 34/ 26 Recount P.Kline 147 41 8 44/ 41/ 15 Eraser II Ken Espiritu 146 313 9 37/ 30/ 33 Blacken Ian Oversby 145 603 10 44/ 43/ 14 G2-b David Moore 145 142 11 46/ 47/ 7 He Scans Alone P.Kline 144 40 12 34/ 24/ 42 Jade Ben Ford 144 425 13 43/ 43/ 14 Stalker P.Kline 143 341 14 42/ 42/ 15 Jinx Christian Schmidt 142 319 15 25/ 11/ 64 The Phantom Menace Anton Marsden 139 56 16 29/ 20/ 51 KafuFFLe John Metcalf 139 39 17 35/ 34/ 30 Keyser Soze Anton Marsden 136 57 18 38/ 42/ 20 myBlur Paulsson 134 21 19 22/ 24/ 54 jam test 3 John Metcalf 121 22 20 36/ 52/ 12 Hyperclear 4+ Steve Gunnell 120 1 21 2/ 98/ 0 1 1 7 0 From: pak@ast.cam.ac.uk (Philip Kendall) Subject: Re: Getting started Date: 23 Jan 2001 12:20:40 -0000 Message-ID: <94jsuo$ac4@cass52> In article <3A69A866.9DB6F1EF@acsu.buffalo.edu>, Nathan F Russell wrote: > >I see. I have an idea for a program of probably 2 or 3 lines that would >fill the entire memory with itself in (ideally) 14, or (realistically) >closer to 30 turns. Sorry, but that's impossible. The `speed of light' in Redcode is basically 1 instruction/cycle -- you can't modify core (not counting side effects from {pre,post}{dec,inc}rements) any faster than that. Hence you can't fill a 8000-size core in 14 (or even 30) turns. [1] Remember that once you SPL parallel processes, each process executes at a rate of 1/(number of processes) as compared with your original speed; eg if you've got 3 processes running, execution order is something like: Your Process 1 Opponent's Process Your Process 2 Opponent's Process Your Process 3 Opponent's Process Your Process 1 [etc] Otherwise SPL is obviously *much* too powerful. Phil [1] All this assuming your not `vamping' your opponent and making his/her processes do things for you. This is a valid tactic, but I'm not sure how useful it is anymore... -- Philip Kendall http://www.srcf.ucam.org/~pak21/ From: "Michael Atamas" Subject: Newbie Message-ID: Date: Sun, 28 Jan 2001 14:09:24 GMT This is a multi-part message in MIME format. ------=_NextPart_000_0008_01C0890A.0E874C00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have a question, what is an A-Field and a B-Field --=20 Michael Atamas psychomohel@home.com http://www.aelfgar.com ------=_NextPart_000_0008_01C0890A.0E874C00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

I have a question, what is an A-Field = and a=20 B-Field

--
Michael Atamas
psychomohel@home.com
http://www.aelfgar.com
------=_NextPart_000_0008_01C0890A.0E874C00-- From: "Michael Atamas" Subject: A-Feild B-Field Message-ID: Date: Sun, 28 Jan 2001 14:31:46 GMT This is a multi-part message in MIME format. ------=_NextPart_000_0024_01C0890D.2E84A900 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I just started learning Red Code and im confused what an A-field and = whats a B-Field --=20 Michael Atamas psychomohel@home.com http://www.aelfgar.com ------=_NextPart_000_0024_01C0890D.2E84A900 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I just started learning Red Code and im = confused=20 what an A-field and whats a B-Field

--
Michael Atamas
psychomohel@home.com
http://www.aelfgar.com
------=_NextPart_000_0024_01C0890D.2E84A900-- From: ransom@localhost.localdomain (Ransom Smith) Subject: Re: A-Feild B-Field Message-ID: Date: Sun, 28 Jan 2001 15:57:17 GMT On Sun, 28 Jan 2001 14:31:46 GMT, Michael Atamas wrote: >This is a multi-part message in MIME format. > First of all, please, please PLEASE ditch the HTML and MIME formatting. Everyone will love you a lot more. I am serious. > >I just started learning Red Code and im confused what an A-field and = >whats a B-Field > When you see an instruction (say, for example MOV.I #0, $1) the first number is the A-field, and the second number is the B-field. In this particular case, the a-field is 1, and the b-field is 2. the mov is the operand, the .i is the suffix, and the # and $ are addressing modes. -- Yes, I have an email address, but I can't check it. Sorry. [http://www.everything2.com/index.pl?node_id=5913] [http://www.koth.org/] [http://www.nethack.org/] D "Share this dragon / If you do / Lucky end / For them and you" From: "Paul Khuong" Subject: RE: A-Feild B-Field Date: 28 Jan 2001 18:28:38 -0500 Message-ID: > -----Original Message----- > From: corewar-l@koth.org [mailto:corewar-l@koth.org]On Behalf Of Michael > Atamas > Sent: 28 janvier, 2001 10:34 > To: Multiple recipients of list COREWAR-L > Subject: A-Feild B-Field > > I just started learning Red Code and im confused what an A-field and = > whats a B-Field Could you please turn Off html? If not, it's ok, but it'D be appreciated 8) Anyway: let's take the instruction:"Mov.i 23,45" Is this case, 23 is the A-Field, and 45 is teh B-Field... hope it's clear 8) _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From: Lukasz Adamowski Subject: Re: A-Feild B-Field Date: 28 Jan 2001 18:28:34 -0500 Message-ID: > On Sun, 28 Jan 2001 14:31:46 GMT, Michael Atamas wrote: > > >This is a multi-part message in MIME format. > > > First of all, please, please PLEASE ditch the HTML and MIME formatting. > Everyone will love you a lot more. I am serious. I agree. I was very suprised to see blank screen instead the text of your mail. I still don't know, what you have written, so next time use pure ASCII if you want to write to us, please. Lukasz From: Ilmari Karonen Subject: Re: A-Feild B-Field Date: 29 Jan 2001 08:58:06 GMT Message-ID: <980757681.27763@itz.pp.sci.fi> In article , Michael Atamas wrote: >This is a multi-part message in MIME format. Please avoid that. Set your newsreader to post only plain text. >I just started learning Red Code and im confused what an A-field and = >whats a B-Field http://www.sci.fi/~iltzu/corewar/guide.html#intro_how Let's take an example instruction apart: Instruction: ADD.AB #5, @3 Operand: ADD.AB #, @ OpCode: ADD Modifier: .AB A-Mode: # (immediate) B-Mode: @ (B-indirect) A-Field: 5 B-Field: 3 If you see an instruction with only one field, like "JMP -1", that's the A-field. The missing B-field will be zero, with direct mode. JMP doesn't care about its B-field or its modifier, so they're often left at their default values. (There's one exception for historical reasons: DAT #7 -> DAT #0, #7) -- Ilmari Karonen - http://www.sci.fi/~iltzu/ "It's obvious you need to get into the habit of feeding the cat when you first get out of bed -- in that way you won't be allowed to sleep late." -- Phideaux in rec.arts.sf.composition From: Koth Subject: KOTH.ORG: Status - MultiWarrior 94 01/29/01 Date: 29 Jan 2001 21:49:47 -0500 Message-ID: <200101290500.AAA14861@gevjon.ttsg.com> Weekly Status on 01/29/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG Multiwarrior 94 CoreWar Hill: Last battle concluded at : Fri Jan 26 10:33:03 EST 2001 # Name Author Score Age 1 Dracula's Cape Ben Ford 61 26 2 QuiVa John Metcalf 41 141 3 D-clearM Ken Espiritu 38 48 4 Her Majesty P.Kline 36 67 5 fclear Brian Haskin 28 32 6 Friction Ken Espiritu 24 20 7 Pitbull Christian Schmidt 24 4 8 Scan Test Tester 21 7 9 Foo John Metcalf 20 2 10 Pustka Lukasz Adamowski 16 1 11 Kamikaze Lukasz Adamowski 0 0 From: Koth Subject: KOTH.ORG: Status - ICWS Experimental 94 01/29/01 Date: 29 Jan 2001 21:49:34 -0500 Message-ID: <200101290500.AAA14865@gevjon.ttsg.com> Weekly Status on 01/29/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG ICWS Experimental 94 CoreWar Hill: Last battle concluded at : Sun Jan 28 22:45:39 EST 2001 # %W/ %L/ %T Name Author Score Age 1 42/ 31/ 27 Controlled Aggression Ian Oversby 154 67 2 41/ 35/ 24 Black Moods Ian Oversby 147 63 3 44/ 41/ 15 Greetings From Asbury Par JKW 146 27 4 38/ 34/ 27 Ogre Christian Schmidt 143 15 5 29/ 16/ 55 Katafutr Michal Janeczek 142 7 6 40/ 39/ 21 Random Reaper Dave Hillis 141 5 7 22/ 13/ 65 Denial David Moore 132 8 8 26/ 21/ 53 Venom v0.2b Christian Schmidt 130 89 9 29/ 30/ 41 Damage Inflicted Robert Macrae 128 6 10 18/ 8/ 75 Black Box v1.1 JKW 128 30 11 20/ 12/ 69 Evol Cap 4 X John Wilkinson 127 136 12 31/ 35/ 33 KAT v3 Dave Hillis 127 1 13 16/ 6/ 79 Evolve X v4.0 John Wilkinson 126 84 14 30/ 37/ 33 Dr. Gate X Franz 124 107 15 26/ 36/ 38 test CS 117 24 16 22/ 29/ 50 Rosebud Beppe 115 115 17 19/ 24/ 57 Purple v0.1 Christian Schmidt 114 88 18 27/ 45/ 27 Pattel's Virus X Ben Ford 110 11 19 28/ 47/ 25 Pagan John K W 109 121 20 2/ 3/ 0 KAT v1 Dave Hillis 6 4 21 1/ 2/ 2 KAT v3 Dave Hillis 6 2 From: Koth Subject: KOTH.ORG: Status - Standard 01/29/01 Date: 29 Jan 2001 21:49:39 -0500 Message-ID: <200101290500.AAA14857@gevjon.ttsg.com> Weekly Status on 01/29/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG Standard KotH CoreWar Hill : Last battle concluded at : Fri Dec 22 12:46:27 EST 2000 # %W/ %L/ %T Name Author Score Age 1 34/ 20/ 46 Freight Train David Moore 148 73 2 33/ 21/ 45 sIMPly.Red v0.95 Leonardo Humberto 145 30 3 32/ 20/ 47 Test Alexander (Sasha) Wa 144 12 4 32/ 21/ 47 Guardian Ian Oversby 142 72 5 37/ 35/ 28 PacMan David Moore 138 102 6 37/ 39/ 24 Stasis David Moore 135 180 7 25/ 16/ 59 EV Paper John K Wilkinson 135 86 8 40/ 44/ 16 Foggy Swamp Beppe Bezzi 135 69 9 28/ 22/ 50 Shish-Ka-Bob Ben Ford 133 28 10 39/ 45/ 16 Blur '88 Anton Marsden 133 110 11 26/ 19/ 55 Test I Ian Oversby 132 129 12 31/ 31/ 37 Frog Sticker P.Kline 132 22 13 26/ 21/ 53 Evoltmp 88 John K W 130 123 14 35/ 42/ 23 Beholder's Eye V1.7 W. Mintardjo 129 348 15 37/ 46/ 16 Iron Gate Wayne Sheppard 129 398 16 33/ 38/ 29 Stillborn Bomber v0.2 mjp 128 13 17 33/ 39/ 28 Tangle Trap David Moore 128 146 18 25/ 23/ 53 sic Leonardo H. Liporati 127 2 19 15/ 3/ 82 ]enigma[ Michal Janeczek 127 1 20 36/ 50/ 14 Blurstone '88 M. J. Pihlaja 123 67 21 19/ 59/ 22 Crazy Lukasz Anforowicz 80 0 From: Koth Subject: KOTH.ORG: Status - 94 No Pspace 01/29/01 Date: 29 Jan 2001 21:49:44 -0500 Message-ID: <200101290500.AAA14874@gevjon.ttsg.com> Weekly Status on 01/29/01 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG 94 No Pspace CoreWar Hill: Last battle concluded at : Fri Jan 26 10:14:25 EST 2001 # %W/ %L/ %T Name Author Score Age 1 35/ 24/ 41 Olivia Ben Ford 147 84 2 33/ 20/ 47 nPaper II Paul-V Khuong 146 356 3 33/ 20/ 47 The Dark One Christian Schmidt 146 149 4 45/ 47/ 7 He Scans Alone P.Kline 143 40 5 34/ 27/ 39 Uninvited John Metcalf 142 38 6 35/ 29/ 37 Quicksilver Michal Janeczek 141 118 7 41/ 41/ 18 Behemot Michal Janeczek 141 179 8 42/ 43/ 15 Stalker P.Kline 141 341 9 38/ 36/ 26 Recount P.Kline 141 41 10 42/ 43/ 15 Eraser II Ken Espiritu 140 313 11 35/ 31/ 34 Blacken Ian Oversby 139 603 12 28/ 20/ 52 KafuFFLe John Metcalf 136 39 13 41/ 46/ 14 G2-b David Moore 136 142 14 23/ 11/ 66 The Phantom Menace Anton Marsden 135 56 15 30/ 27/ 43 Jade Ben Ford 134 425 16 39/ 46/ 15 Jinx Christian Schmidt 132 319 17 37/ 43/ 20 myBlur Paulsson 130 21 18 33/ 37/ 30 Keyser Soze Anton Marsden 129 57 19 21/ 24/ 55 jam test 3 John Metcalf 117 22 20 34/ 52/ 14 Hyperclear 4+ Steve Gunnell 116 1 21 29/ 55/ 16 Dodger Anton Marsden 102 0 Subject: FA: ARTHUR MURRAY COIN AWARDS on EBAY From: dreamer@iop.com (dreamer) Message-ID: Date: Tue, 30 Jan 2001 05:46:18 GMT SHow your partner how great they are. Give them an Arthur Murray Award. Great looking Coins of Bronze and Gold plated. http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?ViewItem&item=1210664964&r=0&t= 0&showTutorial=0&ed=981433038&indexURL=0&rd=1 If the links doesn't work look under coins:exonumia:medals Message-ID: From: anton@paradise.net.nz (Anton Marsden) Subject: Core War Frequently Asked Questions (rec.games.corewar FAQ) Date: 31 Jan 2001 20:28:39 GMT Archive-name: games/corewar-faq Last-Modified: September 4, 1999 Version: 4.2 URL: http://homepages.paradise.net.nz/~anton/cw/corewar-faq.html Copyright: (c) 1999 Anton Marsden Maintainer: Anton Marsden Posting-Frequency: once every 2 weeks Core War Frequently Asked Questions (rec.games.corewar FAQ) These are the Frequently Asked Questions (and answers) from the Usenet newsgroup rec.games.corewar. A plain text version of this document is posted every two weeks. The latest hypertext version is available at http://homepages.paradise.net.nz/~anton/cw/corewar-faq.html and the latest plain text version is available at http://homepages.paradise.net.nz/~anton/cw/corewar-faq.txt. This document is currently being maintained by Anton Marsden (anton@paradise.net.nz). Last modified: Sat Sep 4 00:22:22 NZST 1999 ------------------------------------------------------------------------ To Do * Add the new No-PSpace '94 hill location * Add online location of Dewdney's articles * Make question 17 easier to understand. Add a state diagram? * Add info about infinite hills, related games (C-Robots, Tierra?, ...) * New question: How do I know if my warrior is any good? Refer to beginners' benchmarks, etc. * Add a Who's Who list? * Would very much like someone to compile a collection of the "revolutionary" warriors so that beginners can see how the game has developed over the years. Mail me if interested. ------------------------------------------------------------------------ What's New * Changed primary location of FAQ (again!) * Changed Philip Kendall's home page address. * Updated list server information * Changed primary location of FAQ * Vector-launching code was fixed thanks to Ting Hsu. * Changed the location of Ryan Coleman's paper (LaunchPad -> Launchpad) * Changed pauillac.inria.fr to para.inria.fr ------------------------------------------------------------------------ Table of Contents 1. What is Core War 2. Is it "Core War" or "Core Wars"? 3. Where can I find more information about Core War? 4. Core War has changed since Dewdney's articles. Where do I get a copy of the current instruction set? 5. What is ICWS'94? Which simulators support ICWS'94? 6. What is the ICWS? 7. What is Core Warrior? 8. Where are the Core War archives? 9. Where can I find a Core War system for ...? 10. Where can I find warrior code? 11. I do not have FTP. How do I get all this great stuff? 12. I do not have access to Usenet. How do I post and receive news? 13. Are there any Core War related WWW sites? 14. What is KotH? How do I enter? 15. Is it DAT 0, 0 or DAT #0, #0? How do I compare to core? 16. How does SLT (Skip if Less Than) work? 17. What is the difference between in-register and in-memory evaluation? 18. What is P-space? 19. What does "Missing ;assert .." in my message from KotH mean? 20. How should I format my code? 21. Are there any other Core War related resources I should know about? 22. What does (expression or term of your choice) mean? 23. Other questions? ------------------------------------------------------------------------ 1. What is Core War? 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 processes of the opposing program to terminate, leaving your program in sole posession of the machine. There are Core War systems available for most computer platforms. Redcode has been standardised by the ICWS, and is therefore transportable between all standard Core War systems. The system in which the programs run is quite simple. The core (the memory of the simulated computer) is a continuous array of instructions, empty except for the competing programs. The core wraps around, so that after the last instruction comes the first one again. There are no absolute addresses in Core War. That is, the address 0 doesn't mean the first instruction in the memory, but the instruction that contains the address 0. The next instruction is 1, and the previous one obviously -1. However, all numbers are treated as positive, and are in the range 0 to CORESIZE-1 where CORESIZE is the amount of memory locations in the core - this means that -1 would be treated as CORESIZE-1 in any arithmetic operations, eg. 3218 + 7856 = (3218 + 7856) mod CORESIZE. Many people get confused by this, and it is particularly important when using the SLT instruction. Note that the source code of a program can still contain negative numbers, but if you start using instructions like DIV #-2, #5 it is important to know what effect they will have when executed. The basic unit of memory in Core War is one instruction. Each Redcode instruction contains three parts: * the opcode * the source address (a.k.a. the A-field) * the destination address (a.k.a. the B-field) The execution of the programs is equally simple. The MARS executes one instruction at a time, and then proceeds to the next one in the memory, unless the instruction explicitly tells it to jump to another address. If there is more than one program running, (as is usual) the programs execute alternately, one instruction at a time. The execution of each instruction takes the same time, one cycle, whether it is MOV, DIV or even DAT (which kills the process). Each program may have several processes running. These processes are stored in a task queue. When it is the program's turn to execute an instruction it dequeues a process and executes the corresponding instruction. Processes that are not killed during the execution of the instruction are put back into the task queue. Processes created by a SPL instruction are added to the task queue after the creating process is put back into the task queue. [ToC] ------------------------------------------------------------------------ 2. Is it "Core War" or "Core Wars"? 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. [ToC] ------------------------------------------------------------------------ 3. Where can I find more information about Core War? 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 two anthologies: Library of Author Title Published ISBN Congress Call Number The Armchair Dewdney, Universe: An New York: W. QA76.6 .D517 A. K. Exploration of H. Freeman �0-7167-1939-8 1988 Computer Worlds 1988 The Magic 0-7167-2125-2 Dewdney, Machine: A New York: W.(Hardcover), QA76.6 A. K. Handbook of H. Freeman �0-7167-2144-9 .D5173 1990 Computer Sorcery 1990 (Paperback) A.K. Dewdney's articles are still the most readable introduction to Core War, even though the Redcode dialect described in there is no longer current. For those who are interested, Dewdney has a home page at http://www.csd.uwo.ca/faculty/akd/. [ToC] ------------------------------------------------------------------------ 4. Core War has changed since Dewdney's articles. Where do I get a copy of the current instruction set? A draft of the official standard (ICWS'88) is available as ftp://www.koth.org/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 Mark Durham's tutorials, ftp://www.koth.org/corewar/documents/tutorial.1.Z and ftp://www.koth.org/corewar/documents/tutorial.2.Z. Steven Morrell has prepared a more practically oriented Redcode tutorial that discusses different warrior classes with lots of example code. This and various other tutorials can be found at http://www.koth.org/papers.html. Even though ICWS'88 is still the "official" standard, you will find that most people are playing by ICWS'94 draft rules and extensions. [ToC] ------------------------------------------------------------------------ 5. What is ICWS'94? Which simulators support ICWS'94? There is an ongoing discussion about future enhancements to the Redcode language. A proposed new standard, dubbed ICWS'94, is currently being evaluated. A major change is the addition of "instruction modifiers" that allow instructions to modify A-field, B-field or both. Also new is a new addressing modes and unrestricted opcode and addressing mode combination ("no illegal instructions"). ICWS'94 is backwards compatible; i.e. ICWS'88 warriors will run correctly on an ICWS'94 system. Take a look at the ICWS'94 draft at ftp://www.koth.org/corewar/documents/icws94.0202.Z for more information. There is a HTML version of this document available at http://www.koth.org/info/icws94.html. You can try out the new standard by submitting warriors to the '94 hills of the KotH servers. Two corewar systems currently support ICWS'94, pMARS (many platforms) and Redcoder (Mac), both available at ftp://www.koth.org/corewar. Note that Redcoder only supports a subset of ICWS'94. [ToC] ------------------------------------------------------------------------ 6. What is the ICWS? About one year after Core War first appeared in Scientific American, 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). The ICWS is no longer active. [ToC] ------------------------------------------------------------------------ 7. What is Core Warrior? Following in the tradition of the Core War News Letter, Push Off, and The 94 Warrior, Core Warrior is a newsletter about strategies and current standings in Core War. Started in October 1995, back issues of Core Warrior (and the other newsletters) are available at http://para.inria.fr/~doligez/corewar/. There is also a Core Warrior index page at http://www.kendalls.demon.co.uk/pak21/corewar/warrior.html which has a summary of the contents of each issue of Core Warrior. Many of the earlier issues contain useful information for beginners. [ToC] ------------------------------------------------------------------------ 8. Where are the Core War archives? 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 ftp://ftp.csua.berkeley.edu/pub/corewar. Also, most of past rec.games.corewar postings (including Redcode source listings) are archived there. Jon Blow (blojo@csua.berkeley.edu) is the archive administrator. When uploading to /pub/corewar/incoming, ask Jon to move your upload to the appropriate directory and announce it on the net. This site is mirrored at: * http://www.koth.org/corewar/ * ftp://www.koth.org/corewar/ * ftp://ftp.inria.fr/INRIA/Projects/para/doligez/cw/mirror The plain text version of this FAQ is automatically archived by news.answers (but this version is probably out-of-date). [ToC] ------------------------------------------------------------------------ 9. Where can I find a Core War system for . . . ? Core War systems are available via anonymous FTP from www.koth.org in the corewar/systems directory. Currently, there are UNIX, IBM PC-compatible, Macintosh, and Amiga Core War systems available there. It is a good idea to check ftp://www.koth.org/corewar/incoming for program updates first. 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 www.koth.org. Generally, the older the program - the less likely it will be ICWS compatible. If you are looking for an ICWS'94 simulator, get pMARS, which is available for many platforms and can be downloaded from: * ftp://ftp.csua.berkeley.edu/pub/corewar (original site) * ftp://www.koth.org/corewar (koth.org mirror) * ftp://ftp.inria.fr/INRIA/Projects/para/doligez/cw/mirror (Planar mirror) * http://www.nc5.infi.net/~wtnewton/corewar/ (Terry Newton) * ftp://members.aol.com/ofechner/corewar (Fechter) Notes: * If you have trouble running pMARS with a graphical display under Win95 then check out http://www.koth.org/pmars.html which should have a pointer to the latest compilation of pMARS for this environment. * RPMs for the Alpha, PowerPC, Sparc and i386 can be found at ftp://ftp.inria.fr/INRIA/Projects/para/doligez/cw/pmars-rpm/ Reviews of Core War systems would be greatly appreciated in the newsgroup and in the newsletter. Below is a not necessarily complete or up-to-date list of what's available at www.koth.org: MADgic41.lzh corewar for the Amiga, v4.1 MAD4041.lzh older version? MAD50B.lha corewar for the Amiga, beta version 5.0 Redcoder-21.hqx corewar for the Mac, supports ICWS'88 and '94 (without extensions) core-11.hqx corewar for the Mac core-wars-simulator.hqx same as core-11.hqx? corewar_unix_x11.tar.Z corewar for UNIX/X-windows, ICWS'86 but not ICWS'88 compatible koth31.tar.Z corewar for UNIX/X-windows. This program ran the former KotH server at intel.com koth.shar.Z older version kothpc.zip port of older version of KotH to the PC deluxe20c.tar.Z corewar for UNIX (broken X-windows or curses) and PC mars.tar.Z corewar for UNIX, likely not ICWS'88 compatible icons.zip corewar icons for MS-Windows macrored.zip a redcode macro-preprocessor (PC) c88v49.zip PC corewar, textmode display mars88.zip PC corewar, graphics mode display corwp302.zip PC corewar, textmode display, slowish mercury2.zip PC corewar written in assembly, fast! mtourn11.zip tournament scheduler for mercury (req. 4DOS) pmars08s.zip portable system, ICWS'88 and '94, runs on UNIX, PC, Mac, Amiga. C source archive pmars08s.tar.Z same as above pmars08.zip PC executables with graphics display, req 386+ macpmars02.sit.hqx pMARS executable for Mac (port of version 0.2) buggy, no display MacpMARS1.99a.cpt.hqx port of v0.8 for the Mac, with display and debugger MacpMARS1.0s.cpt.hqx C source (MPW, ThinkC) for Mac frontend pvms08.zip pMARS v0.8 for VMS build files/help (req. pmars08s.zip) ApMARS03.lha pMARS executable for Amiga (port of version 0.3.1) wincor11.zip MS-Windows system, shareware ($15) [ToC] ------------------------------------------------------------------------ 10. Where can I find warrior code? To learn the game, it is a good idea to study previously posted warrior code. The FTP archives have code in the ftp://www.koth.org/corewar/redcode directory. A clearly organized on-line warrior collection is available at the Core War web sites (see below). [ToC] ------------------------------------------------------------------------ 11. I do not have FTP. How do I get all this great stuff? There is an FTP email server at bitftp@pucc.princeton.edu. This address may no longer exist. I haven't tested it yet. Send email with a subject and body text of "help" (without the quotes) for more information on its usage. Note that many FTP email gateways are shutting down due to abuse. To get a current list of FTP email servers, look at the Accessing the Internet by E-mail FAQ posted to news.answers. If you don't have access to Usenet, you can retrieve this FAQ one of the following ways: * Send mail to mail-server@rtfm.mit.edu with the body containing "send usenet/news.answers/internet-services/access-via-email". * Send mail to mailbase@mailbase.ac.uk with the body containing "send lis-iis e-access-inet.txt". [ToC] ------------------------------------------------------------------------ 12. I do not have access to Usenet. How do I post and receive news? To receive rec.games.corewar articles by email, join the COREWAR-L list run on the Koth.Org list processor. To join, send the message SUB COREWAR-L FirstName LastName to listproc@koth.org. You can send mail to corewar-l@koth.org to post even if you are not a member of the list. Responsible for the listserver is Scott J. Ellentuch (ttsg@ttsg.com). Servers that allow you to post (but not receive) articles are available. Refer to the Accessing the Internet by E-Mail FAQ for more information. [ToC] ------------------------------------------------------------------------ 13. Are there any Core War related WWW sites? You bet. Each of the two KotH sites sport a world-wide web server. Stormking's Core War page is http://www.koth.org; pizza's is http://www.ecst.csuchico.edu/~pizza/koth . Damien Doligez (a.k.a. Planar) has a web page that features convenient access to regular newsletters (Push Off, The '94 Warrior, Core Warrior) and a well organized library of warriors: http://para.inria.fr/~doligez/corewar/. Convenient for U.S. users, this site is also mirrored at koth.org. [ToC] ------------------------------------------------------------------------ 14. What is KotH? How do I enter? King Of The Hill (KotH) is an ongoing Core War tournament available to anyone with email. You enter by submitting via email a Redcode program (warrior) with special comment lines. You will receive a reply indicating how well your program did against the current top programs "on the hill". There are two styles of KotH tournaments, "classical" and "multi-warrior". The "classical" KotH is a one-on-one tournament, that is your warrior 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. In "multi-warrior" KotH, all warriors on the hill fight each other at the same time. Score calculation is a bit more complex than for the one-on-one tournament. Briefly, points are awarded based on how many warriors survive until the end of a round. A warrior that survives by itself gets more points than a warrior that survives together with other warriors. Points are calculated from the formula (W*W-1)/S, where W is the total number of warriors and S the number of surviving warriors. The pMARS documentation has more information on multi-warrior scoring. The idea for an email-based Core War server came from David Lee. The original KotH was developed and run by William Shubert at Intel starting in 1991, and discontinued after almost three years of service. Currently, KotHs based on Bill's UNIX scripts but offering a wider variety of hills are are running at two sites: koth@koth.org is maintained by Scott J. Ellentuch (tuc@ttsg.com) and pizza@ecst.csuchico.edu by Thomas H. Davies (sd@ecst.csuchico.edu). Up until May '95, the two sites provided overlapping services, i.e. the some of the hill types were offered by both "pizza" and "stormking". To conserve resources, the different hill types are now divided up among the sites. The way you submit warriors to both KotHs is pretty much the same. Therefore, the entry rules described below apply to both "pizza" and "stormking" unless otherwise noted. Entry Rules for King of the Hill Corewar * Write a corewar program. KotH is fully ICWS '88 compatible, EXCEPT that a comma (",") is required between two arguments. * Put a line starting with ";redcode" (or ";redcode-94", etc., see below) 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. Additionally, adding ";name " and ";author " 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. Using ";name" is mandatory on the Pizza hills. In addition, it would be nice if you have lines beginning with ";strategy" that describe the algorithm you use. There are currently seven separate hills you can select by starting your program with ;redcode-94, ;redcode-b, ;redcode-lp, ;redcode-x, ;redcode, ;redcode-94x or ;redcode-94m. The former four run at "pizza", the latter three at "stormking". More information on these hills is listed below. * Mail this file to koth@koth.org or pizza@ecst.csuchico.edu. "Pizza" requires a subject of "koth" (use the -s flag on most mailers). * 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. * In an hour or so you should get more mail telling you how your program performed against the current top 20 (or 10) programs. If no news arrives during that time, 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 25 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 25 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. The server kills programs by assigning an impossibly low score; it may therefore take another successful challenge before a killed program is actually removed from the hill. 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. Duration Max. Hill Name Hill Core Max. Before Entry Min. Rounds Instr. Size Size Processes Distance Fought Set Tie Length Pizza's ICWS '94 Draft Hill Extended (Accessed with 25 8000 8000 80000 100 100 200 ICWS '94 ";redcode-94") Draft Pizza's Beginner's Extended Hill (Accessed 25 8000 8000 80000 100 100 200 ICWS '94 with ";redcode-b") Draft Pizza's Experimental Extended (Small) Hill 25 800 800 8000 20 20 200 ICWS '94 (Accessed with Draft ";redcode-x") Pizza's Limited Process (LP) Hill Extended (Accessed with 25 8000 8 80000 200 200 200 ICWS '94 ";redcode-lp") Draft Stormking's ICWS '88 Standard Hill (Accessed with 20 8000 8000 80000 100 100 250 ICWS '88 ";redcode") Stormking's ICWS '94 No Pspace Hill (Accessed with 20 8000 8000 80000 100 100 250 ICWS '94 ";redcode-94nop") Stormking's ICWS '94 Experimental Extended (Big) Hill 20 55440 55440 500000 200 200 250 ICWS '94 (Accessed with Draft ";redcode-94x") Stormking's ICWS '94 Multi-Warrior Extended Hill (Accessed 10 8000 8000 80000 100 100 200 ICWS '94 with Draft ";redcode-94m") Note: Warriors on the beginner's hill are retired at age 100. If you just want to get a status report without actually challenging the hills, send email with ";status" as the message body (and don't forget "Subject: koth" for "pizza"). If you send mail to "pizza" with "Subject: koth help" you will receive instructions that may be more up to date than those contained in this document. At "stormking", a message body with ";help" will return brief instructions. If you submit code containing a ";test" line, your warrior will be assembled but not actually pitted against the warriors on the hill. At "pizza", you can use ";redcode[-??] test" to do a test challenge of the Hill without affecting the status of the Hill. These challenges can be used to see how well your warrior does against the current Hill warriors. All hills run portable MARS (pMARS) version 0.8, a platform-independent Core War system available at www.koth.org. The '94 and '94x hills allow five experimental opcodes and three experimental addressing modes currently not covered in the ICWS'94 draft document: * LDP - Load P-Space * STP - Store P-Space * SEQ - Skip if EQual (synonym for CMP) * SNE - Skip if Not Equal * NOP - (No OPeration) * * - indirect using A-field as pointer * { - predecrement indirect using A-field * } - postincrement indirect using A-field [ToC] ------------------------------------------------------------------------ 15. Is it DAT 0, 0 or DAT #0, #0? How do I compare to core? Core is initialized to DAT 0, 0. This is an illegal instruction (in source code) under ICWS'88 rules and strictly compliant assemblers (such as KotH or pmars -8) will not let you have a DAT 0, 0 instruction in your source code - 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. Note that under ICWS'94, DAT 0, 0 is a legal instruction. [ToC] ------------------------------------------------------------------------ 16. How does SLT (Skip if Less Than) work? 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 (core 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. [ToC] ------------------------------------------------------------------------ 17. What is the difference between in-register and in-memory evaluation? These terms refer to the way instruction operands are evaluated. The '88 Redcode standard ICWS'88 is unclear about whether a simulator should "buffer" the result of A-operand evaluation before the B-operand is evaluated. Simulators that do buffer are said to use in-register evaluation, those that don't, in-memory evaluation. ICWS'94 clears this confusion by mandating in-register evaluation. Instructions that execute differently under these two forms of evaluation are MOV, ADD, SUB, MUL, DIV and MOD where the effective address of the A-operand is modified by evaluation of the B-operand. This is best illustrated by an example: L1 mov L2, mov.i #0, impsize 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 Colour 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. Decrement Resistant Property of warriors making them functional (or at least partially functional) when overrun by a DJN-stream. DJN-Stream (also DJN-Train) Using a DJN command to rapidly decrement core locations. example ... ... djn example, <4000 Dwarf The prototypical small bomber. Gate-busting (also gate-crashing) technique to "interweave" a decrement-resistant imp-spiral (e.g. MOV 0, 2668) with a standard one to overrun imp-gates. Hybrids warriors that combine two or more of the basic strategies, either in sequence (e.g. stone->paper) or in parallel (e.g. imp/stone). 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, mov.i #0,IMPSIZE 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. Optimal Constants (also optima-type constants) Bomb or scan increments chosen to cover core most effectively, i.e. leaving gaps of uniform size. Programs to calculate optimal constants and lists of optimal numbers are available at www.koth.org. Paper A Paper-like program is one which replicates itself many times. Part of the Scissors (beats) Paper (beats) Stone (beats Scissors) analogy. P-Warrior A warrior which uses the results of previous round(s) in order to determine which strategy it will use. 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. Q^2 Scan A modern version of the Quick Scan where anything found is attacked almost immediately. Quick Scan 2c scan of a set group of core locations with bombing if anything is found. Both of the following codes snips scan 16 locations and check for a find. If anything is found, it is attacked, otherwise 16 more locations are scanned. Example: start s1 for 8 ;'88 scan cmp start+100*s1, start+100*s1+4000 ;check two locations mov #start+100*s1-found, found ;they differ so set pointer rof jmn attack, found ;if we have something, get it s2 for 8 cmp start+100*(s2+6), start+100*(s2+6)+4000 mov #start+100*(s2+6)-found, found rof found jmz moveme, #0 ;skip attack if qscan found nothing attack cmp @found, start-1 ;does found points to empty space? add #4000, found ;no, so point to correct location mov start-1, @found ;move a bomb moveme jmp 0, 0 In ICWS'94, the quick scan code is more compact because of the SNE opcode: start ;'94 scan s1 for 4 sne start+400*s1, start+400*s1+100 ;check two locations seq start+400*s1+200, start+400*s1+300 ;check two locations mov #start+400*s1-found, found ;they differ so set pointer rof jmn which, found ;if we have something, get it s2 for 4 sne start+400*(s2+4), start+400*(s2+4)+100 seq start+400*(s2+4)+200, start+400*(s2+4)+300 mov #start+400*(s2+4)-found-100, found rof found jmz moveme, #0 ;skip attack if qscan found nothing add #100, -1 ;increment pointer till we get the which jmn -1, @found ;right place mov start-1, @found ;move a bomb moveme jmp 0, 0 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. Silk A replicator which splits off a process to each new copy before actually copying the code. This allows it to replicate extremely quickly. This technique is only possible under the '94 draft, because it requires post-increment indirect addressing. Example: spl 1 mov -1, 0 spl 1 ;generate 6 consecutive processes silk spl 3620, #0 ;split to new copy mov >-1, }-1 ;copy self to new location mov bomb, >2000 ;linear bombing mov bomb, }2042 ;A-indirect bombing for anti-vamp jmp silk, {silk ;reset source pointer, make new copy bomb dat >2667, >5334 ;anti-imp bomb Slaver see Pit-Trapper. Stealth Property of programs, or program parts, which are invisible to scanners, accomplished by using zero B-fields and reflections. Stone A Stone-like program designed to be a small bomber. Part of the Paper-Scissors-Stone analogy. Stun 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 Two-Pass Core-Clear (also SPL/DAT Core-Clear) core clear that fills core first with SPL instructions, then with DATs. This is very effective in killing paper and certain imp-spiral variations. Vampire see Pit-Trapper. Vector Launch one of several means to start an imp-spiral running. As fast as Binary Launch, but requiring much less code. See also JMP/ADD Launch and Binary Launch. This example is one form of a Vector Launch: sz EQU 2667 spl 1 spl 1 jmp @vt, }0 vt dat #0, imp+0*sz ; start of vector table dat #0, imp+1*sz dat #0, imp+2*sz dat #0, imp+3*sz ; end of vector table imp mov.i #0, sz [ToC] ------------------------------------------------------------------------ 23. Other questions? Just ask in the rec.games.corewar newsgroup or contact me. If you are shy, check out the Core War archives first to see if your question has been answered before. [ToC] ------------------------------------------------------------------------ Credits Additions, corrections, etc. to this document are solicited. Thanks in particular to the following people who have contributed major portions of this document: * Mark Durham (wrote the original version of the FAQ) * Paul Kline * Randy Graham * Stefan Strack (maintained a recent version of the FAQ) ------------------------------------------------------------------------ Copyright � 1999 Anton Marsden. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. ------------------------------------------------------------------------