.tin2
Tie input channel number 2: the value that the bot at the other end of the tie you're reading publishes in its .tout2.
Facts
- Address
- 421
- Name
.tin2- Kind
- Sense: the engine writes it for the DNA to read
- Group
- Inputs and outputs
- Written by
- The engine, in the forces and collisions phase: copies the
.tout2of the bot at the other end of the tie you read. You read it in the next cycle. - Cleared
- The engine, when you run out of ties or do not have the tie that
.readtieasks for. - Range
- −32000 to 32000
- Mutations
- picked as a read (
*)
It works like .tin1: it brings in whatever the bot at the other end of the tie you're reading (the one you choose with .readtie or, if you didn't choose, the most recently created one) has written in its .tout2. It arrives one cycle late, and the engine reloads it every cycle for as long as the tie exists; it goes back to 0 when you run out of ties. All the .tin channels come from the same tie in the same cycle.
If your partner publishes in .tout2 how much energy it lost in the last cycle, you read it like this:
' if my partner is losing energy, I store how much in 52
cond
*.tin2 0 >
start
*.tin2 52 store
stopSee Inputs and outputs.