Some of the simpler techniques include blindly overwriting memory, searching for the opponent or spawning off new processes. These are commonly known as stone, scissors, paper after the popular playground game. Stone usually wins against scissors, scissors normally defeat paper, and paper mostly beats stone.
Here's an example of a typical Core War program:
org wipe step equ 5 first equ bomb-10 bomb:mov.i #1, -1 ptr: sub #step, #first wipe:jmz.f ptr, @ptr mov bomb, >ptr djn.f wipe, {ptr-5 endThis simple example of scissors once held a 20 point lead over it's rivals. The first instruction is never executed, it's the bomb used to overwrite opponents. The next two instructions form a loop which look through memory for an opponent, and the final two instructions actually overwrite it.
Core War is still going strong, and celebrates it's 25th anniversary in 2009. If you'd like to discover more about Core War, here are the top resources:
- The Beginner's Guide to Redcode will teach you the language of Core War
- pMARS is a portable implementation of the Core War virtual machine
- Core War Tutorials exist on virtually every aspect of the game
- Koenigstuhl is an archive of thousands of published Core War programs
- SAL organises a number of on-going king of the hill tournaments
- sfghoul and impomatic report the latest Core War news on their blogs
- #corewars is the official Core War discussion channel, hosted by irc.freenode.net
What are your experiences with Core War, have you ever had any success?
I always liked Core War, from the first time I read about it on a computer magazing, and later rediscovered the original articles by A.K. Dewdney. Like many, in time I have developed my own Core War system:
ReplyDeletehttp://mark0.net/soft-xrk-gallery.html
But I somewhat become less interested with the newer verisons of the standard. I feel like too much complexity where added.
Hi Marko, when I first started playing Core War, I only knew about the '88 standard. When I discovered '94, I absolutely hated it, but I've got used to it over time. It does add some flexibility to the language, but apart from post increment addressing, I think I could live without it.
ReplyDeleteHi John. I stopped by after your recent email to me about Core War history. Has it been almost 25 years already?! Looking at my old correspondence, printed mostly by 9-pin dot matrix printers, it certainly seems like ancient history. We need to have a party somewhere. Too bad The Computer Museum in Boston is no longer there.
ReplyDeleteThe '94 standard is practically 100% backward compatible with the '88 standard. In creating the '94 standard, we had two goals: 1) remove all ambiguity, and 2) make all combinations of opcodes, addressing modes, and fields valid instructions. Doing #2 made Redcode more flexible (and seemingly complex), whereas at the implementation level (MARS) it actually made things simpler.
Looking back on my ancient correspondence, I see and remember that we were constantly griping about the standards from day one up until the '94 standard came out. That the '94 standard has lasted this long is a testament to its strengths.