Far Cry: A New Standard in AI

Introduction

The artificial intelligence (AI) in most games sucks. It's almost uniformly awful in every game genre. The relevant question, when evaluating a game, is most often not "How good is the AI?" but rather "Is the AI so painfully stupid that I'd rather have a long, slow root canal than deal with it?" That's how bad the state of the art is. From the moron bots of Battlefield Vietnam (BFV), who frequently do nothing more useful than humping walls, to the three races chock full of idiots in Starcraft (SC), who would much rather walk stupidly into death all the way around the map rather than get out of each other's way, gaming AI almost universally sucks. Period.

There. I got that out of the way. It really shouldn't come as a surprise to anyone who's been reading my game reviews. It's a rare thing indeed that I don't have to fault a game for terrible AI. I think gamers have grown so accustomed to it that we just can't imagine playing any other way. I know that I've become so inured to the inanity of it all that I almost missed something very important while playing through Far Cry (FC), namely, that FC truly sets a new standard in gaming AI.

What everyone notices immediately with the game is that it sets a new standard with its visuals, an observation with which I heartily agree. FC does things that no other game on the market today can match in terms of its appearance. What is far more subtle, yet far more important in the long run, is that it truly does the same for AI as well. I'm writing this essay in the hope that others will pay attention and demand at least the level of AI that FC provides from all their games.

An Inventory of The Stupid

I've said already that the AI in most games sucks. What I haven't done is back up that claim with any evidence. Anyone who has read my game reviews will probably know what's coming. Those longsuffering souls can simply skip to the next section. Others should bear with me while I define and distinguish the most common sorts of stupidity found in games today.

Stupid Pathfinding (SP)
Stupid pathfinding is easily one of the more common faults, and it comes in several flavors. If units get confused and go all the way around the map rather than going directly forward, if units can't cope with changes in the map geometry, etc., then the game AI suffers from stupid pathfinding. The commonality is that the game's algorithms for calculating the path to get from one point to another are problematic.
Stupid Individual Movement (SIM)
Stupid individual movement refers not to problems with the pathfinding but rather to problems faced by individual units in traversing the calculated paths. For example, they might "know" where they're supposed to go but various stupid individual movement problems prevent them from getting there.
Stupid Group Movement (SGM)
In contrast to the above, stupid group movement refers, not surprisingly, to the problems that emerge when units must move as a group. Problems of pacing, such as groups scattering unacceptably when fast units forge ahead leaving slow units behind, problems with units getting in each other's way, and all other such issues fall into this category.
Stupid Fire Control (SFC)
Stupid fire control refers to the various dumb things that AI-controlled units may do, whether it's throwing grenades right at their teammates, choosing to shoot the enemy at full health rather than the guy about to die right next to him, attacking the inanimate structure rather than the enemies firing at the unit, etc.
Stupid Fire Response (SFR)
Stupid fire response refers to units that do ridiculous things when coming under fire. A good response to incoming fire is often to get away from it, but one would never know that from playing video games. The more common response by far is to march stupidly off into it toward certain death, preferably bringing other friendly units along for the ride.

That's a general inventory of some of the more common sorts of AI problems. To provide some concrete examples, it's a rare, rare game indeed that doesn't suffer from SP to some degree. Dungeon Siege is the only game I can think of right now, and it avoids SP only by letting characters walk through stuff—a worthwhile tradeoff in my view if the developers can't get the algorithms right in the first place—which also helps it avoid SGM I might add.

Illustrating SIM is also too easy to do. While Raven Shield (RS) does a good job with its pathfinding calculations, for example, it does a moderately awful job with individual movement. I've seen the "highly trained" counterterrorist operatives get hung up on walls, stuck on doors, etc. The bots in Battlefield 1942 and BFV also exemplify such problems, insofar as they often stand around humping walls, twitching at corners, and other ridiculous things.

