Core War Competition
- Wikipedia article — some interesting background info, just skim the introduction.
- FAQ — more relevant information, just read the first answer.
- beginner's guide to Redcode — just read the section labelled "Starting with Redcode".
- rock, paper, scissors, etc. — now that you have an idea how to write Redcode, here are some high level warrior techniques that may help you get started with designing your own warrior.
Your warrior source code will need some metadata in the header, so I have provided a template:
;redcode-94 ;name My Warrior ;author John Doe MOV 0, 1
where My Warrior is the name you give to your warrior, and John Doe is your name. We will be using the Redcode-94 standard as outlined in the beginner's guide linked above. Name the file mywarrior.red or similar.
The competition machine needs to have pMARS installed (the most official Core War simulator). Download it here, and install:
$ tar xf pmars-0.9.2.tar.gz $ cd pmars-0.9.2/src $ make
Now upload all the warriors to the battle machine and make them fight to the death:
$ ./pmars -b path/to/all/warriors/*
Or specify only two warriors for a 1v1 battle:
$ ./pmars -b path/to/warrior0 path/to/warrior1