Core War

Core War (or Core Wars, also Darwin) is a game consisting of battles between two or more assembly language programs occupying the same memory space in which the winner is the last one running. Although "core war" can refer to any such event, it is usually taken to mean the game based on the Redcode language that developed a following in part because of A. K. Dewdney's articles in Scientific American on it.

Contents

History

"Core" refers to magnetic core memory, an obsolete technology. Core War programs (called "warriors") are assembled and executed by a program called a Memory Array Redcode Simulator (abbreviated to MARS).

According to the Jargon File, Core War was the idea of Victor A. Vyssotsky, Robert Morris Sr., and Dennis Ritchie, who wrote a program called "Darwin" in the 1960s. In 1984, Core War Guidelines (http://www.ociw.edu/~birk/COREWAR/DOCS/guide2red.txt) by A. K. Dewdney and D. G. Jones defined the language Redcode. The International Core War Society (ICWS) updated the language in 1984 and 1988, and proposed a new update in 1994 that was never formally set as the new standard.

Redcode

Redcode, because it is designed for battle rather than assembly on a real machine, has some differences from "normal" assembly:

  • It uses relative addressing (that is, "0" refers to the currently executing instruction, "-1" refers to the previous one). This way, a program can be randomly placed in the core and not have to know its location.
  • The core (or memory) is circular, so all addresses are taken modulo the coresize.
  • There are many addressing modes for the arguments to be taken as and many instruction modifiers so that each op-code is versatile.
  • Data are stored as arguments to op-codes (usually the DAT op-code), rather than as whole instructions. This makes the instruction modifiers a necessity.
  • The DAT op-code terminates the current process.
  • The SPL op-code divides the current process into two processes, each executing less frequently.

Strategy

Warriors are divided into categories, although programmers frequently implement programs with the behavior of two or more of these.

  • A paper copies itself repeatedly, sacrificing durability for speed.
    • Silks are special types of papers that begin execution of the copy before it is finished in order to gain copying speed.
  • A stone systematically "bombs" the core, usually with DAT statements.
  • A scissors employs some sophisticated but slower strategy.
    • A vampire or pit-trapper steals its opponents' processes, usually making them execute SPL statements repeatedly to slow down the remaining processes.
  • An imp can be as simple as the single statement "MOV 0 1", which copies itself one space ahead repeatedly, overwriting whatever code is in front of it. A more sophisticated imp operating on the same principle, like an imp ring or imp spiral is required to actually kill enemy processes, however.

As their names imply, papers usually overwhelm stones, stones are effective against scissors, and scissors have an advantage over papers.

Variants

CoreWars 8086

CoreWars 8086 implements a game very similar to the original Core War. Instead of using the customized instruction set of Redcode, CoreWars 8086 warrior programs are written in 8086 assembly language.

See also

External links

  • The Core War Info page (http://www.corewar.info/)
  • The Beginner's Guide to Redcode (http://vyznev.net/corewar/guide.html) by Ilmari Karonen provides an introduction to Redcode for programmers and nonprogrammers alike.
  • KOTH.org (http://www.koth.org/) hosts "King of the Hill" Core War tournaments and provides information and software.
  • The Core War FAQ (http://homepages.paradise.net.nz/~anton/cw/corewar-faq.html)
  • CoreWars 8086 (http://sourceforge.net/projects/corewars8086) open source engine download site

de:Core War

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools