AI recursion
Author |
Message |
Pickles
![](http://www.boomspeed.com/mullets/walker.jpg)
|
Posted: Mon May 17, 2004 3:22 pm Post subject: 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. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
guruguru
![](http://www.vialattea.net/esperti/immagini/einstein.gif)
|
Posted: Mon May 17, 2004 3:25 pm Post subject: (No subject) |
|
|
No. Proper recursion is more complicated than it seems. Use a basic loop and exit when you get the desired values. |
|
|
|
|
![](images/spacer.gif) |
Pickles
![](http://www.boomspeed.com/mullets/walker.jpg)
|
Posted: Mon May 17, 2004 3:29 pm Post subject: .. |
|
|
ty, makes sense |
|
|
|
|
![](images/spacer.gif) |
|
|