DarwinBotsManual
Open the app EspañolES

.eyef

What the focus eye sees: repeats the value of the eye you chose with .focuseye, or that of .eye5 if you chose none.

Facts

Address
510
Name
.eyef
Kind
Sense: the engine writes it for the DNA to read
Group
Eyes
Written by
The engine, in the actions phase of every cycle: it copies the value of the focus eye (.focuseye). You read it in the next cycle.
Cleared
The engine, every cycle, before looking again: if the focus eye sees nothing, it stays at 0.
Range
0 to 32000, on the same scale as the other eyes.
Mutations
picked as a read (*)

A copy of the focus eye's value. With .focuseye at 0, which is the factory setting, the focus is .eye5 and .eyef has the same value as it; if you move the focus to another eye, .eyef repeats that one instead. It is 0 when the focus eye sees nothing, and if it sees something it uses the same scale as the other eyes (Eyes).

It is useful for writing genes that do not depend on which eye is looking: the bot can keep moving the focus and the rest of the DNA keeps reading .eyef. Also, what the focus eye sees is what the cells of what it sees describe (.refeye, .refnrg and the rest), so an .eyef greater than 0 assures you that those cells are talking about something.

' focus on the rightmost eye; if it sees something, turn toward it
cond
*.robage 0 =
start
4 .focuseye store
stop

cond
*.eyef 0 >
*.eye5 0 =
start
140 .aimdx store
stop

If the bot is inside an obstacle and obstacles are visible, all nine eyes and .eyef are 32000.