DarwinBotsManual
Open the app EspañolES

.tmemval

The contents of one cell of the tied bot's memory; you choose the cell with .tmemloc.

Facts

Address
475
Name
.tmemval
Kind
Sense: the engine writes it for the DNA to read
Group
Memory (memloc, memval and genetic)
Written by
The engine, in the forces and collisions phase: it copies cell .tmemloc of the tied bot. You read it in the next cycle.
Cleared
The engine, when you run out of ties or don't have the tie that .readtie asks for. With .tmemloc outside 1 to 1000, the last value stays.
Range
Whatever the spied cell holds: −32000 to 32000
Mutations
picked as a read (*)

If you put an address between 1 and 1000 in .tmemloc, .tmemval brings in what that cell holds in the memory of the tied bot, over the same tie that the tref* describe (the one you choose with .readtie). It is the per-tie version of .memval.

The snapshot is taken after the other bot's DNA has run: if your partner writes its cell 61 in one cycle, you read that value in the next cycle.

' If the tied bot has the same DNA length as I do, cell 50 is 1
cond
*.numties 0 >
*.tmemval *.dnalen =
start
1 50 store
stop

(with .dnalen .tmemloc store written earlier in some gene). Two traps: if you put an address outside 1..1000 in .tmemloc, .tmemval is not cleared; it keeps the last value it read. And when the tie is broken, it only goes back to 0 one cycle later, like the rest of the tref*.