 |
|
 |

| |
Thinking Out of the Box
by Gabriel Lievano on 06/30/09 08:23:00 pm
|
|
| |
|
Posted 06/30/09 08:23:00 pm
|
| |
An Artificial Intelligence's navigation system today will probably
consist of a system of path nodes which will hold data on what a bot
can or can't do between them. Although this approach has proven to be
the most efficient and given best results, it seems that the AI's
behavior is too strict and is therefore unable to get creative in
situations where a response to certain events or conditions could be be
more humanly. One may think that adding an Artificial Intelligence
could mean more expensive processing but here I introduce a way to give
some creativity to bots without recurring too much into scripting.
The concept behind creativity involves learning, a good perception
system, and a good way to associate what is happening (through
perception) with past experiences (learning). I have found that
learning and association could be made though a neural network without
going through a lot of processing. Is a way that doesn't completely
implements all the characteristics of a full featured Neural Network
but serves well in helping the AI learn from the tactics used from the
player and avoid random actions using more "intelligent" thinking.
The Neural Network I describe for an AI consists of only two layers
which make every decision made by the computer very straightforward.
The first layer would be a perception neurons layer which activates if
a certain perception is obtained and the second layer would be the
decision layer. Each neuron within the NN consists of a threshold and
a set of weights for each neuron in the previous layer.
Now, the unconventional thing about this method is that the Neural
Networks won't be set to each AI Controller. Instead they will be
implemented on some specific path nodes and it would be triggered by
the AI's objective. This way learning will occur in a groupal form
among all the AI Controller and will also allow to save some processing
by restricting certain neurons. The weights from each neuron would be
adjusted depending on the success of each action by a constant value.
This adjustment could also be variable depending on a value given to
the amount of success or amount of failure. After doing all this the
only thing next to do would be giving the AI a creative set of actions
to perform according to each path node.
Given the fact that each NN is set to specific path nodes, one could
adopt not so common actions that the AI could use to approach their
target. For example, the AI could choose to find a larger path in
order to avoid doing what their enemy is expecting. This is specially
useful in FPS, Action/Adventure and Stealth Action games where common
actions in the AI are very easy to predict reducing the opportunity to
add difficulty to the game. Also, although this method proves better
for FPS and Stealth games, I have tested it in fighting games and have
proven to be useful also (but in this case the NN is better implemented on the AI Controller than in path nodes).
|
| |
|
|
Yeah, better AI is always good/er... I'd like to be able to add endearing qualities to NPC's in games from a players point of veiw. For instance, I'd like to add qualities to an NPC in the game to make them behave like my friends (some of them) so I can directly relate to them on a personal basis.
Or add beahviour of people to NPC's that I don't like. Y'know, give'em the same hairdo, and annoying snorting laugh lol, and either make them aggressive or passive, those kinds of things.
That way I can identify with them and it pulls me into the game more... Lately I just seem outside of the box, and can't get fully immersed. No tunnel vision. I always see what's around the monitor and out the window. But never fully tuned in.
Better AI will help.
Small Situation -> Small Options -> Small Decision = How to do
Get new Options from player behavior
Update an Compile to Server
DownLoad in every client around the world >_
One important difference, however, might be that the range of possible actions for an NPC in most FPS or MMORPGs is actually very large. Decision-making includes not only what character abilities to activate, nor just which pathfinding goals to satisfy, it also includes timing -- "how long should I take cover?" "how long should I keep attackting while I'm taking damage?"
I suspect that leaves a developer with two choices: 1) prepare to spend a very, very long time waiting for a NN to converge on multiple specific set of actions that are effective to three or four levels of effectiveness in response to anything that players can think of to do, or 2) shorten that wait by baking some heuristics into NPC AI... in which case you might as well just design your NPC AI around a few simple but effective heuristics to start with, no?
Luis probably put his finger on what makes NPC AI (and the use of neural networks to that end) tricky to discuss: there are multiple levels of behavior that need to be programmed. Which of these levels is best suited to certain types of AI-like programming, and why?
http://www.gamasutra.com/blogs/JhypsyShah/20090425/1254/Player_Evolution.php
I think Gabriel's post is great if you want to develop AI for bots, but seeing the big picture, does bots AI make fun games? or better selling games? If you think so, more difficult bots maybe won't make fun games, if so, I prefer to play with my friends. Social interaction and rich experience is what now our days seems to be the key for the industry, ask Project Natal, Wii or Sony.
I've worked with AI too and I would prefer to apply my development effort on the game plot, maybe a game with different plots as you play further, a game that takes in to account your personal tastes, dreams, actions and generate with AI help a true cool story line with lots of possible finales.
I wouldn't tittle this blog post "Thinking out of the box", it is more like "continue thinking inside the box and make different kind of boxes".
Regards.
Also John Petersen's comment complement what German says about social interaction. If the AI gets better, it could perhaps simulate a human interaction, make the player believe he is playing with a fellow friend. But Social Interaction is for sure not the key for the industry. Project Natal, Wii or Sony are not the ones to ask since they just focus on a specific market (a broad one but very specific). In my case I like fantasy single player games and multiplayer games with cooperative modes, long story lines and lots of AI enemies. I know is not just me and that there are lots of other people who likes games like this, so AI improvements still constitute and important feature in games.
Now, for the timing commented by Bart, I think a Neural Network would probably make it very expensive for a bot to calculate this. For what I've seen in other games, timing is used to be randomly calculated given a specific range of time. If the purpose is to trick the player into thinking that the bot is a real human, then what I would try to simulate the time that a real human stops to think what to do next or for a better course of action from what he is doing and I believe this simulation could be created in a fixed way without going into too much trouble.