Bots and Simulations > The Gene depository

Handy Genes

<< < (5/5)

Numsgil:
Wow, what the heck is that? :lol:

PurpleYouko:
:blink:

abyaly:
Well, the refeye line is wrong. Added without thinking. I need to mult it with the eye5 value.


if ((eye1 > eye2) &&
   (eye1 > eye3) &&
   (eye1 > eye4) &&
   (eye1 > eye5) &&
   (eye1 > eye6) &&
   (eye1 > eye7) &&
   (eye1 > eye8) &&
   (eye1 >= eye9))
{
 -140 is put on the stack
}
if (similar thing for eye2..)
{
 the angle you want to turn to if eye2 has the largest value goes onto the stack
}
...[similar things for eyes 3, 4, 6, 7, 8, 9]...
Eye5 (if larger or equal to everything else) puts -1 on the stack instead of a larger number..

add add add add add add add add dup
'adds up all the numbers (8 of which should logically be zeroes. I assumed integer
'values for the eyes - this is wrong if they can be other things)
'and copies the top one

1 add dup div -2 mult 7 add
'this puts a 7 on the stack if the top number on the stack is -1
'and a 5 if it is something else

store
'so we get the result of the giant mess up there stored in either address 5 or address 7..


I never made any bots before.
I just thought the stack abuse was an interesting puzzle ^^

Numsgil:
Write up a bot that tries to use that sometime.  I think it'd be fun.  Of course, I wouldn't want to try and decode it :P

Endy:
Wow :blink:

I'm impressed, I never imagined sqr would be used to such an extent.  :pray:

Man, it's going to be scarry out there when you start making bots :D

Agree with about DB's math being interesting, it can be fun(and useful) finding the nooks and crannies of the program.

Navigation

[0] Message Index

[*] Previous page

Go to full version