Darwinbots Forum

Code center => Suggestions => Topic started by: Botsareus on August 10, 2005, 07:00:51 PM

Title: For PY
Post by: Botsareus on August 10, 2005, 07:00:51 PM
Py you sayed there was a way to insert new instructions , ex: "50 .repro store"
How is this:

Quote
    While pos <= endg
      If Random(1, prob) = 1 Then
        If MakeSpace(DNA, pos, 1) Then
          DNA(pos).tipo = 2
          DNA(pos).value = Random(1, 9)

          x = x + "Inserted instr," + Instrname(DNA(pos).value) + ", at pos " + CStr(pos) + vbCrLf
          InsertRandomInstr = InsertRandomInstr + 1
        End If
      End If
      pos = pos + 1

Inseting a whole new instruction 3 parts man , all it seems to be doing is inserting mathematical opperators. I am too lazy to write the correct code, I beat you are too, so I am just letting you know because you had me convised that it actualy worked for a while



Duplicate an instruction actualy works. But because it does not duplicate from one gene to another, SPLIT gene must work.

FIXED: SPLIT WORKS , just replace with this:

Quote
  'appears to be broken.  genenum never > 0 Too bad , fixed by BAU
  If Random(1, CountGenes(rob(n).DNA)) = 1 Then
    a = a + SplitRandomPos(rob(n).DNA, (rob(n).mutarray(5)) / SimOpts.MutCurrMult, x)
  End If

:P

B)BAU 2005
Title: For PY
Post by: PurpleYouko on August 11, 2005, 01:12:50 PM
Bots

That isn't the code that I wrote to do it.
You are right that it should and did insert 3 values as a block command structure.

At some point the code that I put into the program to do it must have been accidentally skipped over when the new version was released.

I hate it when this happens.  :angry:

Thanks for pointing it out anyway. I just assumed that as I had written the code and released it in one version (can't even remember which one) that it would still be there.
Title: For PY
Post by: Botsareus on August 11, 2005, 06:56:39 PM
Anyway I am evolving FirstBot right now witch evolved:

Quote
*.eye5 rnd  .shootval store

and

Quote
1  .trefup store
'witch probebly does nothing anyway

So I am getting what I was looking for one way or the other , no luck with .aimdx yet though...