Happily, there are some games these days that pay at least some attention to SGM. Games such as Earth 2150, Warcraft III, and Homeworld 2 provide various "intelligent" grouping features to avoid its woes. Yet still too many other gamesSC, Baldur's Gate, and Command & Conquer: Generals (C&C:G) to name but a few —don't bother. The whole point of grouping different units together (i.e., to leverage their synergy) flies out the window when the group doesn't move as an intact whole.

Where SFC and SFR are concerned, examples are somewhat harder to come by, yet the units of SC, C&C:G, and pretty much any other real-time strategy (RTS) game don't concentrate their fire, preferring to wound groups of enemies evenly rather than dispatching individuals as quickly as possible. Worse, I've had AI-controlled teammates in RS kill, blind, and gas themselves with various grenades. Some games provide stance settings, or other such controls, to determine how units respond to fire, but too many simply march stupidly off to certain death. If SFC/SFR are harder to find than the other problems, I suspect it's due only to the relatively simplistic nature of combat in most games.

At any rate, the point has presumably been made. I'm sure gamers can think of all kinds of examples of the above, and probably come up with different sorts of stupidity as well, without much difficulty. Most games these days, no matter how great they look, sound, and play, suffer badly from a case of the stupids when it comes to AI, and that's deplorable in light of their progress in other aspects.

Something New Under the Sun

Which is one of the reasons FC remains very interesting despite its warts; i.e., FC is the only first-person shooter (FPS) game I've ever played that doesn't suffer in a substantive way from any of the common problems. The enemies in FC clearly follow well-calculated paths, which somehow manage to account for a wide variety of terrain features and obstacles. They use cover often and well. They don't usually bunch up stupidly or follow a single path; rather, they work together and approach the player from multiple angles. They even fire and respond to fire pretty intelligently. They could throw grenades a bit more often, I think, but the developers may have toned that down to give the lone protagonist some chance of survival against the hordes of bad guys.

The AI in FC is positively amazing in comparison to that in other games. It's so different, in fact, that it took me a while before I even realized how different it was. I know that sounds very counterintuitive, but the enemies in FC behaved so intelligently that I wasn't thinking of them as bots. I was treating them like real enemies. Granted, that doesn't hold up under close scrutiny; they're not going to win any IQ contests or develop a cure for cancer, but when it comes to video-game opponents they're that good. They're so good that their "intelligence" disappears into the background, it's lack of flaws letting it operate unnoticed.

AI Can Make or Break a Game

I know that AI often takes a back seat, in terms of allocating game developer resources, compared to a game's visuals, audio, and other more sensually-oriented aspects. But FC proves an hypothesis I've held for a while, namely, that good AI can do much to make or break a game despite various successes or failures in those other areas. Think about it for a minute: how badly do you want to play a game that looks amazing and sounds great but isn't much fun, or is even downright frustrating, because its AI is terrible? Conversely, how badly do you want to play a game that's great fun but lacks cutting-edge visuals and audio?

The recently released Painkiller is probably the perfect illustration of the former question. I've played several different demos of the game, and while it's pretty intriguing and can be fun for a while it's just not going to hold my interest. It's visually gorgeous, featuring some of the most amazing eye candy ever seen. It's aurally great too, though I'm really not much of a fan of the heavy metal soundtrack. Yet its AI amounts to little more than two directives: (1) move to attack range, and (2) shoot player until dead. Enemies march stupidly down the same pathway toward the player getting blown away by the dozens as a result, taking no advantage of cover or pretty much any feature of the environment.

For the record, I enjoyed the DOOM and Quake series of games, despite their simplicity, just as I liked Serious Sam to a degree. Heck, I may even buy Painkiller once it's dropped significantly in price. There is a certain amount of fun to be had from purely adrenaline-soaked, mindless FPS games. But they're not the games that really provide satisfaction in the long run. They're not the games that hang around on my hard drive forever. They're not the games that I play all the time, obsessing over this or that aspect. They're just not in the same category as a game like FC, despite the obvious mechanical similarities, and that's largely due to the differences in their AI.

