|
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.
The Japanese soldiers featured in Call of Duty: World at War are another prime example of fighters who would not back down.
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.
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.
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.
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.
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.
|
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.
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.
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.
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
ZDS DEATH OMEN (gamer tag)
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.
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.