DarwinBotsManual
Open the app EspañolES

.in1

First input channel through sight: the value that the bot in your focus eye publishes in its .out1.

Facts

Address
810
Name
.in1
Kind
Sense: the engine writes it for the DNA to read
Group
Inputs and outputs
Written by
The engine: copies the .out1 of the bot you have in your focus eye, in the actions phase, or of the bot you collide with, in the forces and collisions phase. You read it in the next cycle.
Cleared
The engine, when the senses are cleared, right after your DNA.
Range
−32000 to 32000
Note
It arrives as is, without the random ±1 of the original. It is 0 if you see nobody, if you see an obstacle or if the other bot does not use the channel.
Mutations
picked as a read (*)

.in1 tells you what the bot you are looking at with the focus eye (normally .eye5; change it with .focuseye) has written in its .out1. It is the same bot that the ref* senses describe: if there are several in that eye, the closest one. If another bot collides with you, you also receive its .out1, even if you don't see it.

It arrives one cycle late: the engine fills it after your DNA has run, and clears it after the next run. That is why it is 0 when you are not seeing any bot, when what is in front of you is an obstacle, and also when the other one never wrote its .out1. Those three cases cannot be told apart: to know whether someone is ahead, look at *.eye5, not *.in1.

The value arrives as is. The random ±1 of the original, which the note in the “Facts” box above mentions, belongs to an evolution mode of the program that this port does not include.

The typical comparison is with your own output, to recognize your own kind:

' I note in cell 51 how many times I saw someone who is not one of mine
start
555 .out1 store
stop

cond
*.eye5 0 >
*.in1 *.out1 !=
start
51 inc
stop

The full idea is in A bot that recognizes its own species. There are ten identical channels, from .in1 to .in10; see Inputs and outputs.