Advertisement

What are the "issues" in Game AI [moderated thread]

Started by June 19, 2002 02:48 AM
45 comments, last by Timkin 22 years, 4 months ago
quote: Original post by Timkin

On the flip side, many players use similar tactics from level to level... at least at the start of the level... and then alter those as the different strategic situation comes to the fore. But I do see you point... and it''s one many people understand... imbuing game agents with learning algorithms is costly (computationally speaking and budget speaking) and difficult.

Of course, there''s a whole other area of user modelling that games have never touched on... and that is context dependent input mapping, as used in Microsoft''s Lumierre project (it''s what''s behind many of MS''s help products). By studying what the player does with the mouse, keys and other input devices in different contexts, the modelling system can formulate beliefs about what the player is likely to be doing. These can then be used against the player, rather than trying to help them format their document, or fix their printer!

Of course we''re not going to see this sort of thing in the short term.

Please keep the thoughts flowing... and feel free to disagree with people and discuss things in detail.

Cheers,

Timkin


I can picture it now...in the heat of an Unreal IV battle a little animated AK-47 pops up and says, "You appear to be trying to outflank the enemy--shall I start up a Flanking Wizard to help you?".....





Ferretman

ferretman@gameai.com
www.gameai.com
From the High Mountains of Colorado

Ferretman
ferretman@gameai.com
From the High Mountains of Colorado
GameAI.Com

In FPS games at least, strikes me the player wants to be up against a believable army. And I just feel you''ll never get that if you''ve got them all working independently, Half-Life marines or no: their backpacks full of tedious fuzzy rulesets can soak up as much CPU as you want & it still won''t feel right. Maybe if you treated them all as one intelligence operating through many sprites, that would work?

Obvious objections include: AI cheating (well yes, strictly speaking, but the proof''s in the pudding), and having to keep the status of all enemy in memory. Except if your enemy units were freed of independent decision-making, you might free up enough CPU to manage the entire OpFor at once with some leftover anyhow. And it would put a stop to mid-level spawning (which I was disgusted to see, Medal of Honor still perpetrates).

That''s it, really. Apply some God-game AI to FPS. The point being, if the enemy really did behave like humans, they''d never come at you. They''d hunker down behind sandbags and world wars would take 5 years instead of 3 weeks.

Advertisement
In reply to Anonymous Poster ''-C'': Allowing agents to ''understand'' the environment, especially when players can make custom maps as they can for most tactical shooters now is difficult, but it is not impossible. There was a bot called CGF (Computer Generated Forces) by William van der Sterren, for the Quake 2 mod Action Quake that was very good at moving around the environment intelligently. It could ''learn'' over many rounds of play where the hotspots on a map where, it could asses when to properly use a grenade(generally when it could guard all the exits to a room the enemy occupied with gunfire, so that the enemy would either blow up or come out and get shot) and where to throw it to make it land where desired. It was a very interesting bot and boasts features that no game I know of today has. The author''s website is http://www.cgf-ai.com and the bots webpage is somewhere on http://www.botepidemic.com. The bots precalculated as much as possible, which one the machines of the day could take quite some time, but once they had the data they didnt need to calculate it again tho they did modify some of it as play progressed. William van der Sterren seems to be one of the elite in terrain processing and assesment for AI. His website contains some articles by him on some of the basic principals he used on his bots.

"The Requested Information Is Unknown Or Classified" -Anonymous
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
quote: Typically, the map level only contains enough information for the AI to pathfind. The AI does not know if it is pathfinding around a boulder (which could be used as cover) or if it is pathfinding around a hole (which could not be used as cover.) Environmental awareness is the key to intelligent behavior.


For some odd reason this statement bothered me. I read the rest of the comments here and it hit me why it bothered me. There is a very simple way to check and see if something could be used for cover... line of sight. If the object being pathed around could block line of sight, then it''s valid as a source of cover. At least until we can build AI that would look at the (fox?)hole as a potential source of cover.
To solinear -- Actually, line of sight checks can be expensive in terms of processing resources if there are many AI agents on the map. What we did in our game was much cheaper and it turned out to be easier. Objects placed on the map generate special "cover points" in the map data. When an AI realizes that it has been spotted, it looks for cover points within a certain radius of itself (and lists them from closest to furthest.) It then does line of sight checks from this handful of cover points to its enemy in order and runs to the first one it finds. If none come up, it just ducks down and hopes for the best.

This system has the added advantage of knowing to hide in the hole, because the cover point of a hole can be placed in the bottom of it instead of on the sides. This system worked really well in our game.


To Extrarius -- Thank you for the information on William van der Sterren''s bots. They seem interesting. His article "Terrian Reasoning for 3D Action Games" in Game Programming Gems 2 is very good as well.


