Welcome To Darwinbots > Newbie

hi

<< < (4/4)

ikke:

--- Quote from: endercrypt on September 27, 2012, 12:07:34 PM ---ol, cool, also
why doesent this code seem to work..

--- Code: ---100 *.nrg div 1000 mult .repro store
--- End code ---
.repro seems to get the value 0..
its suppose to give a % to repro a bot with ~1000 nrg

--- End quote ---
it is an interger stack so 100/1000 = .1 becomes 0.
0*1000=0

EnderCrypt:
oh.. so the stack cant contain decimals... hm.. also, how do i rotate my latest tie, to a certain direction?

Botsareus:
No, stack can not contain decimals (less weird results in mutating robots will be my guess as to why), there should be a sysvar for rotating ties, check on the wiki: http://wiki.darwinbots.com/w/Sysvars. I am adding a fix to .tielen1 trough 4 and .tieang1 trough .tieang4 in a next version...

EnderCrypt:
thx

btw, any tips on how to increase efficiency on this bot?

--- Code: ---cond
start
*.eye1 *.eye9 sub 1000 mult 100 ceil -100 floor .aimsx store
.tie inc
*.eye5 20 sub 5 div .dn store
*.edge 25 mult .aimdx store
*.thisgene .mkvirus store
.vshoot inc
*.thisgene 1 rnd 2 mult 1 sub add .delgene store
stop

end
--- End code ---

it  isnt the most brilliant thing ever... and not the most effiecient, works well if it gets some vegetable and.. well.. i was bored and wanted to make somheting cool xD

its fairly simple, just infects othere bots with itself, and deletes the genes of the othere bot, creating an exact copy of itself... (its not self preserving) works well against many, big bots, not against small sense.. virus goes in random directions...

Navigation

[0] Message Index

[*] Previous page

Go to full version