metallix said:
In most strategy games (esp. RTS) it is practically impossible to create a non-cheating and very hard AI. Only when the real AI is invented will it be possible to truly challenge the human mind in such games. Strategies are just way too complicated, compared to something simplstic like chess.
Certainly there are difficulties, but I wouldn't say it's impossible. Also, there is as far as I know, no good definition of *real* AI. What we have now is as *real* as it gets - it just isn't as good as it gets. In the end, all systems - including humans - are formed from deterministic sets of rules on some level. We're very different from computers, but there's no clear separation to distinguish our AI from computer AI.
Also, I'd say RTS AI is much easier to code than TBS AI. In RTS the computer is on a level playing field in terms of computation time. In TBS it might have thirty seconds to respond to a thirty minute player turn (most TBS AIs won't "think" on your turn, since this wouldn't be liked by players - you don't want the AI to come up with the most cunning strategy ever while you pause for lunch).
metallix said:
Strategies are just way too complicated, compared to something simplstic like chess.
In one sense that is right - in any system which involves chance, it is much harder to come up with a near perfect AI. As soon as chance is involved, calculating all posibilities even two or three turns ahead becomes impossible. Equally, the added complexity of many units / possible moves makes a near perfect AI much harder in something like Civ than it is for chess.
However, because chess is a comparitively easy problem (in computational terms), it is
very well understood. A "good" AI for chess needs to be near perfect, or any good player will beat it. Constructing a world class chess AI is extremely complex, usually involving huge databases of best possible opening moves, known winning endgame positions, strategic rules etc. Chess tactics are relatively easy to code - just look at every possibility a few moves ahead. Chess strategies are much harder - e.g. can you come up with an algorithm for a good first move without using chess "common knowledge"?
A "good" AI for playing Civ doesn't need to be anywhere near perfect. It just needs to be pretty good. If it makes the tenth best moves every turn, it'll beat you without any trouble. It is difficult to get anywhere near the best moves for such a complex problem though.
One hard problem is coping with chance and risk. Most players will occasionally take large risks - whether knowingly or not. If these come off, they'll get a large advantage. If they don't come off they might well lose. When most players have a very large setback, they reload. Pretty much every player will reload after actually losing (or before that), rather than starting a new game.
What all this means is that most players will occasionally adopt high-risk strategies, getting the benefit if all goes well, and reloading if it all goes horribly wrong. If an AI adopts a similar approach - e.g. say by concentrating on non-military development to start with so as to maximize production - and it all goes wrong, what would a player deduce? Does the player think - "The AI must have been taking a calculated risk for long term gain."? Unlikely. More likely he thinks "That AI sucks - it left itself wide open.".
As a consequence, most AIs will need to avoid any high-risk strategies to avoid appearing dumb if they fail. Also, you need to consider that the goal of creating a hard AI is not to get it to win as much as possible. It is to make the game an interesting challenge for as long as possible. Therefore it is no good to make an AI which adopts high risk strategies - even very good ones -, if these result in either the player losing quickly (not much fun), or winning easily (also not much fun).
The player will want occasional surprises, but he won't want the AI to take extreme risks which either mean he'll lose if they come off, or win if they don't. Even in Civ type games, the player wants
his decisions to be the largest factor - not the whim of a wacky AI. This puts the player at an advantage, since only he will be able to adopt high-risk strategies.
Also, this lack of extreme risk taking by the computer AI has implications for the player's decisions. Generally, it is safe for the player to assume that the AI is making reasonably consrvative decisions - nothing high-risk. Therefore he can narrow down the AI's actions quite accurately and make decisions accordingly.
The computer AI, on the other hand, can make no such assumption - it is quite possibly, even likely, that the player is taking many risks, and behaving quite strangely (from the AI's point of view). The AI has to account for the possibility that the player might be doing anything in areas it can't see. Then it has to respond in the safest way possible - so as to avoid appearing stupid.
The odds are therefore stacked against the AI in ways they are not in Chess. Chess is a game of complete knowledge - no move is hidden from the opponent. Therefore a player can't complain when the AI does something odd - he can see it happening. Chess also doesn't involve chance, and the object isn't to make the game "challenging but fun" for your oponent (not usually anyway). Creating an AI for a Civ style game is a different kind of problem from creating a chess AI, with a different goal.
The hardest aspect of creating a good game AI is that you're not aiming to win, you're aiming to make the game as challenging and fun as possible for as long as possible.