
-----------------------------------
Pickles
Mon May 17, 2004 3:22 pm

AI recursion
-----------------------------------
Basically for my game the gorillas need to choose an angle and a velocity, for an AI i would like it so  the gorillas  randomly choose an angle and velocity , and if it will come within a certain distance away from the opposing gorilla, it will shoot, it will keep on doing this until it finds one within the distance from the gorilla i want. I was wondering if recursion is the way to go about doing this, because we were never taught it, i don't really have the time to learn how to do it only to find out that it wouldnt work.

-----------------------------------
guruguru
Mon May 17, 2004 3:25 pm


-----------------------------------
No. Proper recursion is more complicated than it seems. Use a basic loop and exit when you get the desired values.

-----------------------------------
Pickles
Mon May 17, 2004 3:29 pm

..
-----------------------------------
ty, makes sense
