.trefage
The age of the tied bot: tells you whether your parent or your child is on the other side.
Facts
- Address
- 465
- Name
.trefage- 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 age of the tied bot. You read it in the next cycle, and it equals what the other bot reads in its own
.robagein that cycle. - Cleared
- The engine, when you run out of ties or don't have the tie that
.readtieasks for. - Range
- 0 with no tie; with a tie, 1 to 32000
- Mutations
- picked as a read (
*)
It holds the age of the tied bot, the same one it reads in its .robage in that cycle (capped at 32000). Its classic use is telling relatives apart: after reproducing, parent and child are joined by the birth tie, and *.trefage *.robage > is true only on the child's side.
' If the tied bot is older than I am (my parent), I break the tie
cond
*.numties 0 >
*.trefage *.robage >
start
*.tiepres .deltie store
stopMind the timing: the child starts to feel its parent in its fourth cycle of life, and until then .trefage is 0, so the condition is false. The parent, on the other hand, feels it from the cycle after the birth: it already reads that the tied bot has age 1, even though the child still reads 0 in its .robage (see What it feels through a tie (tref*)). From the next cycle on, the two numbers match.