Code center > Suggestions

Mutation Protection method- in voting

(1/11) > >>

jknilinux:
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.

bacillus:
In reply to 3.), it simple represents an effective 'mutation-immunity' system becoming ineffective over time, and needing refreshing. The major issue (note that this is not the only suggestion that has this issue) is that it relies on the data being stored in a memory location; multiple attempts at protecting DNA will override previous attempts, therefore the way to go will eventually be in the form of metadata. Based on that, I'd change my suggestion to combine the metatag suggestion with the protective enzyme protection system, which also gives a way to control the costs of protecting DNA. (in nrg per unit produced, evenly distributed within the tags, or perhaps allocated by a variable)
EDIT=>Don't forget that most people invloved in this discussion put forward an idea themselves, so I'd be surprised if there is a clear winner

jknilinux:

--- Quote from: bacillus ---In reply to 3.), it simple represents an effective 'mutation-immunity' system becoming ineffective over time, and needing refreshing. The major issue (note that this is not the only suggestion that has this issue) is that it relies on the data being stored in a memory location; multiple attempts at protecting DNA will override previous attempts, therefore the way to go will eventually be in the form of metadata. Based on that, I'd change my suggestion to combine the metatag suggestion with the protective enzyme protection system, which also gives a way to control the costs of protecting DNA. (in nrg per unit produced, evenly distributed within the tags, or perhaps allocated by a variable)
EDIT=>Don't forget that most people invloved in this discussion put forward an idea themselves, so I'd be surprised if there is a clear winner
--- End quote ---

Could you explain how trying to protect the DNA more than once would cause the Mutation protection instructions to be overwritten? Also, how would you combine enzymatic protection with metadata?

EDIT=> There probably won't be overwhelming support for one of the suggestions, but if there is a significant majority then we'd have to go with that. I'll also add ideas to the poll as they come up.

I'll need to leave your original suggestion on the poll, since some people have already voted in favor of it.

NUMSGIL, ERICL & IKKE: Did I summarize your ideas so they reflect your original opinions? Let me know!

ikke:
Actually I gave two different suggestions, both located within the gene and based on some compare function
1) compare different copies of the same gene (not necessarily two)
2) compare an actual hash value of a section of the genome with the stored one (stored in the genome)

Additionally I suggested some repair/ kill function to follow the compare function. This might not be needed though: genes can already be deleted, so one programming option would be to delete the reproductive gene if a mutation has been detected.

A simple form of mutation protection would be something like:
if  gene1 !=gene2 delgene reproduce
or
if hash (gene1)!=1234 delgene reproduce

combined:
if hash(gene1) != hash(gene2).....

BTW: some bots already have a level of mutation protection by means of attacking mutants.

The main things I want to get out of this are the following:
1) mutation protection is located within the genome
2) mutation protection is done by combining generic instructions which also have other possible applications, for instance virus protection, conspec. Preferrably also functions only evolution thinks of. I like to be surprised
I think properly implemented mutation protection should expand bot genomes, not limit them. Therefor evolution should be able to break it, or reuse it in some other way.

jknilinux:
Ikke- Does it adequately present your viewpoint now?

Also, how difficult do you think your idea would be to implement? It might be difficult for me, since I'm not in CS, but maybe there's an easy way to do it that I'm not seeing.

Navigation

[0] Message Index

[#] Next page

Go to full version