Darwinbots Forum

Code center => Darwinbots Program Source Code => Topic started by: Botsareus on April 12, 2005, 06:42:17 PM

Title: My virsion for 2.36.2 Get it now!!!
Post by: Botsareus on April 12, 2005, 06:42:17 PM
EDIT: SRY GUYS THIS ONE IS ALL BROKEN, I THINK I GOT IT RIGHT THIS TIME, READ THE LEST POST.
Title: My virsion for 2.36.2 Get it now!!!
Post by: Botsareus on April 12, 2005, 06:44:21 PM
I will be using this to evolve bots for F1 mode. Using F1 conditions and my evolution system stay tooned for FirstBot that owns Din.
Title: My virsion for 2.36.2 Get it now!!!
Post by: Numsgil on April 13, 2005, 12:31:07 AM
I'm trying to figure out exactly what you changed right now...
Title: My virsion for 2.36.2 Get it now!!!
Post by: Botsareus on April 13, 2005, 01:22:58 PM
Num, Use WinDiff :: C:\Program Files\Microsoft Visual Studio\Common\Tools\windiff.exe ,The best compare tool I ever seen.
Title: My virsion for 2.36.2 Get it now!!!
Post by: PurpleYouko on April 13, 2005, 02:01:53 PM
No such thing as Windiff in the visual studios folder on my PC. Did you download it somewhere?
Title: My virsion for 2.36.2 Get it now!!!
Post by: Botsareus on April 13, 2005, 04:04:39 PM
EDIT: PY DID YOU INSTALL YOUR VISUAL STUDIO CORRECTLY?
Title: My virsion for 2.36.2 Get it now!!!
Post by: PurpleYouko on April 13, 2005, 04:08:35 PM
I have 6.0 Enterprise edition. Y'know, the one that costs about $1500.00. It should have everything that others have I would think.

BTW, piracy or not, your zip file is coming through corrupted so I can't unzip it.

Thanks for trying though
Title: My virsion for 2.36.2 Get it now!!!
Post by: Botsareus on April 13, 2005, 04:20:13 PM
FIXING FIXING, FIXING FIXING....
Title: My virsion for 2.36.2 Get it now!!!
Post by: PurpleYouko on April 13, 2005, 04:55:38 PM
Quote
'random sysvar
          If Random(0, 1) = 1 Then

That is what it is already in all versions except for 2.36.3PY

I was halfway through adding a third option when I ran out of time so saved it to the FTP server as it was.
It might make a slight difference to new values added but shouldn't really. It will just add a slight bias to the decision between a number or a sysvar.
Title: My virsion for 2.36.2 Get it now!!!
Post by: Botsareus on April 13, 2005, 05:11:22 PM
here it is , this one is better:

EDIT: changed it again.

EDIT: If I will change it further I will update the virsion number: Virsion 2
So keep track of the virsion numbers guys.
Title: My virsion for 2.36.2 Get it now!!!
Post by: Numsgil on April 13, 2005, 05:17:11 PM
No Bots, I can find what you changes with windiff, but I need to know why you changed what you changed.
Title: My virsion for 2.36.2 Get it now!!!
Post by: Botsareus on April 13, 2005, 05:56:22 PM
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.
Title: My virsion for 2.36.2 Get it now!!!
Post by: Numsgil on April 13, 2005, 07:05:07 PM
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.
Title: My virsion for 2.36.2 Get it now!!!
Post by: Botsareus on April 13, 2005, 08:01:52 PM
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)
Title: My virsion for 2.36.2 Get it now!!!
Post by: Numsgil on April 13, 2005, 09:26:30 PM
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: [Select]
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

to:

Code: [Select]
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

That's change one.

