Parasites and viruses
From the tie that latches on and sucks to the virus that rewrites someone else's DNA: three Bestiary bots dissected, with measured numbers, and a minimal recipe for contagion.
In A tie feeder you built a bot that ties its food and drains it. For that bot it was a hunting technique; the ones on this page turn parasitism into a way of life: they live stuck to another bot, or even live inside its DNA. You already know the mechanics (ties in Ties and multicellular bots, viruses in Viruses), so here we go straight to the Bestiary's designs and to what happens when you set them running.
When each strategy pays
A tie barely reaches: it only ties the bot you're looking at, and from close up, about 400 from edge to edge. Tying is the easy part; holding on is the very expensive one. The tie is born soft and stretches without holding back a prey that runs (we measured it stretched to 490 without breaking; it only snaps past 1000) and only at 19 cycles, if you haven't re-tied, does it stiffen and become an arm. So it works against slow or still prey: vegetables, bots stuck against a wall. And since sucking from a bot with poison poisons you instead of feeding you (A tie feeder), defenseless victims are the ones that pay best.
The virus is the opposite: it doesn't aim. It goes off in a random direction, flies far and infects the first one it touches, so it pays in populated worlds and with the prey far away. The other bot's slime makes it pay dearly: with about 20 units it stops any virus (Viruses). And it doesn't tell species apart: your own offspring can get infected.
| Tie parasite | Virus | |
|---|---|---|
| What you take from the other | Energy, and with sharing, also shell and slime | Control of its DNA |
| How long you wait | The tie stiffens at 19 cycles; only then do you share | The gene incubates 2 cycles per word |
| Fails against | Fast prey; slime deflects the tie | ~20 of slime; corpses |
Leechbot: sucking by sharing
Leechbot (Atutouato, 2013) is the tie parasite in its barest form. Its hunting gene ties whatever it sees, without asking what species it is; the dirty work is done by sharing:
' Tie to what I see, up to three ties
cond
*.eye5 40 >
*.numties 3 <
start
1 .tie store
stop
' Multicellular: keep 99% of everything
cond
*.multi 1 =
start
99 .sharenrg store
99 .shareslime store
99 .shareshell store
.sharewaste inc
stopThe 99 in .sharenrg isn't a transfusion: it's “add your energy to mine and leave me 99%”, every cycle, up to its body cap. It's a much more profitable suction than the tutorial's -1, which loses 30% along the way; here you only pay 1% of what's moved. It does the same to the tied bot's slime and shell.
Run against a walking target: tie on the first cycle, stiffening only at 53 (the hunting gene re-ties every time it sees the prey, and each re-tie restarts the clock) and from there the host drained at a thousand per cycle (from 3000 to 2000 and to 1000 on cycles 54 and 55, corpse at 60), with the parasite collecting 990. Then it had a child, and that's where the cost of not looking at who the tied bot is showed up: kid and parent ended up tied to each other, both ran the sucking gene, took 1000 per cycle from each other, and the parent ended up dry on cycle 67. The child, which had started with less, stopped at 548 when the other became a corpse.
The bot also has a gene that promises to suck 1000 per cycle with -1, and a “hacker” gene that would write a 0 into the tied bot's .up to stop it. Together the two do neither: the hacker overwrites .tieloc with the address of .up (the transfer asks for a negative .tieloc) and leaves .tienum reading a cell that nobody ever wrote, so the write into someone else's memory doesn't go out either. The host, meanwhile, never let up: it kept pushing flat out (its .vel read 40 the whole run) until it ended up pressed against the field wall, with the stretched tie holding it.
P1 Parasite bot: the remora
P1 Parasite bot (Fizban, 2004) is a tie parasite with manners. It picks its host: one that shoots (.refshoot above 0, so it doesn't waste time on vegetables), that isn't anchored, that doesn't know how to tie (.reftie, the tie signature) and that doesn't carry its family code, a 666 that it publishes in .out1 and checks in .in1:
' Only a host that shoots, isn't anchored, can't tie
' and doesn't carry my mark: tie it with port 666
cond
*999 0 =
*.numties 0 =
*.eye5 20 >
*.refshoot 0 >
*.reffixed 0 =
*.in1 666 !=
*.reftie 0 =
start
666 .tie store
0 .aimsx store
0 .up store
-1 999 store
stopAfter tying (the gene above only stops and cancels the turn), another gene that the page doesn't show sets its own tie angle to 0 with 0 .fixang: the host always stays in front of it and travels hanging on like a remora (in the run, the angle hovered around −17, a fraction of a turn). And once multicellular, it sucks in sips, depending on how full the other one is:
' Suck slowly while the host is full
cond
*999 3 =
*.refnrg 2500 >
start
666 .tienum store
-15 .tieval store
-1 .tieloc store
stopMeasured against a host with 3000: it takes 15 per cycle (collecting 10.5) and drops to 10 when the other falls below 2500. It doesn't kill it: it milks it. At 3050 it asks for a child… which never arrives, because birth needs free room in front, and in front there's always the host: in 120 cycles nobody was born. A parasite that doesn't kill its host also fails to multiply.
One detail of the tactic: it also writes things into the host: a 666 in its .tienum and a 628 in its .fixang, so that it keeps it well out in front. That order doesn't get anywhere: the host calls that tie by its own order number, not by the parasite's 666, and the instruction is left without a recipient. The pair still travels together thanks to the parasite's own 0 .fixang.
The original bot has a full state machine (a cell of its own, 999, says what to do: search, tie, settle in, suck, multiply). By the letter of the DNA, in a normal simulation the offspring is patient: one gene keeps it still as long as it has any tie and fewer than 75 cycles, and at 75 it declares itself ready; but the tying gene demands being without ties, so with the birth tie taking up its slot it can only take a host once that tie breaks by itself, at 100 cycles (this is read from the genes; we didn't measure it with real parents). In our test without parents it tied right away, and that's where the other assumption showed up: the offspring overwrites with its −2 the −1 that the tying left, the machine is left asleep and the offspring spends the run towing the host without sucking anything from it. The lesson holds for this whole chapter: these designs depend on assumptions (“if I have a tie it's because I was born”) that are worth rereading when the world changes.
The virus that takes over
The second path doesn't steal the other's energy: it steals its future. A virus inserts a gene into the victim's DNA and, from the next cycle on, that gene runs as if it were its own (Viruses); the DNA always accepts it, unless it's already at the limit of 32000 words. You've seen the epidemic recipe: package the gene with .thisgene so the infected one makes and shoots more copies (Viruses).
virusparttakeover (Spork/Shadowgod, 2014) is an Animal Minimalis with an extra gene that does exactly that, and incidentally trims the host's DNA:
' The takeover gene, exactly as it is in the bot
cond
start
*.genes *.thisgene *.genes sub sgn 1 add sub .delgene *51 1 sub abs mult store
1 51 store
0 51 *.repro sgn 0 floor mult store
.tie inc
*.thisgene .mkvirus store
.vshoot inc
stopThe first line deletes, with .delgene, the host's last gene that isn't the virus itself. The third should unlock the deletion for the next cycle… and it doesn't work: the stack ends up backwards and the command is written to address 0, which doesn't point to any cell. Measured result: one trimmed gene, just one, the first time the gene runs. In the maker itself, that trimmed gene is the reproduction one: the bot castrates itself on its first cycle and never has children again.
The rest does work, and very well. .tie inc ties whoever is nearby, and *.thisgene .mkvirus store with .vshoot inc turns it into a continuous factory: the gene is long (~35 words), so each copy incubates about 70 cycles, one virus every ~70, in a random direction. What we measured in a small field, with the gene alone (without the whole bot's hunting genes):
- At cycle ~75 the first victim receives the gene (one went in, one was trimmed: same number of genes, longer DNA) and starts making its own viruses.
- At ~155 the second victim gets infected, from the first one, not from the bot.
- At ~160 the bot itself catches a copy back: it has the gene twice.
- At ~215 the first victim receives a second copy: with its cell 51 already at 1, this one trims nothing, it only adds a gene.
Each infected bot pays for its own shots. The epidemic sustains itself.
The whole bot, exactly as it is in the Bestiary, keeps the Animal Minimalis hunting genes and eats its victims with shots before the virus reaches them: in two runs with three victims each, all six died without being infected. Still, the virus is the better-thought-out weapon: hunting feeds the current generation, while the inserted gene wins the war against the whole rival species, because every child of the victim is born infected.
A minimal sedative
To close, a recipe of our own that uses only the second of the two paths: a virus that neither kills nor drains, it just immobilizes. The injected gene writes 1 into .fixpos, and that's it: .fixpos is a switch that the engine never clears and that physics respects no matter where the gene landed in the other's DNA or what the host writes afterwards. Your own mark is what saves you: cell 91 is written before the sedative gene runs.
' Gene 1: mark myself (before gene 3 runs) and move forward
cond
start
1 91 store
10 .up store
stop
' Gene 2: make the virus out of gene 3 and shoot it
cond
*.vtimer 0 =
start
3 .mkvirus store
30 .vshoot store
stop
' Gene 3: the sedative: it only runs in whoever lacks the mark
cond
*91 0 =
start
1 .fixpos store
stopRun against a walking target, in a 300×200 field: at cycle ~15 a virus hit it; the target was stopped dead (speed 40 to 0, position frozen for the rest of the run) and its DNA went from 1 gene to 2. The maker kept moving: the mark works. And it kept shooting: since no infection leaves immunity, every copy that hits the same host adds a gene to it: by cycle 150 its DNA already carried seven copies of the sedative, eight genes in total. What the maker pays is the strength of each shot (here 30, which the cost multiplier doesn't touch), plus the usual cost of the copy and the shot (Viruses).
And now what do you do with the anchored prey? Whatever you like, calmly: move in and shoot it as in A bot that shoots, or tie to it and suck it dry like the feeder. Make it epidemic, adding *.thisgene .mkvirus store to the sedative gene? You can, but watch out: viruses don't tell species apart, so an infected relative makes viruses that can hit you. Every contagious weapon needs its mark, like cell 91 in this one.
What to try next
- Let go in time. Both the feeder and the tie parasite live better if they leave the host with an energy floor and look for another: the cutoff is in A tie feeder and the threshold is yours to set. P1 does something elegant like that with its sips.
- Delete genes on purpose. The takeover gene trims one by the mistake of a single line; a clean design chooses what to delete. The complete eraser, gene by gene until the other is left with no DNA, is built and measured in Viruses.
- The victims' counter. Slime stops ties and viruses (Defenses, Defensive bots). And there are real antiviruses: Animal Minimalis Antivirus (Shasta) records the number of each gene and, if an infection throws its DNA out of order, deletes the intruder. We tried it against the sedative: the gene got in (it left it anchored), the antivirus deleted it on the spot and its DNA went back to five genes… but what the gene had already written into
.fixposisn't undone: it stayed motionless to the end. And on top of that it ate my sedative with shots: the best defense is still attacking. - The tournament rules. If you compete, look at Disqualification: the stricter levels disqualify for making viruses, for sucking a rival's energy through a tie and for deleting genes. Your favorite parasite may be illegal without you noticing.