Bots and Simulations > Tips and Tricks
Hibernation
Numsgil:
A little behind the times aren't we?
I changed it so that store commands cost energy the moment thye're used. I believe that was 2.37. It's what allowed Spanish Conquistador and other short bots to explode in complexity and efficiency.
Endy:
Yep, great little guys. Normally I'll do the initial code regular, then SG'ize it afterwards. Useful also for general cost saving in Multi-gene bots, since every bit of nrg helps.
Here's a tutorial on the whole concept.
Conditionless bots
You could just make a normal condition send them into hibernation. It would effectivly act as a overall state regulator, costs some nrg, but would make the coding easier. Only downside is that the antiviral stuff wouldn't work.
Maybe it would be useful for bots near death. They could hibernate until a conspec gives them enough nrg to get going again.
Elite:
Damn. I ran a test, and in 2.37.6 hibernation does work, but in 2.4X it doesn't
No wonder Una was dying in 2.4 - there's a lot of stores in there
Grrrrrr ... change it back
Here's SWARM SGified:
--- Code: ---' SWARM
'
' Forms swarms to its tactical advantage
cond
start
.tie *.robage 1 add mult inc
.deltie inc
.fixpos *.fixed mult dec
*.refaim .setaim *.refkills *.kills sub sgn 1 add sgn mult *.eye5 sgn mult *.refeye *.myeye sub abs sgn -1 mult 1 add mult store
10 .up *.eye5 sgn mult *.refeye *.myeye sub abs sgn -1 mult 1 add mult store
10 .up *.eye5 -1 mult 1 add mult store
*.eye9 2 mult *.eye8 add *.eye1 2 mult *.eye2 add sub *.eye5 1 add div .aimdx store
*.refvelup 50 add .up 45 *.eye5 sub sgn mult *.eye5 sgn mult *.refeye *.myeye sub abs sgn mult store
*.refxpos *.refypos angle .setaim *.robage sgn mult *.eye5 sgn mult *.refeye *.myeye sub abs sgn mult store
-6 .shoot *.refeye *.myeye sub abs sgn mult *.eye5 34 sub sgn mult store
16 .shootval *.refeye *.myeye sub abs sgn mult *.eye5 34 sub sgn mult store
*.refveldx .dx *.refeye *.myeye sub abs sgn mult *.eye5 34 sub sgn mult *.refveldx *.veldx sub abs 5 sub sgn mult store
30 .repro *.nrg 750 sub sgn mult store
100 .strbody *.nrg 500 sub sgn mult store
*.body 0 floor .fdbody *.body sgn mult 100 *.nrg sub sgn mult store
*.tiepres .tienum *.numties sgn mult *.robage 1 sub sgn mult store
.tieval .tieloc *.numties sgn mult *.robage 1 sub sgn mult store
1000 .tieval *.numties sgn mult *.robage 1 sub sgn mult store
.delgene inc .delgene inc
stop
end
--- End code ---
Notice the antivirus code on the end
SG bots with double .delgene inc are totally immune to viruses - the virus is deleted before it can execute
There's a topic here about conditionless coding. There's also my Animal Minimalis SGified in there
Welwordion:
Hm, I just realized you could build a bot without store commands, instead it would rely on inc dec and information/venom shots it fires at itself(he could be a MB to do that).
However it would be quite complicated and energy expensive.
Numsgil:
In 2.4 at least inc and dec are no longer free. They cost 1 / 10th of a store I believe.
If Eric doesn't, I'll try and figure out what makes hibernation no longer work after church.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version