Posted by Nathan on another forum and I re-used it to make a point
As a programmer who has taken a couple classes in artificial intelligence (although my real work is in other areas), I can sympathize with Firaxis's AI design problems. Civ 3 is a complex game. How complex? Compare it with chess, which itself was a tough nut for AI design teams to crack.
In chess, there are 64 spaces on the board. In Civ 3, there can be thousands. In chess, there are six different types of pieces. In Civ 3, there are dozens of different types of units. In chess, each side makes one move at a time. In Civ 3, there can be a dozen or even several dozen choices in a given turn. In chess, the position after each move can be known in advance. In Civ 3, each individual attack has two possible winners and several possibilities for how badly damaged the winning unit will be. And in chess, players can see the whole board at once. In Civ 3, at least in the rules the human player is bound by, much remains hidden.
Further, a game like Civ 3 has a huge "rock, scissors, paper" element in which a strategy that works great against an opponent who plays one way can be awful if the other side makes different choices. I've fought wars where practically my entire army was on the front lines, sometimes leaving virtually nothing on my home island or continent. If the AI played that way and I figured it out, I could take advantage with a naval invasion before an AI knew what hit it while one AI's troops were away fighting another. We as human beings can figure out the AI’s strategies and adapt, but the AI has to stick largely to strategies that will work reasonably well against a wide range of possible opponents.
Someone (I'm not sure whether it was here or somewhere else) brought up the idea of using something along the lines of genetic algorithms to help the AI adapt. But while genetic algorithms might be useful in refining basic strategies, they lack the "big picture" analysis capability of the human mind. Someone has to come up with the root strategies, and has to code those strategies in such a way that the AI can make use of them (probably losing something in the translation).
Here's a challenge for anyone who wants to call Firaxis's AI designers less than competent. Come up with a rule set that defines your strategy, and try playing a few games where you're only allowed to do things that follow that rule set. NO EXCEPTIONS, EVER. Make sure your rule set can handle both good and bad starting positions on a variety of map types. And if you succeed at that, look for ways you could beat your strategy if an AI adopted it.
And if you succeed at that, ask yourself whether human players would get mad at the game if the AI followed your strategy. If you have to engage in dirty tricks that lots of human players would object to having AIs use against them, you don't have a viable core for an AI design. After all, the ultimate goal is to sell games, not to have the AI win them. (On Deity, AIs could mop the floor with a human player just by engaging in an all-out war early on, but how many players would put up with the AI using its advantages that way?)
If you can get past that last test too, you probably ought to ask Firaxis for a job. Otherwise, you're asking Firaxis to do something you have no particular reason to believe is possible.
I do think subtlety is important in designing an AI's advantages. The AI's advantages need to feel "honest" to the player rather than like "cheating" - sort of like when my father used to spot me a piece in chess when I was a kid to make our games relatively even. The real problems seem to come when the AI's "cheating" digs into the realism too much - ridiculously lopsided valuing of potential trades, or getting techs ridiculously quickly, for example. But the idea of an AI trying to take on a top human player without significant advantages is all but unthinkable.
One last thing: more powerful computers can only do so much. Double the power of the computer and you won't even have the computer able to look one turn farther ahead unless it dismisses an awful lot of possibilities without even considering them. (In practice, the computer will look more than one turn farther ahead along the paths it considers important while not looking any farther ahead at all along paths it considers less unimportant.) In a game as complex as Civ 3, AIs HAVE to rely first and foremost on core strategies provided by human beings and only secondarily on lookahead-based analyses that can be improved (if not necessarily a whole lot) by adding processing power.
I very much hope Firaxis keeps working to improve the Civ 3 AI. But anyone who expects an AI that can even stay within shouting distance of a top human player in a game as complex as Civ 3 without a lot of advantages is being unrealistic.
Nathan
As a programmer who has taken a couple classes in artificial intelligence (although my real work is in other areas), I can sympathize with Firaxis's AI design problems. Civ 3 is a complex game. How complex? Compare it with chess, which itself was a tough nut for AI design teams to crack.
In chess, there are 64 spaces on the board. In Civ 3, there can be thousands. In chess, there are six different types of pieces. In Civ 3, there are dozens of different types of units. In chess, each side makes one move at a time. In Civ 3, there can be a dozen or even several dozen choices in a given turn. In chess, the position after each move can be known in advance. In Civ 3, each individual attack has two possible winners and several possibilities for how badly damaged the winning unit will be. And in chess, players can see the whole board at once. In Civ 3, at least in the rules the human player is bound by, much remains hidden.
Further, a game like Civ 3 has a huge "rock, scissors, paper" element in which a strategy that works great against an opponent who plays one way can be awful if the other side makes different choices. I've fought wars where practically my entire army was on the front lines, sometimes leaving virtually nothing on my home island or continent. If the AI played that way and I figured it out, I could take advantage with a naval invasion before an AI knew what hit it while one AI's troops were away fighting another. We as human beings can figure out the AI’s strategies and adapt, but the AI has to stick largely to strategies that will work reasonably well against a wide range of possible opponents.
Someone (I'm not sure whether it was here or somewhere else) brought up the idea of using something along the lines of genetic algorithms to help the AI adapt. But while genetic algorithms might be useful in refining basic strategies, they lack the "big picture" analysis capability of the human mind. Someone has to come up with the root strategies, and has to code those strategies in such a way that the AI can make use of them (probably losing something in the translation).
Here's a challenge for anyone who wants to call Firaxis's AI designers less than competent. Come up with a rule set that defines your strategy, and try playing a few games where you're only allowed to do things that follow that rule set. NO EXCEPTIONS, EVER. Make sure your rule set can handle both good and bad starting positions on a variety of map types. And if you succeed at that, look for ways you could beat your strategy if an AI adopted it.
And if you succeed at that, ask yourself whether human players would get mad at the game if the AI followed your strategy. If you have to engage in dirty tricks that lots of human players would object to having AIs use against them, you don't have a viable core for an AI design. After all, the ultimate goal is to sell games, not to have the AI win them. (On Deity, AIs could mop the floor with a human player just by engaging in an all-out war early on, but how many players would put up with the AI using its advantages that way?)
If you can get past that last test too, you probably ought to ask Firaxis for a job. Otherwise, you're asking Firaxis to do something you have no particular reason to believe is possible.
I do think subtlety is important in designing an AI's advantages. The AI's advantages need to feel "honest" to the player rather than like "cheating" - sort of like when my father used to spot me a piece in chess when I was a kid to make our games relatively even. The real problems seem to come when the AI's "cheating" digs into the realism too much - ridiculously lopsided valuing of potential trades, or getting techs ridiculously quickly, for example. But the idea of an AI trying to take on a top human player without significant advantages is all but unthinkable.
One last thing: more powerful computers can only do so much. Double the power of the computer and you won't even have the computer able to look one turn farther ahead unless it dismisses an awful lot of possibilities without even considering them. (In practice, the computer will look more than one turn farther ahead along the paths it considers important while not looking any farther ahead at all along paths it considers less unimportant.) In a game as complex as Civ 3, AIs HAVE to rely first and foremost on core strategies provided by human beings and only secondarily on lookahead-based analyses that can be improved (if not necessarily a whole lot) by adding processing power.
I very much hope Firaxis keeps working to improve the Civ 3 AI. But anyone who expects an AI that can even stay within shouting distance of a top human player in a game as complex as Civ 3 without a lot of advantages is being unrealistic.
Nathan
Comment