Hi Everyone!
This thread is continued from a thread in the DB3 forum. If you are unfamiliar with the discussion, you can see it [a href=\'index.php?showtopic=2908\']here![/a]
Basically, the problem is that whenever someone tries to run a DB evosim, the bots end up "evolving" until they are filled with random crud and are unable to eat, because necessary genes have been overwritten. Eric first noticed that real-life evolution almost never modifies necessary metabolic pathways, even though these genes make up the bulk of our genome. Instead, less necessary genes, such as those controlling the number of fingers, are mutated much more often. So, something must be protecting those necessary genes from mutation, and the reason that evolution rarely works in DB is probably because it lacks this feature.
So, I'll try to see which algorithm is most popular, and then maybe we should implement that one first.
So far, there are four options: (I'm trying to make it objective, but some of my bias may show through. Let me know if I forgot a pro/con)
Number 1: Make metadata (Mutation-Rate data) instructions that attach to the DNA but are not DNA instructions, like [x10] ... [/x10]
Pros:
The mutation rate data is "glued" to it's assigned exon.
Evolution cannot delete/move a codule
Mutation protection cannot be overwritten if used more than once, since the mutation protection is Metadata.
Cons:
Fragile (it's more than one instruction long, so evolution and new coders could break it more easily)
Evolution cannot delete/move a codule
Number 2: Make a new instruction, such as x .protect25 store, to protect the next x bases by giving them a mutation rate of 25%.
Pros:
Easy for new coders and evolution to use.
Robust, since it can be put anywhere in a genome, or have x changed, etc..., and it will still function.
Easy to add to the next version of DB, since less work is required.
Evolution can delete/move it, since it is DNA.
Cons:
The mutation rate data is not "glued" to it's assigned exon.
Evolution can delete/move it, since it is DNA.
Mutation protection may be overwritten if used more than once, since the mutation protection is not Metadata.
Number 3: Make mutation immunity have a cost. If a bot is unable to pay the cost, immunity is lost. Immunity also degrades over time. Basically it would work like this:
Step 1-make enzyme. This will act the same way as slime does, decaying over time, more enzyme provides more protection eg reduce chance of mutatoins
Step 2-use X .protect store; if X is negative, it will protect X bps before the command, if positive, the next X bps after the command. The bigger the size of code protected, the faster enzymes wear off.
Note that Bacillus later changed Step 2 to tagging with metadata, which allows multiple protects in one cycle (not sure about logic though), and the distribution of substances.
Pros:
Time- and cost-dependent
Easy for new coders and evolution to use.
Robust, since it can be put anywhere in a genome, or have x changed, etc..., and it will still function.
Easy to add to the next version of DB, since less work is required.
Evolution can delete/move it, since it is DNA.
Cons:
Mutation protection may be overwritten if used more than once, since the mutation protection is not Metadata.
The mutation rate data is not "glued" to it's assigned exon.
Evolution can delete/move it, since it is DNA.
Number 4: Make a hybrid algorithm that combines the best features of different ideas. For example, a mutation control instruction that IS glued to it's assigned exon and applies the mutation rate it encodes to itself.
These Pros and Cons will look at an implementation of the MPPI instruction.
Pros:
Easy for new coders and evolution to use.
Robust, since it can be put anywhere in a genome, or have x changed, etc..., and it will still function.
Easy to add to the next version of DB, since less work is required than idea 1, but there's more than 2.
Evolution can delete/move it or not, it's up to the coder. Put x .protect0 store to make itself and the following x lines of code unchangeable.
The mutation rate data is "glued" to it's assigned exon.
Cons:
Mutation protection may be overwritten if used more than once, since the mutation protection is not Metadata.
Number 5: Bacillus' Idea: A hybrid of 1 and 3, where mutation immunity for an exon is governed by metadata attached to the DNA (as a codule), but can be lost if the bot is not able to pay the immunity costs and/or if the bot gets too old.
Pros:
The mutation rate data is "glued" to it's assigned exon.
Evolution cannot delete/move a codule
Mutation protection cannot be overwritten if used more than once, since the mutation protection is Metadata.
Cons:
Fragile (it's more than one instruction long, so evolution and new coders could break it more easily)
Evolution cannot delete/move a codule
Number 6: Ikkes' DNA comparison Idea: Make one or more copies of the genome, and if one copy is mutated, replace the mutated code with the equivalent code from another copy. Checking for mutation is done by comparing the genomes' DNA line-by-line.
EDITED!
Pros:
Allows evolution to make the genes from the two copies interact to create a novel outcome.
The required instructions could be used for other uses by evolution, since they are general-purpose.
Because the instructions are more flexible, a bot could have conditional mutation protection.
Cons:
If damage needs to be repaired, then it may slow down the sim if twice the amount of DNA is executed each cycle, since there will need to be a copy of the bots' genome.
Number 7: Ikkes' Hash comparison Idea: Make one or more copies of the genome, and if one copy is mutated, replace the mutated code with the equivalent code from another copy. Checking for mutation is done by comparing the genomes' Hashes.
EDITED!
Pros:
Allows evolution to make the genes from the two copies interact to create a novel outcome.
The required instructions could be used for other uses by evolution, since they are general-purpose.
Because the instructions are more flexible, a bot could have conditional mutation protection.
Cons:
If damage needs to be repaired, then it may slow down the sim if twice the amount of DNA is executed each cycle, since there will need to be a copy of the bots' genome.
Thanks for voting!
Note: I moved the hybrid option back up because someone voted for it, but after I added the other ideas it was moved down and Bacillus' second idea got the vote.