I made a thread about it on /tech/ but it seems it's too techy to compete with browser wars and NSA.
>What is corewars?
Basically you write programs in Redcode, which is RISC assembly with stuff like
multithreading and relative addressing. Your warrior (code) is then loaded into
the core (VM, e.g. pmars) and has to compete with another warrior to make it
terminate itself (you usually do this by modifying their code, jump addresses
etc). You warrior fights against multiple other warriors to eventually be rated
and get a rank on the hill (if it's good enough) to push another off. Get the
first rank to become king of the hill until you're pushed off.
>Nice, how can I get started?
Learn redcode, there's the '88 standard and the '94 draft with some cool
features which is the de-facto standard. It's reference implementation is
pmars. Here's a beginners guide to '94: http://vyznev.net/corewar/guide.html
Here's a reference: http://www.koth.org/info/pmars-redcode-94.txt For some
advanced reading try http://www.infionline.net/~wtnewton/corewar/chapter1.html
and http://www.infionline.net/~wtnewton/corewar/chapter2.html or
http://www.corewars.org/docs/tips.html You can test your warriors in pmars
>pMARS
pMARS is the reference implementation of the '94 draft, you can get it on http://www.koth.org/pmars/ It's libre and comes for all major operating systems, most have it in their package manager, or you can compile the source yourself. You can use it to have warriors fight each other (usually you do multiple battles with randomized starting positions in the core). If you call it with the -k option it compiles your warriors into koth format (which you need to send a warrior to a hill). It also features the cbd debugger, you can either enter it during a battle or by supplying the -e option.
>cbd
use "help" to get a list of commands. "step" executes a single command and outputs the next command. Supply it with an integer to execute more than one command (e.g. "step 3" does three commands). "list" allows you to look at core addresses, "list 5" looks at the 5th command. You can also supply ranges like "list 0,100" to list a range of addresses. It also supports relative addressing (remember, all addresses are relative). Say you want to check what's at address two:
(cdb) list 2
00002 SNE.X $ -102, $ -102
(cdb)
Now where does -102 point to? Check it like this:
(cdb) list 2-102
07900
(cdb)
(i.e. we subtract 102 from 2 and end up in 8000+2-102=7900, which is empty)
You can also set traces with "trace". Use something like "trace 5" to put a trace on 5, then issue "go" to have pMARS run until just before the next execution of the command at address 5.