Here's my (and Num thought of it too) brilliant idea
Swapping codules around as a form of horizontal gene transfer, keeping the root DNA but swaping around codules like bacteria swap plasmids. You could use this either to:
- Gain an entirely new piece of code from another bot (ie. a new antivirus code or a new trick that some other bots have evolved)
- Use a different piece of code for a task one of your codules was already doing, temporarily 'deactivating' or discarding your codule that the new one replaces
Also, a new way of exchanging DNA. Like in/out except putting whole codules in there 'on display'.
Two new sysvars:
.outdna
.indnaThese allow bots to display specified codules of DNA to other bots, and for other bots to save codules they want. This also gives them more choice about who they accept genes off (viruses don't: if you don't want it then tough - it's in your genome anyway). I like this idea. It's much 'safer' and less hassle than viruses
Just store the number of a codule into .outdna. If a bot wants it it will put the codule number that it wants to save to into .indna to save it to it's own genome
Here's a sample description of a bot that uses this method to trade codules:
1) Randomly display codules (not your root DNA) using your root DNA and store the codule number in .out1
*.codules rnd .outdna store
2) If you see a bot with more energy/kills/age than you then you might want to share some of their genetic success.
*.in1 .indna store
The new codule will overwrite the one you have in that codule slot and you can start using it immediately.
3) If you have a really cool codule that is completely new you might put 0 in .out1 and then recieving bots would save it into their next free space rather than overwriting an existing one