Difference between revisions of "Core War Competition"

From Wiki | LUG@UCLA
Jump to: navigation, search
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
'''Next Core War Competition''': none planned
 +
 +
This page holds some information for Core War events hosted by LUG@UCLA.
 +
 
== Reading Material ==
 
== Reading Material ==
 
Preparation reading material to get new competitors up to speed:
 
Preparation reading material to get new competitors up to speed:
Line 6: Line 10:
 
* [{{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.
 
* [{{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 ==
+
== Competitor info ==
  
Your warrior source code will need some metadata in the header, so I have provided a template:
+
Your warrior source code will need some metadata in the header, like this:
  
 
  ;redcode-94
 
  ;redcode-94
Line 16: Line 20:
 
  MOV 0, 1
 
  MOV 0, 1
  
Replace "My Warrior" with the name you want to give your warrior, and "John Doe" with 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.
+
Replace "My Warrior" with the name you want to give your warrior, and "John Doe" with your name. We will be using the Redcode-94 standard as outlined in the beginner's guide linked above. Name the file <code>mywarrior.red</code> or similar.
 +
 
 +
== Competition instructions ==
 +
 
 +
Once everybody has written their warrior code, the competition may begin.
  
 
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:
 
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:
Line 31: Line 39:
  
 
  $ ./pmars -b path/to/warrior0 path/to/warrior1
 
  $ ./pmars -b path/to/warrior0 path/to/warrior1
 +
 +
Have a lot of fun!
 +
 +
 +
[[Category:Events]]

Latest revision as of 21:49, 17 April 2014

Next Core War Competition: none planned

This page holds some information for Core War events hosted by LUG@UCLA.

Reading Material[edit]

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.

Competitor info[edit]

Your warrior source code will need some metadata in the header, like this:

;redcode-94
;name My Warrior
;author John Doe

MOV 0, 1

Replace "My Warrior" with the name you want to give your warrior, and "John Doe" with 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.

Competition instructions[edit]

Once everybody has written their warrior code, the competition may begin.

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

Have a lot of fun!