To illustrate the latter question, games like Deus Ex (DE), System Shock 2 (SS2), and even classics like the original X-COM: UFO Defense are still going strong today, still bringing in converts years and years after their release. It's not because they blow the player away with eye candy, especially given all the huge advancements in the intervening years, but rather because they have good game play. Thus, AI can make or break games insofar as it contributes or detracts from providing such play.

AI Finally Makes Stealth Work Right

Perhaps the biggest surprise to me was the degree to which FC made it possible to play in a stealthy manner. Oh, don't get me wrong: FC isn't one of those games that tries to give you multiple paths for the resolution of every problem. If you want something like that you have to try DE, SS2, or pretty much any other game by Warren Spector. No, FC clearly requires you to shoot a whole lot of bad guys; there just isn't any other option.

But there is a lot of leeway in how one approaches shooting said bad guys, and stealth works exactly as it should in the game. I've played other games wherein stealth was important, so I'll explain by using them to contrast the various elements. The Thief and Splinter Cell series both got the stealth meter roughly half right; i.e., their meter showed you approximately how detectable you were, but it did nothing to tell you whether or not nearby enemies actually would detect you. That's a crucial gap.

In contrast, the stealth meter in FC is multi-colored and is either stable, rising, or falling. As long as it's green you're still safe; if it's yellow then the enemy is "aware" of something but isn't sure what; once it's red the enemy "knows" you're there and is actively coming to kill you. Intuitively enough, the meter rises and falls in perfect correspondence with the enemy's awareness of you, and the rate at which it rises depends upon how visible you are to them. It's a beautiful bit of interface and associated game mechanics, and it works better than the systems provided by other games.

Further, not only does the detection and metering work brilliantly, the AI of FC ensures that enemies respond quite reasonably to whatever is happening. Most other games get this completely wrong in one of two ways. That is, nearby enemies are either completely oblivious to what's happening with the guy right next to them, or else all enemies within a ridiculous radius immediately come running straight for the player once a single bad guy detects him. Either way the results are pretty disappointing.

For example, in some games I've sniped a bad guy from hundreds of yards out, only to watch the guy next to him calmly continue his patrol (e.g., Return to Castle Wolfenstein). In others, I've sniped a bad guy from hundreds of yards out, only to have what seems like every other bad guy in the whole bloody level turn and start running/shooting right at me (e.g., Operation Flashpoint). Neither of these results is even remotely reasonable, yet they're pretty much standard fare in games these days.

In contrast, enemies in FC react like they should. If I snipe a bad guy, anyone right next to him will immediately pull out their weapons and drop into a defensive stance and/or seek cover. Enemies a bit farther away will pull out their weapons and cautiously start searching the area. Enemies still farther away typically won't notice, unless a call for backup is made or an alarm is triggered at which point they'll come running to the disturbance. At some point, which again seems to depend "intelligently" upon what's happening, the enemy may decide to call for backup and/or will raise an alarm. Suffice it to say that it all plays out exactly like it should. The bad guys are "aware" and "smart" in how they respond, being neither oblivious nor omniscient as in other games.

The same great mechanics apply to distraction techniques as well. I never understood the value of throwing objects to distract guards in Splinter Cell, for example, because they always walked straight to the point from which the object was thrown. If I wanted to call attention to myself, folks, I'd just start shooting them! Throwing a bottle was always a sure fire way to get the enemy coming right at you, which is exactly the opposite of creating a distraction in my book. In contrast, throwing a rock in FC sends the enemy off to investigate the noise of its impact on the ground, which works exactly as one would expect. The only disadvantage, of course, is that it makes the enemy more cautious, but that's sometimes a price worth paying.

Conclusion

What sets FC apart from every other game, and makes it worth playing despite its faults in my estimation, is that its AI is a thing of beauty. I believe that game development has reached a turning point, a cusp where the curve breaks away in a new direction. FC demonstrates what is possible with today's technology, and future games should do at least as well. Here's hoping that game developers are paying attention, so that gamers won't have to put up with sub-standard AI much longer.

04/18/2004

1