Anyone interested in a good discussion of the how/why of the Civ3 AI should check out SirP's posts on this thread: (Constructive!!!) AI Suggestion Box
Since I've noticed that there are quite a few fellow software developers playing Civ3 (and posting on CFC), this thread is dedicated to a technical discussion of what should be done about the Civ4 AI (whoever develops it... whenever).
From what I know of the principals of artificial intelligence (both in general and within the computer game industry), there are 3 main approaches to AI.
Since I've noticed that there are quite a few fellow software developers playing Civ3 (and posting on CFC), this thread is dedicated to a technical discussion of what should be done about the Civ4 AI (whoever develops it... whenever).
From what I know of the principals of artificial intelligence (both in general and within the computer game industry), there are 3 main approaches to AI.
- Considering the current situation and goals, have the computer consider all possible actions, including all possible reactions made by the user (this is the form of AI used by chess programs, from the limited forms found in hand-held chess games to Deep Blue, the first computer to ever beat a human master chess player).
- Considering the overall goal, and a pre-defined plan of reaching the goal, the computer must determine an optimum move to further it's progress towards the goal.
- Have the computer think and act in a manner similar to the way a human does.
[/list=1]
Most computer game AI's use a combination of the first 2 options. I'm sure that if you objectively evaluate the last couple of computer AIs you've interacted with, whether Civ3, a first-person shooter, or a flight simulator, you will be able to see how every one of its actions fits into one of the first 2 possibilities.
Because of the sheer number of possible moves and combination of moves available in current games, programmers often find themselves spending a great deal of time trying to plug holes they originally missed while determining what a game AI should look for.
What I would like to focus on is the 3rd option... way back when I was in college, circa 1990 (gawd, was it really that long ago!?!?), I remember getting to play with a 'new' technology called: neural networks. The basic concept is that you programmatically create a software version of the neuron (a basic unit of the human brain that functions as an analog switch... it has a limited number of possible states). Then you string as many computerized neurons together in a web as your hardware allows. You feed input into one end of the web and get output from the other end. Back then, I think that I read that the largest RD center was able to simulate about 1/1000th of the number of neurons in the human brain (about the same number of neurons as you could find in the average hamster)... much dumber than the most moronic dog!
The theory behind neural networks, at the time, went that if you could create a computerized neural network with the same number of neurons as a human baby (way beyond the capabilities of the hardware of the time), you could then teach it to be intelligent. You teach a neural network by feeding it input, and then if the output is closer to the desired results you reward it, if it is farther from the desired result you punish it. In much the same way you teach a baby... so I've been told! (I have far more experience with computers than with babies!<grin>)
Obviously, computer hardware has advanced way beyond the ability to create the requisite number of computerized neurons since then. Since AI is still a myth (unless you subscribe to the conspiracy theorists), there must be a flaw in the theory. But, I have heard that neural networks are being used in handwriting recognition (and related fields). Apparently, you construct a neural network, seed it with some starting values, feed it an input of a handwritten 'a' and if the result looks anything like a printed 'a' you reward it, otherwise you punish it. After a few (???) interations, the neural network will start producing a recogniziable 'a'... you then start inputting a handwritten 'b'... and so on, and so on... eventually you have a neural network that can convert handwriting to printing... of course you still have to vary the type of handwriting. The key, is that the network will learn from its mistakes. So, ultimately, you get the network to the point where it can 'recognize' the most common types of handwriting, and you use the 'internal values' of the network to turn the network into an executable that is not only able to recognize most forms of handwriting, but is also able to continue 'learning' new types of handwriting as it continues to receive different inputs.
Now... considering the limited number of variables involved in handwriting (there are a relatively limited number of ways to position the ink within a very limited amount of space), think about applying the same technology to face/expression recognition (ever really taken notice of the variety in faces around you throughout the day?)... what about speech recognition? (listen really closely to the differences between an Irish accent, a New York accent, and a southern accent!!!). All of these are examples of the things that neural networks are being used for these days.
I believe that at some point in time, we will see neural networks being applied to computer game AIs (if they haven't already been used in games like "Black & White", "Critters", etc.). I have to believe that at some point the number of moves and combinations of moves will exceed a point where it is more 'cost-effective' for game software development companies to implement (and train) a neural network, than it is to continue the traditional form of AI development (with its enormous potential for bugs/holes/flaws).
Since the Civilization series of games is one of the most 'open-ended' games currently on the market, I think that the Civ4 AI is a prime candidate for a neural network.
Intelligent thoughts/comments on this subject are welcome... especially from any software developers with more recent AI/neural network knowledge/experience than mine.