DarwinBotsManual
Open the app EspañolES

.refage

The age in cycles of the bot you are looking at, up to 32000: for recognizing newborns.

Facts

Address
710
Name
.refage
Kind
Sense: the engine writes it for the DNA to read
Group
What it sees (ref*)
Written by
The engine, in the actions phase of every cycle, with the age in cycles of the bot your focus eye sees. Also on colliding with a bot. You read it in the next cycle.
Cleared
The engine, every cycle, when the senses are cleared.
Range
0 to 32000; older than that, it stays at 32000.
Mutations
picked as a read (*)

.refage is the age of the bot your focus eye sees, in cycles, capped at

  1. It is the same count that bot reads in its .robage.

The typical use is not attacking newborns, which are almost always your own children or a neighbor's: a newborn bot sits right next to its parent and is easy to mistake for prey. Combined with the signature (.refeye), it is also useful for the opposite: looking for a mate only among the adults of your species.

If you see nothing, it is 0, so a condition like *.refage 50 < is also met with nothing in sight: always combine it with an eye (.eye5).

' I don't touch a newborn: I keep going
cond
*.eye5 0 >
*.refage 50 <
start
314 .aimdx store
stop