My theory on game AI
Thuis is what I usually do. First, I figure out the ebst thing to do in a situation, the second, third, and so on. Depending on the level of the AI I want, it will randomly choose one of those things. For example, 3 things to do if your being shot in the head are
1. Stand there and do nothing
2. Run away
3. Retaliate
If you have a level 1 enemy, they will rarely sometimes run and rarely retalliate, level 2 with usually rn, sometimes stand there, and sometimes retaliate, and level 3 enemies will usually retaliate, sometimes run, and practically never stand there. I also do this for aiming and such. But for example, in PONG, The paddle will figure out the destination the ball will hit, and 75% of the time move in that direction. This way you get a different result every time. Make sure you use randomize timer() at the beginning of each program so you're enemies will do different things every time otherwise they'll do it over and over again. You see, the timer() will return the computer milisecon time which goes up once a milisecond and after 1000, goes back to zero. This gives your program 1000 possibilities for each situation. This woould only matter in like an arcade game because like a FPS the situations will always be in different orders, but you catch my drift. Nothing is really random in a program.
Well, I'm not sure what sort of reply you are expecting here... there are certainly many ways of doing thing. In fact, to quote Brian Reynolds: "rnd(3) is a valid AI"
I suppose if you are trying to emulate intelligent behavior, there may be a few more considerations you may want to include. I guess it depends on what you are after.
I suppose if you are trying to emulate intelligent behavior, there may be a few more considerations you may want to include. I guess it depends on what you are after.
Quote:Original post by lukarWhich is why I said what I did. However, "rnd(3)" is not even really an emulation of intelligent behavior but rather an emulation of the equivalent of a coin flip.
Game AI is not true intelligence, it is just an emulation of it
It's actually less than a coin flip. If you go really deep into a game's programming and a computer's programming you can predict exactly what will happen. Just give it a wide range of possible things to do (not just three like in my example) and variations of thopse things. Personally, I think we don't even make decisions but what seems the most logical in our nature. With that, if every mollicule in the univers was taken in, things could be predicted. Creepy, huh.
Quote:Original post by Yamian
It's actually less than a coin flip. If you go really deep into a game's programming and a computer's programming you can predict exactly what will happen.
I absolutely do not agree with this. While random sequences generated by a computer can be predictable at a very low level, this is dependant on the player also responding in the exact order and often in the exact timing of events so as to keep the sequence of allegedly random numbers (decisions) intact. If the player's response changes the sequence of how the decisions are being made, then different random numbers are being applied to those decisions - therefore breaking the predictability cycle.
Quote:Just give it a wide range of possible things to do (not just three like in my example) and variations of thopse things.Obviously the more choices, the greater the branching factor in possible outcomes.
Quote:Personally, I think we don't even make decisions but what seems the most logical in our nature. With that, if every mollicule in the univers was taken in, things could be predicted. Creepy, huh.I'm not entirely sure I know what you are saying here. If you are saying that we don't make decisions at all, it is at such a low level that we may as well assume that we are since no one could tell the difference.
It's like "chaos theory". People who believe that things happen for no reason other than chaos just aren't looking hard enough.
Quote:Original post by InnocuousFox
It's like "chaos theory". People who believe that things happen for no reason other than chaos just aren't looking hard enough.
You are either being facetious or you have no clue what chaos theory is.
Quote:Original post by alvaroYou are either being facetious or you have no clue what chaos theory is.It's more of a slap on the people who cite "chaos theory" and also don't know what it is.
Alvaro, if everything can be predicted (because all actions are a direct result of previous actions), how could have existance started? Before anything existed, there could have been, by definition, no action to cause it to exist.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement