.trefsx
How many times the tied bot's DNA writes to .sx: part of its signature.
Facts
- Address
- 458
- Name
.trefsx- Kind
- Sense: the engine writes it for the DNA to read
- Group
- What it feels through a tie (tref*)
- Written by
- The engine, in the forces and collisions phase: it copies the count of writes to
.sxin the DNA of the tied bot (its.mysx). You read it in the next cycle. - Cleared
- The engine, when you run out of ties or don't have the tie that
.readtieasks for. - Range
- 0 to about 16000; in practice, a few units
- Mutations
- picked as a read (
*)
Counts how many times a write to .sx (address 3) appears in the DNA of the tied bot: the number 3, or .sx, followed by any write word such as store or inc. It only counts that literal form: if the DNA computes the address, it doesn't add up. It is the other bot's .mysx: what it reads about itself, read from your side of the tie.
It is a fact about the DNA, not about what happens: it counts the writes even if the gene never runs, and it only changes if the other bot's DNA mutates. That's why it works as part of a signature for recognizing species: two bots with the same DNA have the same counts. It tells you whether the other bot has genes for moving toward its left.
' If the tied bot doesn't have as many writes to .sx as I do, cell 50 is 1
cond
*.numties 0 >
*.trefsx *.mysx !=
start
1 50 store
stopThe other counts in the signature are .trefup, .trefdn, .trefdx, .trefaimdx, .trefaimsx, .trefshoot and .trefeye; the ones for the bot you see are the ref* sysvars, such as .refup.