Skip to content

Commit

Permalink
Loader
Browse files Browse the repository at this point in the history
  • Loading branch information
gareththegeek committed Aug 31, 2018
1 parent 2423a5d commit b6e5625
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
5 changes: 5 additions & 0 deletions docs/corewar/loader.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
#Loader

At the beginning of a round, the parsed output of each [warrior](warriors) is loaded into the [core](core). Warriors are loaded into core at randomly selected addresses but are gauranteed no to be loaded closer than the [Minimum Separation](match_settings#minimum-separation) specified in the [Match Settings](match_settings).

Because warriors are loaded to a random address, successive rounds with the same warriors can have drastically different results. For this reason, matches between warrios are usually conducted over a number of rounds large enough to give a fair representation of each warrior's performance, removing the effect of 'lucky' wins.

When a warrior is loaded into Core, each of its parsed output instructions are placed sequentially and the warrior is allocated a single, initial [process](processes) set to execute the warrior's first instruction which is defined by the [ORG](../redcode/org) or [END](../redcode/org) directive. If no directive is specified, the first instruction in the warriors parsed output will be executed.
19 changes: 15 additions & 4 deletions docs/corewar/match_settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,18 @@ The maximum number of [Processes](processes) that each Warrior can have at one t

The maximum number of instructions which each Warrior can be composed of. Writing a warrior longer than this limit will result in a [Parser](../redcode/parser) error.

## Minimum Separation|The [Loader](loader) will not place Warriors closer than this number of addresses at the start of a Round|
|Standard|Which redcode [standard](../redcode/#standards) should be used when parsing warriors|
|Read limit|Instructions beyond this distance from the currently executing instruction cannot be read|
|Write limit|Instructions beyond this distance from the currenlty executing instruction cannot be written to|
## Minimum Separation

The [Loader](loader) will not place Warriors closer than this number of addresses at the start of a Round.

## Standard

Which redcode [standard](../redcode/#standards) should be used when parsing warriors.

## Read limit

Instructions beyond this distance from the currently executing instruction cannot be read.

## Write limit

Instructions beyond this distance from the currenlty executing instruction cannot be written to.

0 comments on commit b6e5625

Please sign in to comment.