Difference between revisions of "Core War Competition"

From Wiki | LUG@UCLA
Jump to: navigation, search
(Created page with " == Reading Material == * [http://en.wikipedia.org/wiki/Core_War Wikipedia article] — some interesting background info, just skim the introduction. * [http://linux.ucla.edu...")
 
(use SERVER magic)
Line 1: Line 1:
 
 
== Reading Material ==
 
== Reading Material ==
  
 
* [http://en.wikipedia.org/wiki/Core_War Wikipedia article] — some interesting background info, just skim the introduction.
 
* [http://en.wikipedia.org/wiki/Core_War Wikipedia article] — some interesting background info, just skim the introduction.
* [http://linux.ucla.edu/~sankeytm/corewar/corewar-faq.html FAQ] — more relevant information, just read the first answer.
+
* [{{SERVER}}/~sankeytm/corewar/corewar-faq.html FAQ] — more relevant information, just read the first answer.
* [http://linux.ucla.edu/~sankeytm/corewar/guide.html beginner's guide to Redcode] — just read the section labelled "Starting with Redcode".
+
* [{{SERVER}}/~sankeytm/corewar/guide.html beginner's guide to Redcode] — just read the section labelled "Starting with Redcode".
* [http://linux.ucla.edu/~sankeytm/corewar/trilogy.html 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.
+
* [{{SERVER}}/~sankeytm/corewar/trilogy.html 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 ==
 
== Competition Info ==
Line 19: Line 18:
 
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.
 
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 [http://linux.ucla.edu/~sankeytm/corewar/pmars-0.9.2.tar.gz here], and install:
+
The competition machine needs to have pMARS installed (the ''most'' official Core War simulator). Download it [{{SERVER}}/~sankeytm/corewar/pmars-0.9.2.tar.gz here], and install:
  
 
  $ tar xf pmars-0.9.2.tar.gz
 
  $ tar xf pmars-0.9.2.tar.gz

Revision as of 16:07, 10 June 2013

Reading Material

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

;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