Bots and Simulations > DNA - General
A lazy turner(turning gene)
Numsgil:
Dunno then.
EricL:
It seems to do what I expect it to do. It reproduces on cycle 2 then turns away from it's offspring. The offspring creates a tie to it's parent on it's cycle 1 then turns away so they are back to back. None of the genes in either bot fire after that for obvious reasons.
What are you expecting it to do?
Note that the reason the parent turns away is different from the reason the offspring turns away.
The parent turns away because both .trefxpos and .refxpos are 0 (as are .trefypos and .refypos). Why are they both zero? Well, both trefxpos and refxpos come from the tied or viewed bot's own xpos. Since the offspring has a higher bot number than the parent, it has yet to execute a single cycle when the birth tie is formed or when the parent first sees it. Thus, it's xpos has yet to be populated and thus when the trefvars are copied for the bith tie or when the refvars are copied when the parent first sees the offspring, the parent's refxpos and trefxpos get 0 because the offsping's xpos is still 0.
The offsping turns away becuase when it sees the parent and creates the tie to the parent, trefxpos and refxpos get populated with real values, which equal.
Welwordion:
Well in my situation they tend to rotate(with the tie) around each other while their eyes stay in the same direction, so when they made a 180 degree rotation their eyes face each other, in this case they should see each other and turn away, but they do not.( oh and could someone answer my birthtie topic in bugs and fixes?)
Simplified they should turn away every time they see each other.
EricL:
--- Quote from: Welwordion ---Simplified they should turn away every time they see each other.
--- End quote ---
Ah. It's a bug. The trefvars only last a cycle. I made them sticky in the Tie routines, but they are being erased each cycle in EraseSenses() in another part of the code. Nice find. On the list for the next release.
Note that only the offspring will turn away. The parent will not since the trefvars are only autopopulated for the bot which initiated the tie.
Henk:
I thought .readtie was required to use the tref commands?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version