In the mutate function, you changed
Code: [Select]
newvars (n)
a = a + vartovar(n, x, DNAfrom, DNAto)
at the beginning to:
Code: [Select]
'''newvars (n)
''''a = a + vartovar(n, x, DNAfrom, DNAto)
(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?
Title: My virsion for 2.36.2 Get it now!!!
Post by: PurpleYouko on April 14, 2005, 09:31:42 AM
HMM I see some major problems with both these changes.

In change one, the line
Code: [Select]
x = x + "Inserted label, *" + Str$(DNA(pos).value) + " , at pos " + CStr(pos) + vbCrLfis now inside two of the conditional sections of the procedure but missing from the new third option. That means that if the third form of the mutation takes place, there will be no message stored into the variable "X".
This variable is critical to several subsystems including DNA scripting and "Mutation details" in the robot information window.

In change two, vartovar and newvars are utterly, completely and absolutely disabled. What is the deal here?  :blink:
That means it will be impossible to mutate one variable to another or to ever introduce a new sysvar so a whole section of the mutation code is gone

You really have to watch what you are doing in the DNAops module. It is just so easy to screw up the whole program from in there.
Title: My virsion for 2.36.2 Get it now!!!
Post by: Botsareus on April 14, 2005, 11:59:16 AM
ok fixed the big circle bug, attempted on fixing run out of memory on unload bug , little luck with that one...

***

Sounds like I am going to have to stop sending my virsions of DB to you guys , you guys dont even consider what I change....

...If I evolve a good firstbot in my virsion I'll just say I am a geneos bot programer and I engenered the little guy myself , I see no reason why people wont beleave that one.

....Better, they will say no no "Endy really maid FirstBot evolved" and "Bots stole the source code from endy", ...
Title: My virsion for 2.36.2 Get it now!!!
Post by: Botsareus on April 14, 2005, 12:00:04 PM
(You do know that you only need one apostrophe, right?)
(You do know that you only need one apostrophe, right?)
(You do know that you only need one apostrophe, right?)
(You do know that you only need one apostrophe, right?)
(You do know that you only need one apostrophe, right?)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Title: My virsion for 2.36.2 Get it now!!!
Post by: Botsareus on April 14, 2005, 12:03:53 PM
Okay Bots, after sorting through pointless timer conditions (if any of those functions take longer than 10 seconds, there's a BIG problem.

I DID THAT BECAUSE ON HIGH MUTATION RATES( set 1 to all adding rates) THE PROGRAM WAS TAKING TOO lONG, A LITTLE 'ON ERROR RESUME NEXT' WILL FIX IT UP NO PROBLEM, BUT ATLEAST YOU DONT HAVE A HANGED PROGRAM.

DON'T BOTHER NUM IT WILL NEVER MAKE sense TO YOU....
Title: My virsion for 2.36.2 Get it now!!!
Post by: Botsareus on April 14, 2005, 12:07:03 PM
You really have to watch what you are doing in the DNAops module. It is just so easy to screw up the whole program from in there.


Works fine for now.....
Title: My virsion for 2.36.2 Get it now!!!
Post by: PurpleYouko on April 14, 2005, 01:16:01 PM
Quote
Works fine for now.....

Didn't say it wouldn't work to some dgree.

To be specific about what does not work in your code..

"Change variable with variable" in the mutations window does not work now  You commented out the line
Code: [Select]
a = a + vartovar(n, x, DNAfrom, DNAto) which activates the "vartovar" procedure.


"Introduce a new variable" does not work now because you commented out the line
Code: [Select]
Newvars(n) which activates it.

If you can produce a better mutation this way then be my guest. The rest of us prefer code that actually does something.
Title: My virsion for 2.36.2 Get it now!!!
Post by: Numsgil on April 14, 2005, 05:51:13 PM
Bots, I know what you were trying to do with your timer code, but the mutations module is NOT what's slowing the program down.  The senses module is where alot of slowdown occurs.  As is the collisions routine.  If you want to speed up the program you need to get yourself a profiler.

The way your timer code was written it would exit the code if it had spent 10 seconds in any single runthrough of that function.  NONE of those functions had better take even a single second.

I understand sort-of what you're trying to do with your first change,  but I don't understand what you're accomplishing that PY's sliders can't.

And interestingly enough you didn't even touch the function that the rate of change of mutations goes to.  Isn't that what your main complaint was against?

If you'd really like to join the programming team, you need to sort of outline what you want to work on so we don't step on each other's toes, so to speak.  PY and I communicate fairly regularly about what we're working on.