Code center > Bug reports

body and mass

<< < (5/7) > >>

Elite:
Ah. That would explain it then

EricL:

--- Quote from: Numsgil ---Eric did indeed change it, perhaps on accident (probably on accident since the comments aren't changed).
--- End quote ---
Unintentional on my part.  My apologies.  Will be changed back in 2.42.8.

Testlund:
Ok, that was weird. I never thought it was a bug. I just thought it was the way the bots decided to evolve. I'm thinking the genes are just set to send very little energy to offspring when they reproduce, and I'm running with 'per kilobody point' setting so tiny bots wont get any energy, or at least very little. I've been waiting for some bot to evolve to give 50% of it's energy to offspring, like the '50 .repro store' gene, but I haven't seen it yet in my sim. Instead I have a bot with these genes that reproduce tiny bots:

 =
 dup and
 14 >
 rnd sqr xor
 *.dn and
 rnd *.sx << or
 inc
 0 mult * *.dx 2 or
 rnd and
 mult pyth not
 rnd *.dn - and
 or
 =
 store
 | dist and
 rnd *.sx | and
 >
 else
 << ++ dist angle rnd *.sx | 1 2 cond
 xor
 dist xor
 sqr *.sx ~ and
 inc
 start
 else
 cond
 xor
 1 and
 rnd *.sx | and
 inc
 cond
 mult else
 cond
 ~ dist pyth rnd *.sx mult 1 >
 cond
 xor
 dist and
 rnd *-1 | <
 inc
 3 else
 cond
 or
 dist and
 rnd *.sx | and
 store
 else
 else
 cond
 xor
 dist not
 rnd *.sx and
 dec
 inc
 else
 start
 cond
 xor
 dist and
 div *.sx | and
 inc
 else
 cond
 xor
 start
 .up inc
 *.sx | 9 *.dn cond
 xor
 dist and
 cond
 *.sx -- and
 inc
 else
 else
 cond
 or
 dist and
 5 *.sx and
 not
 inc
 else
 cond
 stop

''''''''''''''''''''''''Gene  13: Last 'stop' at position  158''''''''''''''''''''''',

 xor


And evolved genes look like a mess and I have now idea why this one multiplies on occasion. But of course all of you may not be running evosims so if you have a bot with a '50 .repro store' gene that produces tiny bots it must be a bug I guess. So I'm looking forward to see how the next drop will look like.

Testlund:

--- Quote from: Numsgil ---Eric did indeed change it, perhaps on accident (probably on accident since the comments aren't changed).

new code:

SNIP...
If (rob(n).body + partial * 0.019) > 32000 Then
' EnergyAddedPerCycle = EnergyAddedPerCycle + (32000 - rob(n).body) * 10
rob(n).nrg = 32000
Else
rob(n).nrg = rob(n).nrg + partial * 0.019 'a bit goes to body
' EnergyAddedPerCycle = EnergyAddedPerCycle + partial * 0.19 '(0.019 * 10)
End If
...snip

and here's the old one.

SNIP...
 rob(n).nrg = rob(n).nrg + partial * 0.8 'most of energy goes to nrg
rob(n).BODY = rob(n).BODY + (partial * 0.019) 'a bit goes to body
rob(n).Waste = rob(n).Waste + partial * 0.01 'tiny amount goes to waste
If rob(n).nrg > 32000 Then rob(n).nrg = 32000
If rob(n).BODY > 32000 Then rob(n).BODY = 32000
Shots(t).Exist = False
rob(n).radius = FindRadius(rob(n).BODY)
End Sub
' robot takes a venomous shot and becomes seriously messed up
Private Sub takeven(n As Integer, t As Integer)
Dim power As Long
...SNIP
--- End quote ---

Could someone please fix this little line of code so I can start running DB again? I whould do it myself but as I've explained in earlier posts I had troubles installing VB and can't get inside the source code.  

Numsgil:
I'll see if I can get around to it.  Remind me in a day or so if I forget.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version