Core War Competition

From Wiki | LUG@UCLA
Revision as of 01:33, 17 June 2013 by Admin (Talk | contribs)

Jump to: navigation, search

Reading Material

Preparation reading material to get new competitors up to speed:

  • 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.

Competition Info

Your warrior source code will need some metadata in the header, so I have provided a template:

;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 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