.trefshoot
How many times the tied bot's DNA writes to .shoot: part of its signature.
Facts
- Address
- 462
- Name
.trefshoot- 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
.shootin the DNA of the tied bot (its.myshoot). 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 .shoot (address 7) appears in the DNA of the tied bot: the number 7, or .shoot, 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 .myshoot: 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. A 0 almost always means the other bot doesn't shoot: it neither attacks nor feeds by shooting.
' If the tied bot has no shooting genes, cell 50 is 1
cond
*.numties 0 >
*.trefshoot 0 =
start
1 50 store
stopThe other counts in the signature are .trefup, .trefdn, .trefsx, .trefdx, .trefaimdx, .trefaimsx and .trefeye; the ones for the bot you see are the ref* sysvars, such as .refup.