To General Washington -- I agree that having all the AIs act independently hurts realism. We implented squad-level and platoon-level tactics in our game to get them to work together. We have features such as bounding overwatch and we have one AI lay down suppression fire while others move up if the situation is dangerous. In fact, the same William van der Sterren mentioned above also has two articles in AI Game Programming Wisdom that addresses how to implement squad-level tactics.


I perhaps over-exaggerated my example in my original post. The AI in our tactial shooter is able to do most of the behavior I mentioned (flanking, taking cover, etc.) but it doesn''t do some of them as well as it should and many of the problems would be fixed with better enviromental awareness. Sometimes the AI will guard a wall instead of a door, they can''t bounce grenades around corners (something a player does easily), and a few other wonky problems that are basically caused by the AI not really understanding the concept of a wall.

I am really enjoying this thread in the forums. It has caused me to review what I am doing. Thanks to Timkin for starting it!

-C
As a player,

I just wanted to throw out my initial reactions with the ai of the grunts in Half-Life. When I first heard them talking to each other, ordering each other, and reacting "out loud" to the things I would do - was all very impressive. Looking back I don''t see it in quite the same light but I just want to reiterate that even though these types of actions are really common place among some good games, the fact that we get audio and visual clues to their thoughts makes it a great deal more compelling. In the end the style this game brought out, the way it expressed these characters, made me feel like I was dealing with something much more "intelligent" than I had seen before.
Advertisement
As a player:

Depends on genre.

For RPG:

Let's presume that I would like to develop a RPG with superior AI. (By superior, I mean "what is available on the market today".)

