The guide to Pizza's ";commands"

This is a list of possible commands to add to the header of your submissions. All but ;redcode and ;name are optional, but courtesy dictates you should also use the ;author and ;strategy lines at the least. Always make sure there are no spaces before or after the ; in commands. Elements in square brackets [like this] are optional.

;redcode[-x|-b] [quiet|verbose|test]

The first command in your warrior must be ;redcode. This tells KotH which hill you wish to challenge, how much mail you wish to receive, and if this is a real challenge or just a test.

Some examples:

Default. Challenge the standard '94 Draft hill and send mail after every successful challenge.
;redcode-b verbose
Challenge the Beginner's hill (-b) and send mail after every opponent's challenge, even the unsuccessful ones.
;redcode-x quiet
Challenge the Experimental hill (-x) and only send mail after the initial challenge and when you finally get pushed off.
;redcode test
Test challenge the '94 Draft hill. The test option will challenge every warrior, but only half the normal amount of rounds will be fought, and the results will be discarded.

;name [warrior name]

Tells KotH what the name of your warrior is. This is used in the status reports and also the ;kill and ;change commands. Make sure it's something interesting.

Some examples:

;name test 0.1b
;name Dwarf

;author [author name]

Tells KotH your name. Also used in the status reports.

Some examples:

;author A. K. Dewdney
;author John K. Doe

;kill [warrior name]

Used to kill off previously submitted warriors that make it on to a hill. KotH performs a substring match on [warrior name] for all warriors on the hill. If the substring, mailing address, and ;password all match, the warrior is given a score of 0. In rare cases this is not enough to immediately push the warrior off the hill, but should be enough to eventually kill it in any case. Standard unix regular expression wildcards include "." for any one character and "*" for zero or more repetitions of the previous character. The regexp man page has the full explanation.

Some examples:

;kill .*
Kills all warriors submitted by you which are currently on the specified hill.
;kill test
Kills all warriors containing the substring "test". "test 1.0", "my test", and "just testing" would all match.
;kill .....*
Kills all warriors with names equal to or greater than five characters long.

;assert [boolean expression]

Another way to make sure your warrior goes to the right hill. pMARS checks all ;assert expressions against the hill specs. If it evaluates to false, the warrior will not challenge the hill. Variables to use include CORESIZE, MAXPROCESSES, MAXCYCLES, MAXLENGTH, MINDISTANCE, ROUNDS, PSPACESIZE, and WARRIORS.

Some examples:

;assert 1
Your warrior will work with any settings.
;assert !(CORESIZE % 4)
Your warrior only works with coresize MOD 4.
;assert MAXLENGTH > 100
Your warrior is too long for maxlength 100 hills.
;assert PSPACESIZE > 0
Your warrior uses pspace.

;strat[egy] [@date@] [comments]

The strategy of your warrior and other comments can be placed here. The string "@date@" will be replaced by the local date and time your warrior was submitted.

Some examples:

;strategy submitted @date@
;strategy qscan -> bomber
;strat version 3.5d : changed bombing constants

;pass[word] [password string]

An extra layer of protection for your warrior. Both the ;kill and ;change commands check for a password match before they will work. Please note that the entire ;password line must match exactly, not just the password string. Non-alphanumeric characters are not allowed in the password string.

Some examples:

;pass 12345
;passwd no one will guess this!
;password oabY5aRdkDQerPeNhkDszVcwYaLrOTGM

;show [source|nosource|on|off]

This command allows you to customize how publicly accessible you want your source code be. You can allow people to see sections of your source code, or forbit them from seeing any source at all.

Some examples:

;show nosource
Default. Will not let people see any of your source code.
;show source
Public. Lets others see all your source code.
;show on
;show off
Used in conjunction with the ;show source command to show only selected portions of your source. Any source code following the ;show off command will not be displayed, while any source code after the ;show on command will be. These commands are pointless without a ;show source in your header.

;url [HTTP 1.0 compliant URL]

This command lets you specify where the link from your name points to on the WWW status pages.

Some examples:

;url mailto:(submitter's address)
Default. Send mail to the person who submitted the warrior.
A link to your page, or your best friends page, etc.

;change [warrior name]

This command allows you to change the info in the header of your warrior without having to kill it and resubmit it. If you're going on vacation, you can change your warrior to "quiet", Or you can change your url, add strategy lines, etc. The two things you cannot change with this command are the name and password of your warrior. ;change uses the same regular expression matching as the ;kill command.

Some examples:

;redcode-94 quiet
;change Paper
Will change your warrior named "Paper" on the 94 hill to quiet.
;change Stone
Will change your warrior named "Stone" on the 94 hill to "standard" mail response (if it wasn't already), and will also change the warrior's url.
;redcode-b verbose
;change Imp
;strat   not really an Imp, I just
;strat   couldn't think of a real name.
Will change your warrior named "Imp" on the beginner's hill to verbose, and will also add the strategy lines above after any existing strategy lines.

* Back to the Pizza Server Corewar Home Page.