Bots and Simulations > DNA - General

What does Amplification mean?

<< < (3/3)

EricL:

--- Quote from: The_Duck ---if EricL publishes the current version of the code I'd be happy to play around with the Amplification and Translocation (the other disabled mutation: cuts out a section of DNA and reinserts it somewhere else) routines and try to get them working.
--- End quote ---
I posted the 2.43.1h source when I released that drop, so the most recent code is out there.  As Nums says, the mutation code is bascially the same as 2.43 although 2.43.1i contains some important fixes to insertion mutations.

I'd be happy to integrate any changes you make into the mainline or simply spend some time on this area.  There's no real reason I havn't played with mutations other than time and priorities.    The number of hours I spend per week on DB is limited.  What I work on is primarily a function of bugs, feature requests and my own interests.   If people want amplification mutations, I'd be happy to prioritize them higher in the work queue...

The_Duck:

--- Quote from: EricL ---
--- Quote from: The_Duck ---if EricL publishes the current version of the code I'd be happy to play around with the Amplification and Translocation (the other disabled mutation: cuts out a section of DNA and reinserts it somewhere else) routines and try to get them working.
--- End quote ---
I posted the 2.43.1h source when I released that drop, so the most recent code is out there.  As Nums says, the mutation code is bascially the same as 2.43 although 2.43.1i contains some important fixes to insertion mutations.

I'd be happy to integrate any changes you make into the mainline or simply spend some time on this area.  There's no real reason I havn't played with mutations other than time and priorities.    The number of hours I spend per week on DB is limited.  What I work on is primarily a function of bugs, feature requests and my own interests.   If people want amplification mutations, I'd be happy to prioritize them higher in the work queue...

--- End quote ---

I grabbed the 2.43.1h source and tested this Amplification code in it; it seems to work. It needs some new code in other places to allow the setting of mutation probabilities and stuff.


--- Code: ---Private Sub Amplification(robn As Integer)
  '1. pick a string of DNA, and insert a copy of it elsewhere in the DNA
 
  Dim t As Long
  Dim length As Long
  Dim startBp As Long
  Dim insertBp As Long
   
  With rob(robn)
 
  If .Mutables.Mean(AmplificationUP) < 1 Then .Mutables.Mean(AmplificationUP) = 1
  For t = 1 To .DnaLen - 1
    If Rnd < 1 / .Mutables.mutarray(AmplificationUP) Then
     
      length = Gauss(.Mutables.StdDev(AmplificationUP), .Mutables.Mean(AmplificationUP))
      If length < 1 Then length = 1
      If length > .DnaLen - 1 Then length = .DnaLen - 1
     
      startBp = Random(1, .DnaLen - length)   'start of sequence to copy
      insertBp = Random(1, .DnaLen - 1)       'insert copy after this base pair
     
      'don't insert in the middle of the DNA we are copying
      If insertBp >= startBp And insertBp < startBp + length Then insertBp = startBp + length - 1
     
      MakeSpace .DNA(), insertBp, length
      .DnaLen = .DnaLen + length
     
      'MakeSpace may have shifted the location of the string to copy
      If startBp > insertBp Then startBp = startBp + length
         
      Dim I As Integer
      For I = 1 To length
        .DNA(insertBp + I).tipo = .DNA(startBp + I - 1).tipo
        .DNA(insertBp + I).value = .DNA(startBp + I - 1).value
      Next I
         
      .Mutations = .Mutations + 1
      .LastMut = .LastMut + 1
      .LastMutDetail = "Amplification duplicated a string at position " + Str(startBp) + " of length " + Str(length) + _
                       " and inserted the copy at position " + Str(insertBp + 1) + " during cycle" + _
                       Str(SimOpts.TotRunCycle) + vbCrLf + .LastMutDetail
         
      End If
  Next t
  End With
End Sub

--- End code ---

Peksa:
I think amplification mutations would be great for the same reason they're in the nature, to allow vital genes to be duplicated and then mutated. With gene duplication bot's could evolve more conditional behaviour. For example there could be multiple genes that control shooting, some overriding others.

Navigation

[0] Message Index

[*] Previous page

Go to full version