Bots and Simulations > Bot Tavern

Rogue genes

<< < (3/3)

abyaly:

--- Quote from: Moonfisher ---Yeah, sound like the issue is simply that *.eyef is showing you the content of the current focus eye, but changing the value in focuseye won't have an effect till the beginning of the next cycle. (Nothing will happen mid cycle, the focus eye will not change and the value of eyef will not be updated till the cycle ends)
I think theres a post somewhere describing the sequence in which the commands are executed, but I'm fairly sure that focuseye takes effect before vision is updated (Generaly commands that affect vision or orientation will probably be executed before most other actions)
(My only remaining question on that matter is what happens when 2 bots are trying to affect eachothers .memloc or .memval location through ties... Does someone have priority or do they take turns going first?)
--- End quote ---
It's probably whichever bot is first in the array. I once tried to make a conspec system where bots would read each others' .timer locs, and a similar problem came up.

Bluchrome:
O I see where I went wrong, the scan eye gene updated focuseye before the track gene had a chance to execute (and test it in the conditilon). So the solution is to put the gene which modifies the focuseye (scan eyes) after all genes which use it in a condition....duh  . Thanks guys, I kinda feel embarrassed at this oversight.

Moonfisher:

--- Quote from: abyaly ---
--- Quote from: Moonfisher ---Yeah, sound like the issue is simply that *.eyef is showing you the content of the current focus eye, but changing the value in focuseye won't have an effect till the beginning of the next cycle. (Nothing will happen mid cycle, the focus eye will not change and the value of eyef will not be updated till the cycle ends)
I think theres a post somewhere describing the sequence in which the commands are executed, but I'm fairly sure that focuseye takes effect before vision is updated (Generaly commands that affect vision or orientation will probably be executed before most other actions)
(My only remaining question on that matter is what happens when 2 bots are trying to affect eachothers .memloc or .memval location through ties... Does someone have priority or do they take turns going first?)
--- End quote ---
It's probably whichever bot is first in the array. I once tried to make a conspec system where bots would read each others' .timer locs, and a similar problem came up.

--- End quote ---
Does that mean the older bot would have priority? Not sure how the bots are aranged...

abyaly:

--- Quote from: Moonfisher ---Does that mean the older bot would have priority? Not sure how the bots are aranged...
--- End quote ---
It might be by age. It might also stick the bots into the first empty slot available. In any case, it's an icky situation.

Numsgil:
It's the first available slot generally.  It's not supposed to matter, but there are a lot of edge cases to look at.

If you find a case where you think the problem is caused by ordering of bots in the bot array, log it as a bug in the bugs and fixes forum.  Can't guarantee that it'll get looked at any time soon, but that's the best way to at least keep track of known issues like that.

Navigation

[0] Message Index

[*] Previous page

Go to full version