Advertisement

Artificial Neural Networks

Started by September 09, 2009 12:01 PM
71 comments, last by Victor-Victor 15 years, 1 month ago
I've done some preliminary research into AI, specifically ANNs. But I don't really understand the practical uses of ANNs in game programming, in regards to its ability to potentially mimic human thinking. Okay, I get the concept that you can use it in character recognition, but that has utility potential, not say for instance how a NPC will react to a situation. Can anyone give me some more practical usages in terms of NPC AI and/or direct me to some tutorials? At the moment I don't see the point in an ANN unless your interest is purely ANN research!
Four Cool Ways to Use Neural Networks in Games
[size="2"]I like the Walrus best.
Advertisement
Good question!

Do You Think Neural Networks Are Useful for Game AI?
Quote: Original post by frogtag
But I don't really understand the practical uses of ANNs in game programming, in regards to its ability to potentially mimic human thinking.!
That's because it doesn't have any. Don't be fooled by the word "neural". ANNs have precisely nothing to do with how brains work. They are one tool in a quite well-stocked toolbox of machine learning techniques, and one which is not appropriate for all (or even most) AI approaches.
Quote: At the moment I don't see the point in an ANN unless your interest is purely ANN research!
Situations where ANNs really are the best tool for the job are uncommon, but they DO exist. Until one knows the alternatives, though, it's a bad idea to assume that ANNs are the way to go. SVM and kNN are both more likely to produce good classifier results, which is what most people (are trying to) use ANNs for.
Neural networks are function approximators that you train by doing nonconvex optimization. "Backpropagation" is just gradient descent. This should immediately set off some alarm bells in your head, because nonconvex problems generally can't be solved globally -- and certainly not this way! So why should we want to use neural networks?

Me, I'll just use a table. Maybe throw in some interpolation, or use a sum of basis functions (e.g., b-splines). At least then I get a whole lot of nice Hilbert Space machinery to play with.

What's more interesting than how you approximate functions is which functions you approximate. E.g., rather than trying to learn an input-output mapping, learn the Bellman Value Function (e.g., q-learning).
Quote: Original post by Emergent
What's more interesting than how you approximate functions is which functions you approximate. E.g., rather than trying to learn an input-output mapping, learn the Bellman Value Function (e.g., q-learning).

Oh, yes. I recently perused a book on optimal control and I was fascinated by the part about value iteration. I think I'm going to try to use it in a couple of places where I have used PID controllers earlier.

I have never used an ANN with more than one neuron because they didn't seem like a good idea. But I've used logistic regression, which is sort of a single-neuron ANN.

Advertisement
This comes up often. Need a forum sticky for it? =)

Commercial games that use ANNs (pretty sure all use ANNs for NPC controllers, but I don't believe any learn in real-time during the game):

- Creatures
- Black and White
- Colin McRae Rally
- Forza Motorsport

Non-commercial, but publicly available games you can actually download and play that do machine learning during the game (both use variations of ANNs/NEAT):

- NERO:: train teams of robot soldiers in real-time
- Galactic Arms Race:: the game learns what type of weapons users prefer, then produces unique particle weapons based on learned user preferences

The main reason you don't see a huge number of ANN in games is that the majority of current game AI is simplistic enough to hand-write a state machine for. The purpose of machine learning methods is to solve problems that cannot reasonably be hand-coded (thus the complex car/track physics in Forza and Colin McRae are a good example of ANN application). Potentially, as game AI and physics becomes more complex machine learning application will increase.

Also, machine learning techniques are demonstrating the potential to automatically generate procedural game content suited to player preferences, which is bound to become popular because it increases replay value for relatively little time/effort compared to hand-made content.

[Edited by - EJH on September 10, 2009 2:14:05 PM]
Just to give you an example, my group is going to use an ANN in our new game. What it is supposed to do is categorize the player tactics and develop counters to them, and be able to recognize new tactics as well as old ones. The idea is that the AI keeps the player thinking of new tactics. Like lets say if we flanked the AI, and it worked, at least initially. So the next time this tactic is used (or while it is being used), the AI will counter the tactic, and hopefully, drive the player off. An ANN can be used to give a player a serious challenge, for those who want one. This is just an example to answer your question. Best of luck!

No one expects the Spanish Inquisition!

Just to give you an example, my group is going to use an ANN in our new game. What it is supposed to do is categorize the player tactics and develop counters to them, and be able to recognize new tactics as well as old ones. The idea is that the AI keeps the player thinking of new tactics. Like lets say if we flanked the AI, and it worked, at least initially. So the next time this tactic is used (or while it is being used), the AI will counter the tactic, and hopefully, drive the player off. An ANN can be used to give a player a serious challenge, for those who want one. This is just an example to answer your question. Best of luck!

Explain how this is going to work.
ibebrett

We are still working out the details as of now. It's a really recent idea actually, and we just started prototyping it. We're still experimenting with it. My bad if this wasn't a good example.

No one expects the Spanish Inquisition!

This topic is closed to new replies.

Advertisement