View Full Version : What will the AI be like?

16th Jul 2004, 08:47
Pyro is apparently working on a complex AI. Artificial intelligence is becoming better, but not all gamestudios are equally skilled at AI. I thought American Conquest's AI, which employed an army of idiots (the word "army" is actually too much honour for it, because it implies organization, which was dreadfully absent in AC), was the singlemost worst AI ever designed in entire history. Let's hope nobody, and certainly not Pyro, will ever beat that record.

Perhaps some people believe that a good AI is a smart AI. I think designing a good AI does not only mean an AI that is super clever (like you would expect from a machine), but an AI that can make mistakes too, like a human being. A good AI, if it is to resemble a human general, will sometimes misjudge the situation and order a massive attack at a well-defended dug-in position for instance, instead of that kind of AI that always knows everything about you and always chooses the weak spots automatically, like no human opponent would ever be capable of.

So getting the AI right is not just a matter of designing cleverness in a machine, it's about designing human cleverness in a machine, human cleverness which always falters sooner or later on some crucial point, resulting in disaster and tragedy, like in real life.

Vic Flange
16th Jul 2004, 14:21
Yes, AI is one of the most complex things to get right - both the design and the balancing. You're right to say that the CPU should make mistakes, as humans do; the flip-side is that you always get "This AI is buggy! It's making stupid decisions!" comments from some people.

Ah, well... :)

16th Jul 2004, 16:55
no ai will be perfect, cause it is not a real ai. it will follow parameters and tactics, but never make something really new.
it's just a question of time to find their weak points or the perfect tactics for every move. so there will come a time in every game, if there is nothing new in form of updates, that you win nearly every game against ai and hardcore gamers even a bit quicker. that's why i changed to online gaming and my intrest in IG would be in this part of the game too.

18th Jul 2004, 12:23
Aslong as the AI doesn't cheat I won't mind.

Has anyone played MOO3(Master of Orion?) that has to have been the worst example of poor AI cover-up anywhere, ever. The second the game starts the Enemy AI is given advantage after advantage and not subtly, you can see it when in turn 3 you have an enemy battle fleet on that system you were hoping to colonise because out of the 32 planet you've seen it is the only one with any minerals on it. :rolleyes:

20th Jul 2004, 15:24
Right. AI can make or break a game. Good AI distinguishes a good programmer from a bad one. It's all about generating the illusion of meeting and fighting a real human opponent. Good AI develops a non-linear style of fighting which eludes predictability without becoming outrageously capable. A well-designed illusion of a human opponent makes anticipation difficult but also "thinks" in the wrong direction every now and then, giving you as a player opportunities which you can take advantage of, or miss totally. Most important thing is that you as a player must be able to hide things from the computer opponent, may it technically not be so (the computer obviously "knows" everything you do), but at least you must get the impression that the AI doesn't know certain things about you, as in a real tactical situation. The computer AI must be made to make mistakes based on that misinformation. And vice versa of course.

24th Jul 2004, 13:09
A good AI doesn`t use scripts! Like Mickwnl mentioned, the AC-AI was extremely poor! In a typical mission the AI attacked every 5 minutes with 3 men! A really stupid script! And when the AI had an army which already was in formations from the beginning of a mission, it wasn`t able to keep or change the formation! I really really hope Pyro-studios will make a good AI for Imperial Glory!

25th Jul 2004, 14:23
I'm not an AI expert but all AI is, is advanced scripting isn't it?

The program looks at what the player is doing and indentifies it into a one of the categories the programmer has made for it, and then choses an appropriate reaction from the set reations the programmer has put in for that category.

Without actual real intelligence thats the only way I can see. If I'm wrong please broaden my horizons :D

25th Jul 2004, 18:15
I'm everything else than an expert on the field of game-programming, but I thought a really good AI can cope without scripts. But I'm not sure at all!

28th Jul 2004, 12:41
I'm not a programmer either, but it seems to me, that scripting is an inherent property of programming a computer. The computer itself is a dumb machine, it will only execute commands put into it. So in order to simulate independent intelligence in a computer, you will have to write scripts that when executed, will offer the illusion that someone made a random decision. Guided randomness seems to me the basic thing to create. An AI opponent must act like a human being would. That is, it should not know everything the human player is doing or at least pretend it doesn't know, and it should organize it's resources and troops in a way a human general would. You must be able to surprise an enemy AI or deceive it with diverting actions.

