Code center > Suggestions

For PY

(1/1)

Botsareus:
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
--- End quote ---

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
--- End quote ---

:P

B)BAU 2005

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

Botsareus:
Anyway I am evolving FirstBot right now witch evolved:


--- Quote ---*.eye5 rnd  .shootval store
--- End quote ---

and


--- Quote ---1  .trefup store
'witch probebly does nothing anyway
--- End quote ---

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

Navigation

[0] Message Index

Go to full version