Code center > Suggestions

STOP THE DREADED JUNK DNA IN ITS TRACKS

<< < (3/8) > >>

Numsgil:

--- Quote ---Since it logically should not cost any energy for DNA that is not doing anything, junk DNA is then just dead weight. However if it isn't junk or if the supposed junk is in a condition step then it will be charged for anyway.
--- End quote ---
Perhaps it would be worth while to add a cost per base pair per cycle to the costs panel that defaults to 0.  That would give the same result as charging for reproing larger DNA strands without all the mess.

Botsareus:
No No , Py your bug is mood, look here.

1.) Before repoduction calculate if there is enough range to place a baby. Already works like that in PusherBots source code is attached to the board somewere. The math is pritty simple, its like a imaginary collision check.

2.) If there is not enough space then dont charge the bot anything. Make it return that there is not enough space to some memory location so the bot wont be confused if he is a blind dum$$ , but if he is a dum$$ then he probebly wont find that return value eather.

Botsareus:
X = bots(z).X - Cos((bots(z).ang - 120) / (180 / 3.14159265358979)) * 34
  Y = bots(z).Y - Sin((bots(z).ang - 120) / (180 / 3.14159265358979)) * 34
  If collision(X, Y) Then

Private Function collision(X As Single, Y As Single) As Boolean
collision = True
For z2 = 0 To UBound(bots)
 If Round(((bots(z2).X - X) ^ 2 + (bots(z2).Y - Y) ^ 2) ^ 0.5, 4) < 34 Then
 collision = False
 Exit For
 End If
Next
End Function

PurpleYouko:

--- Quote ---No No , Py your bug is mood, look here.
--- End quote ---

Call my bug a mood would you? That's fighting talk that is!
I don't care if you call my bug a quare or even a scroovy quare that things all time but a mood?

If you don't immediately apologize to my bug I will just have to set Hunter 3.3 on you.  :D

PurpleYouko:

--- Quote ---1.) Before repoduction calculate if there is enough range to place a baby. Already works like that in PusherBots source code is attached to the board somewere. The math is pritty simple, its like a imaginary collision check.
--- End quote ---
Been there. Tried that. No it isn't!

--- Quote ---2.) If there is not enough space then dont charge the bot anything. Make it return that there is not enough space to some memory location so the bot wont be confused if he is a blind dum$$ , but if he is a dum$$ then he probebly wont find that return value eather.
--- End quote ---
Agreed but it isn't that easy.

--- Code: ---X = bots(z).X - Cos((bots(z).ang - 120) / (180 / 3.14159265358979)) * 34
Y = bots(z).Y - Sin((bots(z).ang - 120) / (180 / 3.14159265358979)) * 34
If collision(X, Y) Then

Private Function collision(X As Single, Y As Single) As Boolean
collision = True
For z2 = 0 To UBound(bots)
If Round(((bots(z2).X - X) ^ 2 + (bots(z2).Y - Y) ^ 2) ^ 0.5, 4) < 34 Then
collision = False
Exit For
End If
Next
End Function
--- End code ---
This measures a single point for a collision with other bots. How is this going to tell me that the whole circle of space that I need is completely devoid of bot parts?

Yes it can be done but why bother. It is a pointless waste of programming time and just adds yet another complex and slow procedure to DarwinBots. We are trying to pare it down not make it bigger and more cumbersome.

Much better to just charge for the existing DNA on each cycle. I prefer to just charge for active genes but I don't mind if we add a system for charging for base pairs like Num suggests.
IMO the fact that a robot gives away a huge chunk of its own energy when it reproduces anyway, is plenty to charge it.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version