Artificial Neural Network
I'm doing a MSc in Computer Science. My dissertation topic is developing believable intelligent behaviour in non-player characters in “First Person Shooter Games”.
To summarize, i'm going to compare the using of current Artificial Intelligence used in Bots (Finite State Machine, Fuzzy Logic, etc) to Artificial Neural Network. I have read some articles about Artificial Neural Network. I have understand the theory part (not the whole yet), but I don't manage to understand the pracice part (on a computing program). All the examples used in my books talk about logic operators such as XOR, AND, etc.
I would like to understand, how can I use ANN in a video game.
Cheers!!
January 31, 2006 09:49 PM
There does exist bots that use neural networks for certain purposes.
One of the most common uses of a neural network is as a general (mathematical) function. A neural network can approximate many functions, so wherever a function is needed, a neural network can be used. The weights and topology of the network act as parameters that control the shape of the function. The logic functions are just easy examples. A more complicated function found in a first person shooter might be selecting which weapon to use based on the distance to a target and other observable inputs (of course approaches other than a neural network can also be successful here, as with many applications).
One of the most common uses of a neural network is as a general (mathematical) function. A neural network can approximate many functions, so wherever a function is needed, a neural network can be used. The weights and topology of the network act as parameters that control the shape of the function. The logic functions are just easy examples. A more complicated function found in a first person shooter might be selecting which weapon to use based on the distance to a target and other observable inputs (of course approaches other than a neural network can also be successful here, as with many applications).
A neural network requires a lot of traning that a more specific algorithm might not need.
Basically you feed it all the information you want it to reason about as values from 1 to -1 (depending on the algorithm you choose) then you take the outputs (values from 1 to -1) and use that to control the 'bot.
Basically you feed it all the information you want it to reason about as values from 1 to -1 (depending on the algorithm you choose) then you take the outputs (values from 1 to -1) and use that to control the 'bot.
Quote: Original post by umbrae
A neural network requires a lot of traning that a more specific algorithm might not need.
Basically you feed it all the information you want it to reason about as values from 1 to -1 (depending on the algorithm you choose) then you take the outputs (values from 1 to -1) and use that to control the 'bot.
The inputs to a multilayer perceptron (a common type of NN) are usually arbitrary real numbers. The output can be bounded or not, depending on whether you use a sigmoid transfer function on the last layer or not. Also, this view that the NN will magically find a smart way of mapping inputs to outputs is not the right way to think about them, in my opinion. A much better way to think about them is as functional forms with many parameters and a mechanism to train the parameters to fit examples.
The way I would use NNs in a FPS is more like what the Anonymous Poster suggested. You can make your bought with a general structure that does not involve NNs, like a FSM, a tree searcher that tries to maximize utility, a blackboard-based collaboration system, a symbolic expert system or a combination of some of those techniques. Your design will probably involve several places where you need to deal with the type of function that a NN can approximate well. For instance, you can use a NN to estimate how much damage a certain weapon is likely to inflict on an enemy, so you can pick the best weapon when attacking someone (one NN per weapon type; inputs: distance, elevation difference, target speed...). You can also try to use them for slightly more sophisticated things, like deciding if a particular spot provides good cover (selecting good inputs and training data for this might be tricky).
Indeed, I was thinking of creating a bot using ANN to attack the player, to flee and to roam. Everything is still theoritical. The few video game examples I have found using ANN have used the backpropagation technique. I haven't yet read about this technique, maybe I'm going to use it.
What do you thing about the backpropagation ?
What do you thing about the backpropagation ?
Backpropagation is the most common algorithm used to update weights in feed-forward networks, like multi-layer perceptrons.
You may want to read this Wikipedia article to organize your ideas a little:
http://en.wikipedia.org/wiki/Artificial_neural_network
You may want to read this Wikipedia article to organize your ideas a little:
http://en.wikipedia.org/wiki/Artificial_neural_network
You could also use a genetic algorithm to train your nets instead of back-propagation. Do read on that too.
And an excellent resource for you I think is AI Techniques for Game Programming. This book has a lot of code showing application of a Neural Network to a game. This might be just what you are looking for.
And an excellent resource for you I think is AI Techniques for Game Programming. This book has a lot of code showing application of a Neural Network to a game. This might be just what you are looking for.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement