Bots and Simulations > DNA - General
Tie question (2.4A)
PurpleYouko:
numties gets its value in line 115 of the "ties" module. Right after the ties are parsed to see if they point to anything.
This is one of the first things that happens in the main cycle, second only to calling "Tieportscom". A robot should be able to see a value in *.numties on the cycle N+1 and in fact I'm almost certan that they do..
Values in *.readtie are going to take a little longer though because tat will have to wait until the robots on both ends of the tie have been parsed individually.
There has always been a slight issue with the order in which ties are parsed. They are obviously sorted out by robot number so that older bots with lower numbers are parsed first. This has some effect on information transfer along ties and is the reason that the second entire loop "Tieportscom" was added and all direct tie comunications were moved to there. It still isn't perfect though.
Imagine two enemy tie feeders both start to feed on each other in the same cycle.
They are both equal in size and strength but one is older than the other. The older one gets to feed first so by the time the other one gets to feed, he is at a disadvantage due to the loss of his energy.
Ties are a nightmare full of this kind of thing. :(
EricL:
Maybe I'm on drugs. But...
Your right, numties gets updated at that line in the ties module, but in the 2.4 source, that looks to happen way late in the cycle.
In UpdateSim() it goes
ExecRobs
updateshots
UpdateBots
It's not until UpdateBots() that numties gets updated, long after the robot DNA has executed in ExecRobs. UpdateBots() calls Update_Ties() which is where nutmies gets updated as you indicate.
I've stepped through the code in 2.4 and I'm pretty sure that numties doesn't get updated until the n+2 cycle in 2.4.
It may not actually work the same in 2.37.6. All I did to check was look at .numties the console in 2.37.6, which I now realize isn't indicitive on when it really gets updated, but in 2.4, I'm pretty sure (he says with a worried newbie look on his face).
PurpleYouko:
Wouldn't know about 2.4. I have never had any input on the code for that release. 2.37.6 is my baby. :D
Numsgil:
--- Quote ---What, you mean do some actual work? But asking random questions of the cloud is just so much easier...
--- End quote ---
A subtle jab eh? I do lots of work on DB, it just happens to be on things no one has access to yet :P
EricL:
--- Quote ---A subtle jab eh?
--- End quote ---
No no no, a jab at myself, not you. You made it obvious that I could have verified it myself in the time it took me to ask the question. In hindsight I should have got off my lazy butt and done so rather than taking the easy way out and simply asking.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version