kars said:
In fact that's what nearly every AI does. They only hide it it more or less. But you won't find AIs that really bother with the line of sight and so on, as a real player would. Instead they use drastically simplified algorithms, that look as if they would obey the same problems.
|
Quite a few of the newer AI's actually DO obey line of sight. They also know there are objects they can hide behind.
I just wanna say, I had my brother write me a smiple 'script'.
#include __int64 Fibonacci(__int64 n) { if( n <= 0 ) return 0; if( n <= 2 ) return 1; return Fibonacci(n-1) + Fibonacci(n-2); } int main(int argc, char **argv) { int r; int n; __int64 x; if( argc != 2 ){ printf("Fibonacci will print out the nth term of the fibonacci sequencen" "using a recursive algorithmnn" "Usage: fibonacci n"); return 1; } r = sscanf(argv[1], "%d", &n); x = Fibonacci(n); printf("The %dth term of the fibonacci sequence is %I64dn", n, x); return 0; } |
That code is written in C++, so if you have a complier, play with it. If you want to ask me how it works, I have a file you can run.
You run the script 30 times... it takes about 0 seconds.
Do it about 40 times... it takes about 3 seconds.
Do it about 50 times, it takes about 4 minutes.
I admit, Scripts are simple. Very very simple. My brother wrote that script in about 10 minutes for me. My computer just cant seem to run that script 100 times in a day. (24 hours)
EDIT: I bumped this thread becuase I had my brother make this program earlier today, I just got around to posting it, and it is in relation to this thread.
PSN ID: Kwaad
I fly this flag in victory!