Our Properties: Gamasutra GameCareerGuide IndieGames Indie Royale GDC IGF Game Developer Magazine GAO
My Message close
Latest News
spacer View All spacer
 
February 9, 2012
 
DICE 2012: The five keys to Rocksteady's Batman success
 
What Nintendo's 2011 sales mean for Wii U, third parties [9]
 
Road to the IGF: Alexander Bruce's Antichamber
spacer
Latest Features
spacer View All spacer
 
February 9, 2012
 
arrow Principles of an Indie Game Bottom Feeder [10]
 
arrow Postmortem: CyberConnect 2's Solatorobo: Red the Hunter [1]
 
arrow Jerked Around by the Magic Circle - Clearing the Air Ten Years Later [34]
spacer
Latest Jobs
spacer View All     Post a Job     RSS spacer
 
February 9, 2012
 
Airtight Games
Senior Environment Artist
 
Airtight Games
Software Engineeer
 
Zindagi Games
Associate Producer
 
Tencent Boston
Senior Server Programmer
 
Spooky Cool Labs
Marketing Director
 
Spooky Cool Labs
Software Developer - Games - Front End (Unity 3D)
spacer
Blogs

  No One Ever Runs!
by Bryan Ma on 09/16/09 01:49:00 pm   Expert Blogs   Featured Blogs
11 comments Share on Twitter Share on Facebook RSS
 
 
  Posted 09/16/09 01:49:00 pm
 

Among all the AI issues commonly encountered in contemporary shooters, tactical and traditional RPGs, and other games involving combat, by far the most frustrating - and most neglected - issue is that of a true sense of self-preservation.

ACTING TACTICALLY 

A sense of self preservation in game AI usually refers to AIs knowing to seek cover when under fire, knowing when to flank or camp, when to hold higher ground, strafe, or provide suppressing fire. The implementation of these AI tactics has taken tremendous strides forward since the early days of Wolfenstein 3D and its ilk, resulting in more immersive and believable combat in games. Games like Half Life and Halo raised the bar - and the advances they made were a mix of moving towards more accurately modeled AI as well as illusions to that effect.

 The complaints about deficiencies in this type of AI ultimately point to two main issues: suspension of disbelief and realistic challenge for the player. That is, firstly - when an AI does not realistically react to an attack, by standing still or otherwise, immersion is broken and what usually is intended to be a dramatic moment of combat becomes exasperating or comical. Secondly, when the AI or groups of AIs do not move tactically in response to engagement, challenge disappears for all but the most novice of players.

 When I write that a true sense of self-preservation is lacking in game AI - it is not a criticism of these existing measures to improve challenge and believability of combat AIs. These tactics are in high use now with varying degrees of success and I expect that they will continue to improve.

 RUNNING FOR IT

What I mean is that there is a dimension of self-preservation which goes nearly completely unaccounted for. To the best of my knowledge, in most tactics-based combat games, AIs dont run for it, don't surrender, don't give up. Every battle is total war - the goal for AIs is destroy or be destroyed, nothing between. The only exception to this rule seems to be retreat as a scripted event.

 This dimension of self-preservation is highly dependent on game context. In many games it is entirely believable that a retreat may not be possible, or that there is no choice or desire for anything but destroy or be destroyed - zombies, areas where retreat is impossible, and high stakes battles are some examples.

These guys aren't going to run.

The Japanese soldiers featured in Call of Duty: World at War are another prime example of fighters who would not back down.

Neither is this guy.

Also some exceptions include games like SWAT 4, where getting a suspect to submit peacefully is often a major goal of gameplay. Finally, strategy games usually incorporate retreat as a viable AI tactic.

This guy realized what was best for him.

RETREAT IN FAR CRY 2

One game where this is not the case is Far Cry 2. The setting of Far Cry 2 is a war-torn fictional African landscape of mercenaries paid to fight by rival factions and warlords. Foreign mercenaries make up the vast majority of AIs the player interacts with, and they aren't fighting for the homeland, defending an ideal, or anything else - they are there to make money. If we accept this as a reasonable background for AI fighters, it is reasonable to believe that these characters are not there to be martyrs. Mercenaries are, as defined by Geneva Convention protocols, "motivated to take part in the hostilities essentially by the desire for private gain" (Additional Protocol I to the Geneva Convention of August 1949). It can be assumed that mercenaries are less willing to throw their lives away, since their cause is purely material in nature. Based on the nature of the setting, Far Cry 2 is rich ground for potentially highly diverse and meaningful interactions with enemy combatants.

 Ambush

