Bots and Simulations > The Gene depository
Handy Genes
Guest:
Thanx, for the info. I mainly used trial and error to find out which it worked for.
Endy ;)
Endy:
Figured out this handy code for use with the new version.
cond
start
-1 .shoot
*.eye5 50 sub sgn dup dup mult
*.eye5 50 sub sgn add 2 div mult store
' Compares the two and stores -1 in .shoot if *.eye5 50 >
stop
I'm currently in the process of converting as much of DIN as possible to a massive SG form. Still having some trouble with the aiming values though, can't exactly knock out the "mult mult" the same way.
Endy B)
Endy:
Figured out, while waiting for sgn fix, that the square root function returns zero for anything less than 1. To give you an example:
' This yields 1 if shflav is less than 0
*.shflav sqr dup div 1 sub -1 mult *.shflav dup div mult
Alright enough math tricks, I can't be giving you all my secrets.
P.S.
Please never add imaginary numbers to DB. Even thinking of "imaginary" bots calculating imaginary numbers makes my head hurt.
Endy B)
Numsgil:
Imaginary numbers you say? :whisper: :wacko: Mwahahahahaha.
Seriously though I can't imagine any reason at all to have imaginary numbers. Imaginary numbers aren't even useful until you get to some advanced harmonic motion differential equations.
But if you insist... :P
PurpleYouko:
What if I want a multi-bot to form up in the shape of a Mandelbrot set?
Can't do that without imaginary numbers now can I :bigginangel:
:D PY :D
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version