DarwinBotsManual
Open the app EspañolES

Inputs and outputs

The twenty channels a bot uses to pass numbers to another: .out and .in by sight, .tout and .tin through a tie.

AddressSysvarKindSummary
410.tout1CommandFirst tie output channel: the number you write here is read in its .tin1 by the bot tied to you.
411.tout2CommandTie output channel number 2: what you write here is read in its .tin2 by the bot tied to you.
412.tout3CommandTie output channel number 3: what you write here is read in its .tin3 by the bot tied to you.
413.tout4CommandTie output channel number 4: what you write here is read in its .tin4 by the bot tied to you.
414.tout5CommandTie output channel number 5: what you write here is read in its .tin5 by the bot tied to you.
415.tout6CommandTie output channel number 6: what you write here is read in its .tin6 by the bot tied to you.
416.tout7CommandTie output channel number 7: what you write here is read in its .tin7 by the bot tied to you.
417.tout8CommandTie output channel number 8: what you write here is read in its .tin8 by the bot tied to you.
418.tout9CommandTie output channel number 9: what you write here is read in its .tin9 by the bot tied to you.
419.tout10CommandTie output channel number 10: what you write here is read in its .tin10 by the bot tied to you.
420.tin1SenseFirst tie input channel: the value that the bot at the other end of the tie you're reading publishes in its .tout1.
421.tin2SenseTie input channel number 2: the value that the bot at the other end of the tie you're reading publishes in its .tout2.
422.tin3SenseTie input channel number 3: the value that the bot at the other end of the tie you're reading publishes in its .tout3.
423.tin4SenseTie input channel number 4: the value that the bot at the other end of the tie you're reading publishes in its .tout4.
424.tin5SenseTie input channel number 5: the value that the bot at the other end of the tie you're reading publishes in its .tout5.
425.tin6SenseTie input channel number 6: the value that the bot at the other end of the tie you're reading publishes in its .tout6.
426.tin7SenseTie input channel number 7: the value that the bot at the other end of the tie you're reading publishes in its .tout7.
427.tin8SenseTie input channel number 8: the value that the bot at the other end of the tie you're reading publishes in its .tout8.
428.tin9SenseTie input channel number 9: the value that the bot at the other end of the tie you're reading publishes in its .tout9.
429.tin10SenseTie input channel number 10: the value that the bot at the other end of the tie you're reading publishes in its .tout10.
800.out1CommandFirst output channel through sight: the number you write here is read in its .in1 by any bot that is looking at you.
801.out2CommandOutput channel number 2 through sight: what you write here is read in its .in2 by the bot that is looking at you.
802.out3CommandOutput channel number 3 through sight: what you write here is read in its .in3 by the bot that is looking at you.
803.out4CommandOutput channel number 4 through sight: what you write here is read in its .in4 by the bot that is looking at you.
804.out5CommandOutput channel number 5 through sight: what you write here is read in its .in5 by the bot that is looking at you.
805.out6CommandOutput channel number 6 through sight: what you write here is read in its .in6 by the bot that is looking at you.
806.out7CommandOutput channel number 7 through sight: what you write here is read in its .in7 by the bot that is looking at you.
807.out8CommandOutput channel number 8 through sight: what you write here is read in its .in8 by the bot that is looking at you.
808.out9CommandOutput channel number 9 through sight: what you write here is read in its .in9 by the bot that is looking at you.
809.out10CommandOutput channel number 10 through sight: what you write here is read in its .in10 by the bot that is looking at you.
810.in1SenseFirst input channel through sight: the value that the bot in your focus eye publishes in its .out1.
811.in2SenseInput channel number 2 through sight: the value that the bot in your focus eye publishes in its .out2.
812.in3SenseInput channel number 3 through sight: the value that the bot in your focus eye publishes in its .out3.
813.in4SenseInput channel number 4 through sight: the value that the bot in your focus eye publishes in its .out4.
814.in5SenseInput channel number 5 through sight: the value that the bot in your focus eye publishes in its .out5.
815.in6SenseInput channel number 6 through sight: the value that the bot in your focus eye publishes in its .out6.
816.in7SenseInput channel number 7 through sight: the value that the bot in your focus eye publishes in its .out7.
817.in8SenseInput channel number 8 through sight: the value that the bot in your focus eye publishes in its .out8.
818.in9SenseInput channel number 9 through sight: the value that the bot in your focus eye publishes in its .out9.
819.in10SenseInput channel number 10 through sight: the value that the bot in your focus eye publishes in its .out10.

A bot can spy on an address in another bot's memory (with .memloc or, through a tie, with .tmemloc), but the intended way to communicate is to publish numbers for others to read. For that there are two sets of ten channels, each with its output and its input:

ChannelYou write toThe other bot reads fromReaches
By sight.out1 … .out10.in1 … .in10whoever has you in their focus eye, or collides with you
Through a tie.tout1 … .tout10.tin1 … .tin10the bot tied to you, if it is listening to that tie

The outputs are configuration: the engine never clears them, so writing them once is enough and the value stays published until you change it. The inputs are senses: the engine fills them after the DNA runs, so you always read what the other bot had published in the previous cycle. A newborn bot starts with all of them at 0; it doesn't inherit the parent's outputs.

By far the most common use is recognizing your own species: everyone writes the same code to .out1 and, before shooting, compares *.in1 with *.out1. That's how Artemis Minimalis from the Bestiary does it, for example. Pick a code other than 0: 0 is what any bot that doesn't use the channel publishes, and also what .in1 is when you aren't seeing anyone.

' I identify myself with a code
start
555 .out1 store
stop

' I shoot only if what is in front of me is not one of mine
cond
*.eye5 0 >
*.in1 *.out1 !=
start
-1 .shoot store
stop

The tie channels are for coordinating a multi-bot organism. By sight, .in1 is cleared after every run of the DNA; through the tie, .tin1 is reloaded every cycle from the tie you are reading and only goes to 0 when that tie stops existing. Parent and child are tied at birth and can talk through it almost right away: the parent receives the child's data from the first cycle, and the child receives the parent's when its .robage reaches 3 (see the tie sysvars and Ties and multicellular bots). If what you want is to write directly into the other bot's memory, that is done by .tieloc and .tieval.