One of the worst things I found in American Conquest (and in a lesser degree, also in "Empire Earth and "Cossacks") was that the AI is hardly ever using intelligent formations. If you play against the AI, you just receive a stream of dumb idiots coming towards you without no apparent cohesion or plan, and when you beat them, they disappear in the same dumb way or they let themselves be slaughtered to the last man, which is silly to the extreme. Despite the slogans on videomovie boxes, no army alive "fights to the last man".
Long before a situation becomes hopeless, the general in question will take measurements to organize a retreat, and if he doesn't, his men will run off all by themselves.
Another irritating aspect about the mentioned games, is that those rabbles of idiots usually appear out of a ridiculously limited fog of war, springing up only a few yards away from your lines, making it impossible to anticipate or even react properly. On a real battlefield, you use eyeglasses or binoculars (or scout information) that shows you enemy formations from a long distance away. In that way you can think a tactical situation over and come up with a plan. But then of course the AI doesn't have a plan, so why should it allow you to make one?

Whenever I am fighting an AI opponent, I always ask myself; "Hey, what are you up to, what are your intentions? What are you getting at? Are you up to anything at all? Is there a plan behind all your silly movements?"
And of course, with all the bad AI we've seen so far, it is pretty obvious to the average intelligent player, that there is no plan, the AI has no plan to offer, only a set of very dumb scripts, which are repeated over and over again. If only we could imagine an AI which seems to make sense, which seems to be thinking about what's going on.
The AI should form up some kind of a plan based on reliable or unreliable information, carry out that plan, and if something goes wrong, rectify the plan or carry out an ordered retreat, if possible. All these things real generals do, so I cannot call any AI intelligent, unless it is capable of doing more or less the same.

If computer chess games can make you think you're fighting a chess grandmaster, it should be possible for wargames too.

29th Jul 2004, 05:52
You're talking apples and oranges.

In chess every move can be analyzed, given a mathematical equation, sort out every possible move, and select the most appropriate. This is no fun. This creates a machine that is virtually unbeatable, only limited by the processing power, and the correctness of the math.

In AI, the idea is to create a self-thinking, self-analyzing, self-deprecating machine. One that makes mistakes.

A script is a command: if human player goes to point X than computer must move to point Y.

Example, you amass an army, and cross a certain river, the computer knows you crossed the river, despite being a map away, so he now knows that the only logical way for you to go is through the forest, and right onto his base, to he gathers all his forces, or as much as he can spare, and sends them to intercept, leading to the discovery, and elimination of your forces. In some cases, the only way to beat such a game, is to find flaws. But unlike human flaws, these are computer flaws, and programmer flaws, when he doesn't think you could do something. Ie. go around the mountain and attack from the rear.

The idea of AI is to go beyong the simple math, and into the programming that can emulate human's flaws, learn from mistakes, and what's most important REACT on it's own, without scripts.

Now, I may completely off base here, but that is how I see it.

29th Jul 2004, 10:42
O.K., chess may be a bad comparison.

29th Jul 2004, 16:22
Wouldn't it solve the problem of the AI knowing everything by making the AI a seperate program to the main game/engine whatsit?

Can we get a programmer in here please?

29th Jul 2004, 18:30
YES, I'M A DOCTOR! Oh sorry, you want a programmer.:rolleyes:

2nd Aug 2004, 16:52
Originally posted by Arctic_Wolf
Wouldn't it solve the problem of the AI knowing everything by making the AI a seperate program to the main game/engine whatsit?

Can we get a programmer in here please?

OK, here is the deal -

Typically a AI is composed of rules, an instruction sets and data.

The computer analyse the game "state" thru the use of the rules & data and adds instructions (commands) in a stack assigned to an entity (in this case a unit). The general idea is that when a new instruction is given to a unit, 2 things happen
1. existing instructions on the stack are validated and possibly removed
2. the new instruction is added to the stack (like a deck of cards). Once the termination condition is met, the instruction is removed from the stack and the one beneath it takes over.

BTW. There is a number of ways to do AI, this is just one of them

2nd Aug 2004, 17:25
Probably the best AI I've ever seen is Stardock's Galactic Civilizations. It never cheats and is masterful on upper levels of play. They designed the AI based on play logs of the best players on the Internet. I found that idea quite interesting.

6th Aug 2004, 08:05
Well, Hopefully they will make a good game with good AI, or else these sort of games lose a lot of its potential.