Bots and Simulations > DNA - General
How Long To Wait For Children to...
Welwordion:
I just do not get it, first I tried to pass on a location did not work, then I tried to inc 971 in each generation
but it stay 1 regardless of generation, just how is this supposed to work?
Numsgil:
Let me go hunting through the code to see what I can come up with.
Okay.
PY apparently decided to stash this neat little feature inside the function that handles tie forces (specifically making ties longer and shorter - tielen).
The function was overhauled as part of the physics in 2,4, and so the feature was inadvertantly lost.
It will need to be reimplemented in 2.4 (and please don't stick it in with TieHooke )
PurpleYouko:
--- Quote ---PY apparently decided to stash this neat little feature inside the function that handles tie forces (specifically making ties longer and shorter - tielen).
--- End quote ---
I did??
Why would I do that I wonder?
Is it in the section of the routine where the birth ties are handled? let me go check a minute.
Yup. It's in "Linklen" in the physics module. Right in the section where birth ties have always been handled.
Here's the code (from 2.37.6) if anyone wants it.
--- Code: --- If Abs(rob(t).Ties(j).last) > 1 Then
rob(t).Ties(j).last = rob(t).Ties(j).last - Sgn(rob(t).Ties(j).last)
If rob(t).Ties(j).last > 47 And rob(t).Ties(j).last < 68 Then 'should copy the memory locations 971 to 990 from parent to child. One per cycle.
If rob(t).mem(1038 - rob(t).Ties(j).last) = 0 And rob(rob(t).Ties(j).pnt).mem(1038 - rob(t).Ties(j).last) <> 0 Then
rob(t).mem(1038 - rob(t).Ties(j).last) = rob(rob(t).Ties(j).pnt).mem(1038 - rob(t).Ties(j).last)
End If
End If
End If
--- End code ---
Seems like about the only place in the code where it would work properly, especially since all the birth ties have always been handled in this routine. can't believe it took us all so long to figure out where it was located.
Stifftie is in this routine too
EricL:
2.42.3 will have this functionality added. I need to ask couple of newbie questions to make sure what I do matches expected behaviour.
Q) How long should birth ties last by default? The code in 2.4 says 100 cycles. Is this right? I thought I read on the wiki somewhere that birthties should last 20 cycles.
Q) When should locations 971 to 990 should be copied from parent to child? Over the first 20 cycles of the child's life? Over some other 20 cycle period? All at once? The code above seems to indicate that this should occur over the period when the child is between age 33 and 52 cycles.
Nevermind. I just read the rest of the thread.
PurpleYouko:
--- Quote from: EricL ---2.42.3 will have this functionality added. I need to ask couple of newbie questions to make sure what I do matches expected behaviour.
Q) How long should birth ties last by default? The code in 2.4 says 100 cycles. Is this right? I thought I read on the wiki somewhere that birthties should last 20 cycles.
Q) When should locations 971 to 990 should be copied from parent to child? Over the first 20 cycles of the child's life? Over some other 20 cycle period? All at once? The code above seems to indicate that this should occur over the period when the child is between age 33 and 52 cycles.
--- End quote ---
The ties(j).last value starts out at 100 and is reduced by one point per cycle until it reaches zero.
That part of the program is intrinsic to birth ties and has always been in Darwinbots in exactly the same form. Birth ties last 100 cycles, then disappear. Normal ties harden after 20 cycles.
The memory transfer in the code I gave above, starts with ties(j).last at a value of 68. (Can't think why I used that value ) and continues till it is 40. This represents 32 and 52 cycles after birth respectively.
I see no reson that this couldn't be made to work at cycles 1 till 20. Just substitute 99 and 79 as the "last" values.
Even better, allow this 20 cycle window to be user definable, starting at cycle 1 (last=99) to cycle 80 (last =19)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version