Memory (memloc, memval and genetic)
The addresses for spying on another bot's memory (through sight or through a tie) and those of genetic memory, the kind that passes from parents to children.
| Address | Sysvar | Kind | Summary |
|---|---|---|---|
| 0 | Address 0 | Internal | An internal cell that the DNA can neither read nor write: the engine uses it to deflect venom and poison attacks aimed at .delgene. |
| 473 | .memval | Sense | The contents of a cell of the memory of the bot you are looking at; you choose the cell with .memloc. |
| 474 | .memloc | Command | Chooses which cell of the memory of the bot you are looking at gets copied into .memval. |
| 475 | .tmemval | Sense | The contents of one cell of the tied bot's memory; you choose the cell with .tmemloc. |
| 476 | .tmemloc | Command | Chooses which cell of the tied bot's memory gets copied into .tmemval. |
| 971-975 | Instant genetic memory (971-975) | Input and output | Five unnamed cells that the child receives copied from the parent at the moment of birth. |
| 976-990 | Deferred genetic memory (976-990) | Input and output | Fifteen unnamed cells that the child receives from the parent one per cycle, as long as it stays tied to it by the birth tie. |
This group brings together three things that have to do with the bot's memory beyond its own variables.
Spying on another's memory. Two pairs of sysvars let you read any cell of another bot's memory. With .memloc you choose the address and in .memval what the bot you are looking at holds shows up; with .tmemloc and .tmemval it is the same, but with the bot you are tied to. Both addresses (memloc and tmemloc) are configuration: you write them once and they stay.
The most common use in the Bestiary is recognizing members of your own species: if you point .memloc at .dnalen, .memval tells you the length of the other one's DNA, and you compare it with yours. That is what EyeBot by Moonfisher does, for example:
' Only once: spy on the DNA length of the bot I see
cond
*.memloc 0 =
start
.dnalen .memloc store
stop
' If what I see has the same DNA length as mine, cell 50 is 1
cond
*.eye5 0 >
*.memval *.dnalen =
start
1 50 store
stopIt is also useful for reading an ally's private variables (its cell 50, for example) or what the other one sees with its eyes.
Genetic memory. Cells 971 to 990 have no name, but the engine copies them from parent to child: 971–975 at birth, and 976–990 one per cycle while the child stays tied to its parent. Together with the .timer, they are the only part of the memory that is inherited; the full explanation is in Free and epigenetic memory.
Address 0. The DNA cannot reach it; the engine uses it as a dump for attacks aimed at .delgene. See Address 0.