Author Topic: Let's make a stable platform  (Read 39425 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Let's make a stable platform
« Reply #90 on: October 27, 2005, 10:27:48 AM »
While we're at it, a quick blurb of what all the source code files do in 2.37.4 m,ight be nice.

Like:

Physics - Handles all the physics routines such as tie forces and collisions.

Offline Ulciscor

  • Moderator
  • Bot Destroyer
  • *****
  • Posts: 401
    • View Profile
Let's make a stable platform
« Reply #91 on: October 27, 2005, 10:35:07 AM »
Would it be a major hassle to change some of the variable names to things that are more meaningful?

.tipo confuses me oh so much
:D Ulciscor :D

I used to be indecisive, but now I'm not so sure.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Let's make a stable platform
« Reply #92 on: October 27, 2005, 10:37:00 AM »
I've actually done that alot in the last few months, as has PY.

Alot of things were/are in Italian because Carlo is Italian.

Check out 2.4's source to see what names have been moved around.  Alot of things are rewritten with new names.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Let's make a stable platform
« Reply #93 on: October 27, 2005, 10:45:26 AM »
But then the comments are only where they're created, not where they're used.

I've always been a fan of longer, more descriptive variable names for more seldom used variables and short but concise and descriptive names for oft used variables.

x23 would be a bad variable name

counter is good if it's incremented in a counter like fashion.

CounterForTheSecondForLoop is probably too descriptive.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Let's make a stable platform
« Reply #94 on: October 27, 2005, 10:52:24 AM »
I think he decided to plop them down in the same routine that's bugging out, so to speak.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Let's make a stable platform
« Reply #95 on: October 27, 2005, 10:52:32 AM »
Quote
I still don't know where to go to make that change you suggested!!!!

It's in the place where the original error occured.

The nextElement function in the Mutations module.

here it is again.

Code: [Select]
Public Function NextElement(ByRef DNA() As block, beginning As Integer, tipo As Integer, value As Integer) As Integer
  'takes the input for the first value in a gene and returns the position of the next statement
  'as defined by tipo and value
  Dim k As Integer
  Dim uboundarray As Long
  
  uboundarray = UBound(DNA())
  If DNA(uboundarray).tipo <> 4 And DNA(uboundarray).value <> 4 Then
    ReDim Preserve DNA(uboundarray + 1)
    DNA(uboundarray + 1).tipo = 4
    DNA(uboundarray + 1).value = 4
  End If
  k = beginning
  
  If beginning > 0 And beginning < uboundarray Then  'change this line.
    While Not (DNA(k).tipo = 4 And DNA(k).value = 4) And Not (DNA(k).tipo = tipo And DNA(k).value = value)
      k = k + 1
    Wend
    If Not (DNA(k).tipo = tipo And DNA(k).value = value) Then k = -1
  Else 'beginning wasn't valid
    k = -1
  End If
  
  NextElement = k
End Function
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Let's make a stable platform
« Reply #96 on: October 27, 2005, 11:03:46 AM »
I'm now up to 105,000 cycles with this sim and only one crash so far.

Now my veggies have started mutating. I'm sure they shouldn't be doing that.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Let's make a stable platform
« Reply #97 on: October 27, 2005, 11:35:07 AM »
Griz.

FYI

The bug that I was working on here was reported by Testlund earlier in this thread.

here is a link to his original post.

http://forum.darwinbots.com/index.php?show...dpost&p=1121272
« Last Edit: October 27, 2005, 11:35:28 AM by PurpleYouko »
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Let's make a stable platform
« Reply #98 on: October 27, 2005, 11:54:25 AM »
Yup I know what you mean and that is why we now have a somewhat official channel for reporting the bugs.  :)
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Let's make a stable platform
« Reply #99 on: October 27, 2005, 11:54:34 AM »
Actually I can't take any credit ;)

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Let's make a stable platform
« Reply #100 on: October 27, 2005, 11:57:55 AM »
That would be set up by PY and moderated by Ulc.  :D
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Ulciscor

  • Moderator
  • Bot Destroyer
  • *****
  • Posts: 401
    • View Profile
Let's make a stable platform
« Reply #101 on: October 27, 2005, 12:19:20 PM »
o-m-g

 :Robot1:
:D Ulciscor :D

I used to be indecisive, but now I'm not so sure.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Let's make a stable platform
« Reply #102 on: October 27, 2005, 12:32:04 PM »
:cuss:  here Ulc. use this one. Much more expressive.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Let's make a stable platform
« Reply #103 on: October 27, 2005, 05:47:38 PM »
Just out of curiosity, did the waste/venom theft from vegs bug get fixed?(vegs
gaining pwaste from theft of non-existing waste)

Code: [Select]
cond
start
.tie inc
1 .tienum store
-4 .tieloc store
-1000 .tieval store
stop
end

I haven't been around the net lately to download the more stable vers, or been way too tired to do much of anything(got home at 2:30 pm and slept till 8:30). I'm guessing this is just a logic error since people don't normally think anyone would do such a thing. B)

I think Nums did some work on this, I can at least see the pwaste now in 2.4, but the vegs are now exploding shortly after. The venom side seems fixed in 2.4 at least.

Umm...where's the main bug reporting location? Are you talking about the wiki?
« Last Edit: October 27, 2005, 05:52:13 PM by Endy »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Let's make a stable platform
« Reply #104 on: October 27, 2005, 07:18:21 PM »
I haven't done any work in the VB stuff with venom/waste/etc. for quite a while.

Int eh C++ source, it's all getting squared away as I go.