DarwinBotsManual
Open the app EspañolES

.trefnrg

The energy of the tied bot at the other end of the tie you're reading.

Facts

Address
464
Name
.trefnrg
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 energy (.nrg) of 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 .readtie asks for.
Range
−32000 to 32000; if the other has 32000 or more, you read 32000
Mutations
picked as a read (*)

It holds the energy (.nrg) of the tied bot, rounded to an integer. It's what you look at before passing energy to a partner or asking for some: together with your own .nrg it tells you which of the two is better off. Transfers through a tie are done with .tieloc and .tieval (see Ties and multicellular bots).

' If the tied bot has less than half my energy, cell 50 is 1
cond
*.numties 0 >
*.trefnrg 2 mult *.nrg <
start
1 50 store
stop