266
« on: January 06, 2007, 10:21:51 PM »
Mmh, trying to think about a more DNA like coding. Sorry if it's too complex / too long. Maybe you can scrap something useful from all the junk.
Mutated condition and command aminoacids could be generated on the fly from patterns, like:
*### ### >
*### ### = or *### ### !=
### ### store
-# # store
These aminoacids use a number as a nexus point. For example:
@10 *.nrg 3000 >
@10 50 .repro store
Would attach one to another and form the gene 10.
Each aminoacid will store across generations the amount of cicles it has survived without mutations, (it's strongness). Small mutations may decrease this amount, based on the aminoacid lenght. New AAs will make weak genes.
Genes would be duplicated if they must activate several AAs at the same time:
@10 *.nrg 3000 > and *.robage 500 >
@10 50 .repro store
@11 *.nrg 3000 > and *.robage 500 >
@11 314 .aimdx store
Code viewer may hide the duplicated condition for readability. Though this isn't so neat, it lets evolution be more creative about complex behaviours. Maybe that bot will split gene @11 from the *.nrg 3000 > 'event' and use it as a veg spotting gene.
When a bot reproduces asexually, it reads its own DNA and copies each AA. A new DNA will build up from the resulting 'soup' of aminoacids. Small mutations of the same type may happen then, like changing 'and' for 'not', 3000 for 2493, '>' for '<', etc. Medium mutations may add or remove a whole condition.
If the nexus of an aminoacid (the gene number) is mutated and it doesn't match any other present AA, at the end of the reproduction it will be either:
1) cut off
2) filled with a new one from pattern
If two AAs 'compete' for the same spot, then their age is applied. A new mutation will have little chances to pass over a strong gene that has guaranteed survival during lots of generations.
Sexual reproduction will mean they will create one single soup of AAs from both DNA's. This means genes from parents will 'compete' to create the child:
Parent 1:
@10 *.nrg 3000 > (100000 cycles)
@10 50 .repro store (25000 cycles)
Parent 2:
@10 *.nrg 1000 > (80000 cycles)
@10 45 .repro store (500 cycles)
Both conditions and both commands will fight for the spot, matching their respective strongness or weakness. There's always a chance that a very weak aminoacid will pass over a strong one.
'stop' and 'start' conditions would isolate parts of the code that shouldn't be executed unless they are called to make RNA. They won't execute any command.
RNA would be made by reproducing only a certain range of genes. It may be stored in a new membrane or used as temporary code. It will block the real genes if it has got the same numbers. This one would create a fat cell that would stay idle most of the time, wasting almost no energy, maybe until a conspec comes and stores or takes some energy from it:
@12 stop
@12 ...
@13 *.nrg 3000 >
@13 10 .strbody store
@14 *.nrg 2000 <
@14 10 .fdbody store
@15 start
@15 ...
@16 ...
@16 13 14 rnacell
Or maybe the RNA can be thrown away. Then as some other bot picks it, it may be executed until it becomes waste. Perhaps it is a virus, or a toxin protein, or a happiness/fear/sexual signal.
Here's a venom/toxin that will be run only when it's loaded as RNA (active RNA will ignore stops and starts):
@14 *.refeye *.myeye !=
@14 16 17 rnashot
@15 null
@15 stop
@16 *.myeyes 5 != and *.body 100 >
@16 100 .fdbody store
@17 *.myeyes 5 !=
@17 -2 .shoot store
@18 null
@18 start
@19 ...
@19 ...
A RNA virus would be a protein that replaces 'legitimate' ones, forcing the code to make copies of it without actually damaging its execution. Or maybe just a self copying protein that forces its own execution without caring about which genes it blocks. And maybe it can get mixed during reproduction...
Also, instead of using magic -1 shots to digest targets, bots maybe should use a digest protein that forces the target to shoot energy.