One of the common complaints of the game is that in the countryside, at checkpoints, and essentially everywhere but the cease-fire zones, mercenaries of both factions shoot on sight - simplifying what could otherwise be a much more complex set of interactions. In addition to this, mercenaries attack consistently despite apparent situations of high risk. Driving directly into the midst of a checkpoint is one thing; the player would find himself surrounded and under heavy fire by multiple AIs. However consider this situation: the player drives down a dirt road in a truck that happens to have an easily accessible high caliber mounted gun, as a coupe with a single occupant suddenly appeared in the distance. The driver of the coupe notices the player and floors it, ramming the truck head-on. Meanwhile the player has stopped and moved to the gunner position, having trained the sights of the weapon directly at the driver. So what does the driver do now that both vehicles are immobile? He gets out, pulls up his rifle and starts shooting, regardless of the fact that he was in the sights of a much more dangerous weapon before he even stepped out of the car. ...Er...naturally. Obviously its a breeze for the player to gun down the merc without taking a hit. 

Driving in the dark.

What would have been a believable response of the AI? To judge this a number of factors should be considered. The merc was a single combatant, facing a single player. Both are in vehicles. The AI's vehicle has no weapon, the player's vehicle has a mounted gun. The player has moved to the gunner position, aiming directly at the AI before he has stepped out from the drivers seat. An intelligent AI ideally should be able to recognize some of these factors and incorporate them into tactical decision making, which in this case would have had the merc attempting to drive the hell away before the player opened fire. Launching a suicide attack was not an intelligent decision.

Another situation: about a dozen AI mercenaries are manning a post of some kind. The player begins a surprise attack, launching rockets at the post from distance, killing the majority of the combatants. The remaining fighters attempt to seek out and engage the player down to the last man, despite the player potentially remaining hidden or maintaining some other highly advantageous position. Again a reasonable assumption would be that a merc AI that survived the initial attack would determine the potential risk to outweigh the benefits, and try to hightail it away from the combat zone or hide in the brush.

Boom

To realistically depict an AI's retreat, the game could consider an average merc as having successfully escaped once reaching a certain distance from the player, and that would be the last the player saw of him. Alternately, mission goals could be dynamically altered if a more high priority target managed to escape. What if the game design incorporated such possibilities? The next step would be to assign a new location for the target and give the player additional information to track him down.

POSSIBILITIES

A number of metrics could be incorporated in determining an AI's morale check in Far Cry 2 - how many in the merc group are alive or dead, the degree to which group outnumbers player, the position the player is aiming compared to the relative readiness of the AI, the weapons, equipment, or vehicle of the player, the reputation or notoriety of the player (which in Far Cry 2 was an prime example of unexplored potential), environmental factors (time of day, weather, etc.), as well as potentially randomized social factors (personality traits of mercs, relative pay amounts of mercs). Ultimately these metrics could potentially clutter the AI decision-making process with a huge range of factors to consider in attempting to reach more complex and realistic behaviors, but the resulting decision itself is simple - fight or flight - one of the most primal of instincts.

Far Cry 2 was overall a very well made and beautiful game that felt slightly unfinished in some areas and highly polished in others, which often contributed to the inevitable breaking of immersion and the fourth wall. Getting realistic AI reactions in all situations is of course a lofty goal, but giving AIs additional depth in representing that they value their lives in commonplace combat situations would have given the encounters, storytelling, and setting additional consistency and gravity.

 

 

Originally posted at http://www.thepretentiousgamer.com/?p=35 on 5/9/2009. 

 
 
Comments

Tyler Glaiel
profile image
That's what I loved about the grunts in halo

Kevin Wei
profile image
Sounds good. But I would ask, is this reasonable (production limitations, cost-benefit) or easy to code?

Bryan Ma
profile image
Thanks for the comments!

Kevin: I am no programmer - I would love to get a technical assessment. I suspect there are definitely feasible ways to achieve at least a minimal illusion of this, but I could be wrong. In general I think that even an illusion would help build a sense of consequences to combat; a sense that the bad guys aren't just cardboard cutouts at the carnival shootout.

Tyler: I know what you mean about the grunts. I guess the main difference would be that when retreating, they always seemed to me to be struck by a wild panic rather than a sense of escape/evasion. Obviously Halo wasn't an open world game so any true escape would be impossible - not that Halo isn't great as is.

Jon Alonso
profile image
Good article. That's the main reason I don't like the gameplay of Far Cry 2. Visually it is truly realistic, but mercs and other "intelligent" beings don't reach that goal. And it is a pity, because what it could have been a complex experience ends as a simple shooter. I don't think it would have been difficult to code.

Alex Prach
profile image
The "Total War" RTS games have this to some extent where armies will consider the risks, and mercenaries and novice units are more willing to lay their hands up and run rather than stick around with the senior units. These games also judges what the chances are as well and coping with bottlenecks, high ground and low ground. But one thing it does not work well with is castle battles but thats probably a different sort of AI.

In terms of actually working out how good each unit is in terms of value of resources and then also considering how much skill differences and then also the confidence and importance of objectives will all need to be taken into account. Might be challenging to balance all those figures to make it feel realistic.

ignace saenen
profile image
It may not be tremendously difficult to code, but it sure as hell is difficult to test.

