
What is Corewar?
Corewar is a programming game in which two or more battle programs (called "warriors") compete for the control of the "Memory Array Redcode Simulator" virtual computer ("MARS"). These warriors are written in an abstract assembly language called Redcode. The object of the game is to cause all processes of the opposing warrior to terminate, leaving the victorious program in sole possession of the machine.
The Corewar DynaHill
The Corewar DynaHill uses a different (dynamic) hill concept, which is quite similar to the ranking system used in Japanese professional sumo sport.
Every warrior fights 15 warriors on the hill. Depending on the result a victory or a defeat is declared. In case of a tie a victory is declared randomly. In case of 100% ties a defeat for both warriors is declared.
This means after fighting the 15 opponents the overall score can range between 15 victories (15 - 0) and 15 defeats (0 - 15). The higher the number of victories, the higher the warrior climbs up the hill for the next run. The higher the number of defeats, the further the warrior drops down the hill. No matter what the result is, it is most likely that on the next hill run the warriors have to face different opponents.
To limit the distance of two warriors fighting each other the DynaHill is divided into several hill segments. Warriors can fight only within each hill segment. The names of the hill segments are mostly taken from Sumo:
1. Makuuchi -> Top of the DynaHill
2. Juryo
3. Makushita
4. Sandanme -> Middle of the DynaHill
5. Jonidan
6. Jonokuchi
7. Maezumo -> Bottom of the DynaHill
Each hill segment contains 400 warriors except Maezumo which contains the rest (actually slightly more than 400).
Four entries (or pool warriors if no new entries) will enter each round the DynaHill at the bottom (Maezumo) facing the weakest warriors of the hill. As higher they climb as stronger will be the opponents and depending on their strength they might be able to climb up to the top of the DynaHill or will 'hit the wall' somewhere inbetween.
Entry Categories
The entries are devided into the following categories:
;redcode-94
94draft warriors without the pspace instructions stp and ldp
;redcode-PW
94draft warriors containing the pspace instructions stp and ldp
;redcode-88
88 warrior
;redcode-lp
LP warriors optimized for max. processes of 8 containing the pspace instructions stp and ldp
;redcode-ln
LP warriors optimized for max. processes of 8 without the pspace instructions stp and ldp
;redcode-DS
Warriors for the 1.ICPC rules without the pspace instructions stp and ldp
;redcode-DN
Warriors for the 1.ICPC rules containing the pspace instructions stp and ldp
;redcode-NW
Nano warriors
PS: Sorry for the inconsistencies in the naming. Everything was organic growing over the past 1.5 years.
Special Rules
All following special rules will give all entry
categories almost equal chances to be on top of the
DynaHill.
Special rules for max. process
The max. process -p setting depends on which categories
battle each other.
Here is the matrix for the -p settings:
94/PW/88 DS/DN lp/ln NW
94/PW/88 High Mid2 Mid1 High
DS/DN Mid2 Mid2 Low Mid2
lp/ln Mid1 Low Lp Mid1
NW High Mid2 Mid1 Low
High: -p randomly for every battle between 8000 and 2000
Mid2: -p randomly for every battle between 400 and 120
Mid1: -p randomly for every battle between 160 and 80
Low: -p randomly for every battle between 120 and 16
Lp: -p fixed for every battle at 8
Special rules for warrior lengths
The maximum length for the warriors is 200. That one
for Nano warriors is 5
Special rules for '88 warriors
Compared to ICWS '94 the ICWS '88 instruction set is
limited. To give them an equal chance '88 warriors will
get therefor a special bonus.
- '88 warriors will get by default additionally 5-15%
of the rounds as wins.
- '88 warriors will get additionally 5-15% more wins
than they achieved in a battle.
Special rules for Nano warriors
Nano warriors fight each other in a coresize of 80
with the above mentioned max. process settings.
If Nano warriors battle a warrrior from a different
category distinct numbers of copies of the Nano
warrior are loaded into the coresize 8000 for a
multi-warrior battle.
For half of the rounds 6 copies of the Nano warrior
are loaded, for the other half 15 copies are loaded.
(This gave so far the most promising results)
The Nano warrior wins if the coresize 8000 warrior is
terminated. The coresize 8000 warrior wins if all
Nano warriors in the multi-battle are terminated.
Further rules
- The predefined variable CORESIZE is allowed for
all warriors to calculate constants. This might
be useful especially for Nano warriors.
- The predifined variable CURLINE is allowed for
all warriors to calculate constants.
- All other predefined variable are disallowed.
- All warriors submitted will be automatically published.
- All entries must run properly with exmars and pmars.
- It is disallowed to use one of the pool warriors as
an entry. The md5 checksum of the compiled entries
will be compared with that one for the pool warriors.
How to submit to DynaHill
Format your submission as follows:
;redcode <- define the entry category
;name <- name of your entry
;author <- your name
;assert 1
;strategy <- if you like you can add some comments here
;evolver <- if you use an evolver program please state
here which one you was using
then add your program
Here's a sample entry:
;redcode
;name Dwarf
;author A. K. Dewdney
;assert 1
;strategy Throw DAT bombs around memory,
;strategy hitting every 4th memory cell.
bomb DAT #0
dwarf ADD #4, bomb
MOV bomb, @bomb
JMP dwarf
END dwarf
Submit your entries to: fizmo (at) corewar (.) info with the subject line: DynaHill
Although the hill itself runs fully automated, it didn't contain an automated e-mail interface so far. This means that I have to copy the entry manually into DynaHill and you might not get an immediate reply to your submissions.
Happy Coding!