.trefbody
The body of the tied bot at the other end of the tie you're reading.
Facts
- Address
- 437
- Name
.trefbody- 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
.bodyof the tied bot, rounded. 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 32000; if the other has 32000 or more, you read 32000
- Mutations
- picked as a read (
*)
It holds the .body of the tied bot, rounded to an integer. If the other one has 32000 or more body, you read 32000. Like all the tref*, it describes the bot on the tie chosen with .readtie (or the one in .tiepres) and goes back to 0 when that tie no longer exists.
It's for comparing sizes within a tied group: deciding who eats, who reproduces or who passes resources to whom. Together with .trefnrg it gives you the partner's complete state.
' Fattens up while the tied bot has more body than I do
cond
*.numties 0 >
*.trefbody *.body >
start
100 .strbody store
stopThe guard *.numties 0 > avoids using the stale value that remains during the cycle in which the tie is broken (see What it feels through a tie (tref*)).