My reference point for great RPG AI would be Ultima VII. The monster AI was nothing to talk about (except that monsters would actually flee after being damaged to a certain point), but the character AI used NPC scheduling, which breathed life into this classic RPG. Ask any true Ultima fan about the infamous Baker It made the game seem more lifelike, even if the actions were somewhat canned. It had closer relationship to an "RPG-sim" than a RPG current to its day (example: the Westwood Studios' Lands of Lore, or the infamous AD&D titles at the time).

Currently, characters are not believable. Societies are not believable. Monsters are not believable (quite the opposite, they are rather robotic and violent, no matter how much "fantasy" you attempt to inject them with).

What I would like implemented in games is believability. Even if it isn't as dynamic as it could be, it would be nice to see NPC reactions to the main characters' "publicly-known" actions. Faction/alignment are a good starting point, but this is a single-number representation combining personality, religion, law-enforcement, ethics, honesty, and even conscience.

For example, I am an atheist, however I would never kill someone, or steal from a small child, or break rules just to see law enforcement officers become angry. In a game, my "faction" would be relative to who I am interacting with; to a religious leader, it would be '0%', whereas to a rebellious teenager with morals, I might be closer to '50%'.

RPGs' AI are the most difficult to implement, I would venture, because they more and more could become simulations in human behavior.

For action:

Hard to say specifically, because there aren't too many great FPS out there with impressive AI. Unreal comes to mind for some reason; I was impressed with the Skarj warrior's pathfinding and combat tactics. I think that Halflife might have been impressive on some level (though I have not played through the game; this is based on others' feedback).

What most I would like to see in FPS is the difficulty of enemies' AI improved to the point where cooperative-play makes a huge comeback. This is one thing I miss.

I should note that Serious Sam II had a great method of making monsters' behavior dynamic that the game was actually fun . I don't know how many times I laughed hard when presented with a new, completely off-the-wall monster.

For RTS:

Can't really comment on this, as I am not a huge fan of RTS. My last favorite was Age of Empires II, and I found that the AI was too robotic; the computer's army always seemed to be three steps ahead of my own, until I pumped out army recruits in an irrealistic fashion. I prefer SimCity-style games to Warcraft-style RTS, Caesar III being my all-time favorite. Why? Too many of the latter concentrate on mindless combat, without the other misgivings of war. Even Myth and Myth II were more mindful than some current-day RTS.

As a developer:

Increased development time. I suppose, to make NPCs believable, one would have to implement a sort of memory-model, reactions, multi-faceted faction/alignment, as well as personal stuff; such an implementation could work on many levels, in many genres, but my brief description hardly does justice to what I envision.

What I actually envision, is likely beyond the scope of my own programming prowess...



MatrixCubed
http://MatrixCubed.cjb.net



[edited by - MatrixCubed on July 15, 2002 12:17:53 AM]
quote: To solinear -- Actually, line of sight checks can be expensive in terms of processing resources if there are many AI agents on the map. What we did in our game was much cheaper and it turned out to be easier. Objects placed on the map generate special "cover points" in the map data. When an AI realizes that it has been spotted, it looks for cover points within a certain radius of itself (and lists them from closest to furthest.) It then does line of sight checks from this handful of cover points to its enemy in order and runs to the first one it finds. If none come up, it just ducks down and hopes for the best.


So you basically gave points (which are near objects that must be pathed around I''m guessing) a tag, which will give the AI a key to see if it will give cover, then do a LOS check. For some odd reason that sounds amazingly similar to what I suggested. One thing that I''m wondering though is how many points you have to put around an object (wall, tank, whatever) and what happens if a bot is already occupying that point, will it ignore that spot or will it move adjacent to the bot? While your method sounds like it''s saving some cycles I''m curious how it could be exploited. What about objects that move, such as a tank? It''s a source of cover for allies, a source of danger for enemies.

quote: This system has the added advantage of knowing to hide in the hole, because the cover point of a hole can be placed in the bottom of it instead of on the sides.


This is definitely a benefit. I like your solution in this instance.

I think that a possibility might be for you to set objects (hole, wall, etc...) to have 2 tags, one setting the object to be the cover point (hole) and the other that will make the object (wall) a source of cover. I''m just not liking cover ''points'' around an object, since it either means that you''re doing too many calculations or that you''re eliminating objects for cover that shouldn''t be eliminated simply because the cover point is already occupied.

quote: AI... ...can''t bounce grenades around corners (something a player does easily)


This is funny. The AI can''t do something that players can do, but real people can''t do. Grenades don''t bounce... that''s just a Quake invention. I swear that computer games have grenades that are made out of rubber because the metal ones that I had in the military didn''t bounce worth a damn. Metal does not have a high energy absorption/reflection ratio like rubber does and the only thing that you''re gonna do if you try to bounce a grenade off a wall is get yourself killed in the real world. Next time you''ve got a hunk of metal, toss it against a wall and see how well it bounces.

BTW, I''m not harassing you because of the game design, it''s everyone who designs (not programs) hunks of metal that apparently bounce off brick walls (or better yet, drywall that they should stick in and kill the idiot who tossed it) at around the same level of energy that they hit the wall with.
Believability seems to be an important issue to several people.

It strikes me that believability has a lot to do with perception. As the AP pointed out a few posts back, visual and audio cues definitely help with immersion. It''s entirely possible that a game can get away with slightly average AI in favour of an interesting interface between the NPCs and the PC/s.

Of course, we''ve all seen what happens when a game designer tries to dazzle us with pretty graphics... you get a great visual environment and nothing much to do in it! Or at least not much of a challenge.

Personally I feel that ''believability'' is one of the key issues in game AI design. It doesn''t matter how you implement a particular behaviour, so long as that behaviour, at that time, is seen as appropriate and leads you to believe that there is some sort of intelligence driving the behaviour of the NPC agent.

Of course, great strategies are often confounding until its too late! Why did my opponent send that one little unit out to my left flank? Well, I''ll go hit it with 10 units and squish it! You know what comes next...

Cheers,

Timkin
Something that I thought of last night, but failed to include in my above post:

Compare the evolution (in computer games) of graphics to AI technology.

Where once we had single-pixel characters evolving into hand-drawn sprites, to pre-rendered sprites, to 3D models; static worlds made up of boring 4-color tiles evolving into beautifully rendered "almost too real to believe it" worlds (a la Mad Onion's 3DMark 2001 "Nature" scene).

As for game AI, primitive "nearest object" pathfinding hasn't really moved up much, except to have been implemented in 3D environments. Even so, even the most complex-seeming 3D games are still performing some 2D trickery which can be abused once you figure out how the system works. Characters in games don't remember reactions or experiences; they usually are one-shot "oh, you saved the princess! Calooh calay!" reactions for the remainder of the game, or "attack nearest until death" monsters that do not work in packs, do not flee to lick their wounds then return with a vengeance, and do not provoke you in a manner suitable to enrage you into making mistakes.

I suppose the main reason why graphics have evolved where AI has not is that the industry is too busy selling eye candy to pay heed to more intellectual encounters and reactions. Even Intel opted for "Surf the internet faster" rather than "Improved A* pathfinding calculation timings and character decision-making" in their Pentium advertisements.

Likewise, how many games exist where the player is pitted against enemies against whom he is clearly the underdog in most situations, forcing him to be creative rather than rely on heavy firepower to come out on top of a situation? In a combat situation, an example would be where the player must utilize the environment to gain a tactical advantage: collapsing corridors, rolling boulders down a hill, stealing a catapult and aiming it toward the enemy's camp, locking doors behind oneself to hinder enemies (until they barge the door down!), and so on.

Furthermore, I feel that world physics have a lot to do with permitting the in-game characters to interact with the world in a more believable fashion. In a fantasy setting, for example, magic (or the supernatural; that which defies the laws of physics) is often presumed to be a wondrous but scary thing; by that token, primitive creatures should view wielders of magic with awe and fear.

I suppose there isn't really any one party to blame for lack of intelligence in games, but who do you suppose will be the first to develop something for AI as revolutionary as 3dfx' release of the original Voodoo cards?



MatrixCubed
http://MatrixCubed.cjb.net



[edited by - MatrixCubed on July 16, 2002 9:39:36 AM]

This topic is closed to new replies.

Advertisement