Bots and Simulations > DNA - General
Global Variables?
havingphun:
Is there a way to make global variables that can be accessed by any bot in that species?
Panda:
Nope, there isn't. You'd have to create some sort of communication system for that, or pass it down from generation to generation. But I don't know what you're wanting to do, so I can't really give you any advice for it. :p
havingphun:
Well i was thinking what if i had a clump of bots tied together (Same Species) and then they communicated through the ties to decide what to do. Thats what i want to do but i need a way for the bots to know whos who so they each have an individual identity.
Panda:
Set an identity at birth:
--- Code: ---def id 50
cond
*.robage 0 =
start
32000 rand .id store
stop
--- End code ---
Then the one with the highest(or lowest) number is the "leader"? Or something like that. It's complicated to get it to work as it requires a lot of difficult communication. But it's possible.
Shasta:
Another problem with large multibots is the propagation delay between them. As you increase the number of bots, the amount of time (cycles) a "message" takes to propagate is equal to the length of the path between the first bot and the last.
Navigation
[0] Message Index
[#] Next page
Go to full version