Code center > Darwinbots Program Source Code

My virsion for 2.36.2 Get it now!!!

<< < (3/5) > >>

Numsgil:
No Bots, I can find what you changes with windiff, but I need to know why you changed what you changed.

Botsareus:
Num , you have to select the new file , then the old file, then you have to double click on the read text to expand it.

Numsgil:
No, Bots, I don't mean WHAT did you change.  I mean WHY did you change it.  Your changes don't seem to me to make any difference.

Botsareus:
Yes Num, the changes seam minor but they will pay off in the long run, at least I will change them until they do. But I will never brake the golden rule: The Mutations will remain purly random, (heh, I dont even know how to brake the golden rule) Stay tooned guys...

Basicaly I toled the program that the chance to insert a sysvar is more then the chance to insert a completly random value


(I am also working on some overflow errors , problem is if I fix them I will have to post the source code on my website because the whole DB source is more then 100kb and PY is having trouble with zip files witch I think is forum related)

Numsgil:
If you're going to be going into the overflows I'd get 2.36.1 and compare the DNAOps from the two.  I'm pretty sure the problem is somewhere in there.

Okay Bots, after sorting through pointless timer conditions (if any of those functions take longer than 10 seconds, there's a BIG problem.  You'd better not just ignore it) I am left with this:

DNAInsertRandomValue Function:

You changed:

--- Code: ---r = Random(0, 1)
DNA(pos).tipo = r
If r = 0 Then
  DNA(pos).value = Gauss(-10000, 10000)
   x = x + "Inserted value, " + Str$(DNA(pos).value) + " , at pos " + CStr(pos) + vbCrLf
Else
  DNA(pos).value = Random(1, 1000)
  x = x + "Inserted label, *" + Str$(DNA(pos).value) + " , at pos " + CStr(pos) + vbCrLf
End If
--- End code ---

to:


--- Code: ---r = Random(0, 2)
DNA(pos).tipo = r
If r = 0 Then
  DNA(pos).value = Gauss(-10000, 10000)
  x = x + "Inserted value, " + Str$(DNA(pos).value) + " , at pos " + CStr(pos) + vbCrLf
ElseIf r = 1 Then
  If Random(0, 2) = 1 Then
    Do
      Dim t2 As Integer
      t2 = Random(0, 200)
    Loop Until (sysvar(t2).Name <> "")
    DNA(pos).value = sysvar(t2).value
  Else
    DNA(pos).value = Random(1, 1000)
  End If
  x = x + "Inserted label, *" + Str$(DNA(pos).value) + " , at pos " + CStr(pos) + vbCrLf
ElseIf r = 2 Then
  DNA(pos).tipo = 0
  'random sysvar
  Do
    t2 = Random(0, 200)
  Loop Until (sysvar(t2).Name <> "")
  DNA(pos).value = sysvar(t2).value
End If
--- End code ---

That's change one.

In the mutate function, you changed

--- Code: ---newvars (n)
a = a + vartovar(n, x, DNAfrom, DNAto)
--- End code ---
at the beginning to:

--- Code: ---'''newvars (n)
''''a = a + vartovar(n, x, DNAfrom, DNAto)
--- End code ---
(You do know that you only need one apostrophe, right?)

That's change two.  Why are we commenting out these lines?

And that's it!

So, what's up with change one and change two?  What were you trying to accomplish with each?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version