On top of that, you open up the typical can of worms when asking the question about what AI tactic is believable, and what is not. Interpretations may vary, and killing merc's that are simply running off because they are smart is a totally different kind of game play then slaying fearless droids trying to kill you. I'm not even considering the moral issues attached to (offering) these kind of choices.

From a design point of view, it's going to be damn hard to find the "right" balance for your particular gaming audience, if that balance is to exist at all. Leaving you with a box of experiences that have no real story development behind them.

Adam Bishop
profile image
This is a great example of how console games could learn from pen and paper RPGs. Enemies in Shadowrun do exactly what Bryan has suggested - they have a "threat" rating that determines how hardened they are and how likely they are to run away. Once a certain threshold has been reached, enemies will flee from battle. Some enemies, like random drunken louts in a bar fight, will run as soon as players pull out heavy weapons. Other enemies, like rent-a-cops, will stay and fight it out a bit, but once the player starts to actually hurt them, they'll flee as well. Then there are the truly hardened enemies, the opposing shadowrunners and their ilk, and those people will stay and fight until the bitter end.

There's also risks for the player in chasing down fleeing enemies, something which isn't true for most games. For example, yeah, you could totally wipe the floor with those guys in the bar fight, but you do want to be able to show your face in public once in a while, right? Plus damage in Shadowrun lasts for quite a while, and can be difficult to heal, so chasing after an enemy may wind up getting you more hurt than you need to be. So it's not as simple as just adding in fleeing behaviour to enemy AI in video games, because there are other game balancing issues that would have to be changed around as well. But I definitely agree that it's something worth exploring.

Ron Kamakeeaina
profile image
I’m a first year student at the Art Institute of Pittsburgh, pursuing a BA in Gaming Art and Design, I don’t know anything about gaming programming or code, but I play a lot of FPS (first person shooters)on the XBOX Live network, I have played as an individual and within a clan structure; playing online games such as Unreal Championship in 2000, to MLG/Gamebattles tournaments on Rainbow 6 Las Vegas 1 in 2006. My comment is that videogame AI will definitely improve over the years as all technology usually dose, but I don’t think it will replace, or compare to fighting against a human opponent. I know self preservation adds a cool sense of reality to any game, but we all know once the gaming market masters that emotional response we will crave something better in the years to come. While playing human opponents I‘ve have seen; fear, self preservation, anger, resourcefulness, and that is something that videogame AI can not imitate.

Ron Kamakeeaina
ZDS DEATH OMEN (gamer tag)

Eric Hardman
profile image
Alex, the Total War example is terrific, and their entire morale system has made traditional RTS games flat, painful, and unplayable for me. Not only will demoralized troops run, but the AI will periodically sucker you with fleeing troops that are not demoralized in order to spring a trap.

Kimberly Unger
profile image
Hi Eric!

If I remember right, the guys coding the crowd AI's for the LOTR movies (for the big battle scenes in 2 and 3) repeatedly ran into trouble because they started out trying to code more realistic responses into the crowds... Which meant they turned tail and ran far more often than was cinematically desireable. Ultimately they had to tweak the AI's to act invincible in order to get the shot.

Also, in classic tabletop RPG's, if you turn and run, you're hosed. Players (and NPC's) who lose enough morale to actually turn and run away are exposed to "backstab" modifiers that give an attacker major bonuses to hit and to do damage. I am fairly sure some of these conventions follow through, particularly in the RPG's that are based off of existing tabletop rulesystems. You used to see this in D & D, Mechwarrior, Shadowrun, pretty much any RPG with combat. You had a better chance of surviving (or at least of leaving a reviveable corpse) if you stood your ground.

Alex Prach
profile image
The problem with total war is that it has become too realistic in some ways, remember rulers had many hours to consider their decisions, I do not exactly enjoy taking many hours to decide what to do when i just want to play a game for fun. Its like chess in that if you start to read really deeply it doesn't become as much fun as it used to be. The thing about total war is that you must consider everything, and take any advantage you can spot. Such as bunching weak minded units with strong units in order to make sure they don't lose moral, timing of your rally positioning your captain/general with weaker or stronger depending on strategy. And sometimes using your weak troops at the front as cannon fodder even if they flee, you can use advantage of them thinning the enermy ranks and charge.

A more real time one on one example I believe would be wrestling games where your opponent will start to run away from you until their stamina replenishes. Ideally good AI is probably something that feels right, and not something that you have to really think deeply if i were in the shoes of guard what is he thinking about (e.g. thirsty want to go to vending machine for a cola) because it just feels more natural.


none
 
Comment:
 




 
UBM Techweb
Game Network
Game Developers Conference | GDC Europe | GDC Online | GDC China | Gamasutra | Game Developer Magazine | Game Advertising Online
Game Career Guide | Independent Games Festival | Indie Royale | IndieGames

Other UBM TechWeb Networks
Business Technology | Business Technology Events | Telecommunications & Communications Providers

Privacy Policy | Terms of Service | Contact Us | Copyright © UBM TechWeb, All Rights Reserved.