Corewars is 20ish! I wish I could have attended the Corewars 20th anniversary International Corewar Conference in Berlin

I stumbled onto corewars via an entry in an old copy of the jargon file (I wonder if ESR has removed that entry yet). I picked up the file and pmars from a BBS while I was in high school. After trying my hand at a few warriors, and bending my mind around a few of the more math oriented tutorials, I came to the conclusion corewars was brain-bustingly difficult. I decided I should try evolving instead. I'm naturally lazy, and I could get the machine to do all the work. My first evolver was written in perl, using pmars to test the warriors. I'm sorry to say it was a pretty dismal failure: The warriors were quite disappointing, and I couldn't leave it running very long (because the clattering of my hard disk kept me awake). But every 6 months or so I'd dust off the copy, make a few changes, and give it another whirl.

Now I have a different approach, I have a distributed client running on many machines, fed by a central server. This setup has produced some very interesting warriors, my most recent scored #2 on the 94nop hill (which I think is the hardest hill to make it on). I would say that counts a human competitive evolved warriors.

I call the evolver ccai, and you can download it (V 1.12p) here. You can also view the readme file. The current version has both Exhaust and fmars simulators, but we currently use fmars for the simulations (because fmars is very very fast). You will also need a copy of the old standard pmars to convert warriors to a standard readable by exhaust. This project wouldn't have made it very far without the help of Joonas Pihlaja, who rewrote exhaust at my request not once but twice, to add silly features for me. And I shouldn't forget Micheal Janeczek, who wrote fmars, as I am personally responsible for nearly 20 version number increases.

I use the benchmark from OptiMAX in my evolver, I've found the 94nop benchmark to be far better than anything I had put together myself.

Recently Sascha Wait, Christian Schmidt, Joonas Pihlaja, and I wrote an article about this evolver that was presented at the ALIFE IX conference. I'm quite excited about this, as I've always wanted to have something to do with the alife conferences.

