Bots and Simulations > DNA - General
Hive coding
Endy:
What about a tmemval, tmemloc combo? A keeper could transmit the wake-up call via them. Would have to first send the message to all ties, then delete them.
Keeper Sense if bot has wake up tmemval,
If not change it via tieloc/tieval
If so delete that tie
Something like that anyways. I don't think in/out could work since all the bots are sleeping. They'd be unlikly to see the message.
An alternative would be to use shots. A keeper could info shoot the message to all bots in the area that are sleeping. Who would in turn wake up all the bots they see.
Old Henk:
Don't forget that an untied hive will live shorter, because it doesn't get the cost reduction given by ties.
Light:
you can make them share slime and shell for better protection
Elite:
Here:
--- Code: ---' I am hibernating ...
' NB - '.ties', '.hibernate' and '.wakeup' are custom variables
' How many ties do I have?
cond
*.numties *.ties >
*.hibernate 1 =
start
*.numties .ties store
stop
' If the number of ties is decreasing then delete all ties
cond
*.numties *.ties <
*.hibernate 1 =
start
*.tiepres .deltie store
stop
' Once I have no ties come out of hibernation
cond
*.numties 0 =
*.hibernate 1 =
start
0 .hibernate store
stop
--- End code ---
--- Code: ---' Wake if attacked
cond
*.pain 100 >
start
*.tiepres .deltie store
stop
--- End code ---
--- Code: ---' Time to get up
cond
*.wakeup 1 =
start
*.tiepres .deltie store
stop
--- End code ---
SGified:
--- Code: ---cond
start
*.numties .ties *.hibernate mult *.numties *.ties sub sgn mult store
*.tiepres .deltie *.hibernate mult *.ties *.numties sub sgn mult store
0 .hibernate *.hibernate mult *.numties 1 sub sgn mult store
*.tiepres .deltie *.hibernate mult *.pain 99 sub sgn mult store
*.tiepres .deltie *.hibernate mult *.wakeup mult store
stop
--- End code ---
:)
How's this?
PurpleYouko:
--- Quote ---cond
*.numties *.ties >
*.hibernate 1 =
start
*.numties *.ties store
stop
' If the number of ties is decreasing then delete all ties
cond
*.numties *.ties <
*.hibernate 1 =
start
*.tiepres .deltie store
stop
--- End quote ---
This won't work. At least not in 2.36 or earlier.
You CANNOT perform calculations of any type in the condition step of the gene.
Num may have incorporated this ability into 2.4. Not sure though.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version