(This was ripped shamelessly from Sascha's blog)
Vowk B, Wait AS, Schmidt C. In press. An Evolutionary Approach Generates Human Competitive Corewar Programs. To appear in Artificial Chemistry and its Applications, part of the Ninth International Conference on the Simulation and Synthesis of Living Systems (ALIFE 9). Sept. 12-15, 2004, Boston, MA. PDF

There is also an article in CoreWarrior 90 about using this evolver on the LP hills on SAL.

Joonas wrote all the wonderful software for the SAL hills. I only provide machine (1Ghz PIII running OpenBSD) and shelf space (although a periodic kick has been needed from time to time). I have evolved quite a few warriors for both the nano and the lp hills. I'm really quite happy with how the community has recieved the hills, and I hope it continues.

Previous successful warriors I'm happy about...

Skin - An evolved paper that made it on 94nop with a little help from Roy (qscan mostly) - One of the very first warriors I evolved that made it on the 94nop hill without any human tweaking. It came straight from the evolver -> 94nop. Needless to say I was pretty pleased

Machines Will Rule - This was a completely evolved paper, I spent several months working on the pool of redcode that this warrior sprung forth from. The evolver was tweaked to have a randomly configured, but working start block (thats the ;fooVEC comments, they're the settings for the start block and floating block positions). And the start block started some randomly positioned blocks of code in the warrior. MWR has three blocks, but it skillfully shot one of them in the foot, and scores better because of it. Evolution knew better than me.

It ranked 2nd when it was tossed at 94nop, which is likly the best 94nop score for an evolved warrior. Fizmo kindly immortalized me in usenet.

Eve 15 - Eve 15 is a Fizmo tweaked version of one of my evolved LP warriors. The original warrior didn't actually do too bad on its own. It was kind of an imp / imp-gate beast. Fizmo tacked on a qscan and tweaked the constants. We wrote a paper on the original for ALIFE.

Badness - Nothing special, but it was one of my few attempts at doing my own human tweaking. Since I really don't know redcode, it wasn't very successful, but I still liked it.

As well, I've got a whole host of nano warriors that were created and submitted by my autonomous evolver scripts, and a bunch of tiny warriors on the sourceforge tiny hills. Some of them were pretty good!


hill-srv.tar.gz - This is a group of programs for scoring hills of warriors. The script will score hills of up to ~1000 warriors (I estimate) without blowing up too badly. The,, and scripts are used to score *MASSIVE* hills of warriors. I'm using this software to score a hill of 152,000 nano warriors, it should run on pretty much any unix you like, provided you've got guile, swig, python, gcc-3.4+. Its not quick, but you can break the work up by running the battles on any systems you can get the client running on. I think this package should be pretty solid, so if anybody needs to score a huge hill, I've got that problem solved. :)

94x.tgz - A tarball of warriors I evolved for the 94X hill, used an early version of ccai (~3000 warriors)

94nop-5stages.tgz - This is a tarball of most of the 5 stages I used when evolving Machines will Rule (~10,000 warriors)

152k-nano-warriors.tgz - This file holds 152,000 nano warriors. Its pretty much everything I've ever evolved for the nano hill. (There are also a few human warriors that are in there to fill gaps in my evolvers, I'm not taking credit for them, they're just in there). Some of them are still on the hill. I used this as a source directory for my automated benchmark creation script. - This is a simple little script to determine the amount of score noise you can expect given a number of rounds against a directory of warriors. Specify a list of rounds on the command line. (uses pmars -P) and - These are a client and server that can be used to quickly distribute the task of running a large collection of warriors against a benchmark. You run the script on a server, and then run on client machines. All the clients will need the same directories full of files on a locally mounted filesystem. I've used this many times, it works, but it sure isn't pretty. Needs pmars.

NOTE: It's setup to "skim" collections, that is, to remove all the warriors that don't score in the top $keep (set on the server) places. Only removes the files on the directory on the server side, the client directories are untouched. I use it to make benchmarks very quickly for irct's that I try to evolve for. With enough machines you can whittle a thousand or more warriors down to a good benchmark. (for really odd core sizes and rules, you can use all of K or something, and only the warriors that work "well" in that core will be saved.) and - These two scripts are python and perl scripts to take valid recode and convert it into the simplified "pmars assembly" format (that is easily read by programs that digest redcode). These scripts convert entire directories of corewar files at once. You'll have to look at the code to figure out how to point there where you want. - This script is the core of my autonomous nano evolver. It downloads "scorecards" from the sal nano-hill website, and then figures out which warriors we have copies of (partly by checking the player ID), and then attempts to create a hill of warriors that score like the real hill. It uses a directory of source warriors to generate the benchmark, the more warriors you have in that directory for it to pick from, likely the better.

The script actually works really quite well when you consider how noisy the nano hill is. You'll need to play with the player ID if you want to use warriors of your own, or you can keep it as is, and download my 152k warrior nano tarball. That'll keep you running for a while.

Note: this script runs *VERY MANY* battles when it generates a hill. This is offset somewhat by the "score cache", it creates a huge pile of tiny files a directory so it only needs to the battles that it hasn't run yet. This means, if you run it the first time, it may take hours or days, but if you run it again after the hill changes or you add some new warriors to the directory of possibles it can use, it'll take 10 minutes while it scores the new warriors. On the down side, the huge score_db can eat up all your inodes and embarrass you in front of the corewar community when your autonomous evolver packs it in because it's out of inodes :)

dumped.tgz - You likely won't be interested in this, its an early dump of my new ID *NOT* evolver - This is the second version of the first evolver I wrote to tackle 94x, not very successfully.

opt.tgz - A simplistic optimizer that I wrote to optimize the bvowkium fizmoxide, based on the above evolve script. While it isn't terrifically efficent, it was portable, and easily distributed to a good number of clients. They would email me the best results. About a year later, I realized there were still some running on a few machines I forgot to stop. Sadly, the newer fizmoxides weren't significantly better than the version we submitted. (Which isn't terribly surprising, I spent a few days with more than 200 cpus running this code, I think we hit a pretty big chunk of the search space). Let this be a lesson to check your procmail dumps regularily!

rf22.tgz - A tarball of warriors I evolved for RF22

tiny-evolved.tgz - A tarball of warriors I evolved to tackle the sourceforge tiny hill, some were quite successful.

ccai-1.0.tgz ccai-1.1p.tgz ccai-1.12p.tgz - Three versions of my distributed corewars evolver. These are what have created all my successful warriors, If you manage to compile it and find my documentation lacking, please write me with a howto. I've tried writing docs for this thing, but I'm just too much under the hood to be of much help. - If you add this, and the script to the above evolver code, you'll get what I call my "autonomous evolver", which is just a fancy way of saying, "My evolver isn't very interesting to watch, so I built a Rube Goldberg device so I don't have to". Calling it my "autonomous evolver" makes me feel a little better about the fact its an ugly wad of rotted code, held together largely by something that smells like excrement. It's really a quick and ugly hack, and I should re-do it better. I whipped this together in a few minutes one afternoon, and it ran for a good 6 or 8 months before it ran out of inodes (because the score cache for the script got way too big, I've got a script to prune that directory in cron now) and did some stupid things that made me look like an idiot. - A quickie script I wrote to snag a copy of all the original r.g.c messages off google groups into a text file. There was still a little postprocessing to do afterward to remove the last bits of html from the output. But it works ok, just be aware it irritates google more than a little.

Other Evolvers of Note

Wil Varfar challenged me to try to beat 94nop (actually, there have been a few challenges). He hasn't been seen around much lately, but his species evolver does very well.

Dave Hillis evolves using his evolver redrace, I'm always amazed how well he does given that he only uses one machine! We won't even talk about how soundly he beat me during the nano evolver race.

Micro GP have evolved several very impressive showings. I think I'm going to have to send them an email to brag about my newest warrior. Maybe I won't, they'll turn up the heat and beat me. Definately a group to watch.

Martin Ankerl Has written an evolver called Yace, I've played with it myself a little, not bad. He also contributed exhaust-ma to ccai, giving a much needed speed boost to it.

Evolving section on, I won't steal Fizmo's set of links to pad my own lacking webpage.

Corewar Links

SF Ghouls Corewars Blog

Beginners Guides page from

SF's Corewars Page

King of the Hill One of the important hill servers on the internet. Has been around for a long time. Hosts 94nop, one of the major hills of the corewars community.

SAL There are several hills on SAL, including a beginners hill for those just starting out.

Koenigstuhl is an infinite hill where the great warriors go to live after they fall from koth. Hosted by Fizmo AKA Christian Schmidt, a very good source of information on all things corewar. Includes information about the 20th Anniversary ICC conference in Berlin this year. Hosted by Corewars Hall of Famer John Metcalf. Includes the infinite nano hill and many other interesting bits of corewar history.

Exhaust A MARS written by everyones second favorite finnish student, Joonas Pihlaja

fmars A fast (no, really) MARS that is mostly a drop in replacement to exhaust.

pmars is the default MARS, everyone seeks to emulate its greatness.

Redcoders Frenzy is an ongoing set of tournaments hosted at and run by Christian Schmidt. I suggest you make an entry if you are interested, the challenges are generally quite creative.