Friday, March 21, 2014

Death by Stupidity - 3/21/2014

So, squad-mates. They are an increasing part of RPG/Action/Shooter games, and an extension of the soldiers and squads found in RTS games since the beginning. Relying on them to do their jobs and support you is key in all of these games, and being able to predict their responses to changes in the battlefield situation is necessary.

The problem is, they're morons.

Literally. Their reactions are based on a limited assessment that their programming allows them to make. It is based on what you would consider a trivial subset of the information available even at a casual glance to the player. This very limited data is run through a set of very simple decision making algorithms to result in an action taken by the squad-mate/NPC.

Enemy AI has developed well over the years, in part because it has an extremely simple task. Kill the player. Not necessarily easy, but Enemy AI doesn't have to worry about long-term issues like ammunition, survival of as many of its own units as possible, or nearly anything strategic. Only the tactical.

Squad-mate AI, however, has to focus not only on accomplishing the mission of taking out all of the enemies, but on survivability. Cover, ammunition, risk vs. reward and many other factors come into play.

As an example of how a well-written squad AI can fail, take a particular mission in Mass Effect 2. I don't remember the name of the mission, but it's a long slog through foggy canyons with monsters leaping out of the mists at you. At one point, this becomes crucial, because your two squad-mates. always (and I do mean always) respond to the creatures coming out of the fog by seeking cover. The nearest cover in one location is about a hundred meters or so behind you (as a reference, that's about the longest distance you'll see on a battlefield anywhere in the game).

So, you're settling in for a relatively quick pounding of these Klixen (I believe that's the alien in question), which aren't terribly tough for a three-person crew to bring down. But two of your crew are running for cover instead of standing their ground. It makes the fight much more difficult, especially since you probably won't figure out what happened until later.

Another game I am playing right now allows you to pick up fellow gang members (Saints Row the Third) and bring them along on some of the impromptu missions that arise from time to time. Since there are penalties for dying, and the mission will continue to escalate long after you have completed the required tasks, it is often a good idea to run once those requirements are dealt with.

There is no way to tell your squad-mates. ('homies', in this game) that this is what you want them to do. Therefore, they keep reacting purely on their own, immediate situation and getting themselves killed, despite the fact that you are trying to retreat.

A final example is from an old game, Dune 2000, an RTS by Westwood Studios. A very good game, mind you, but with the same glaring flaw.

There are plenty of times in that game where you set soldiers (squishy ones) to guard a certain area. What you want to be able to say is “only worry about other soldiers; if it's tanks or aircraft, don't engage, and scatter if you are engaged”. What happens is that those soldiers insist on attacking whatever comes into view, even if they have no chance of making any kind of a dent in the thing.

There's a notch in one of the maps. A place where there is a road below, usually thrumming with enemy tanks. A small path, accessible only to other foot soldiers, allows access to the plateau on which your base is built. What I wanted to tell my guys a thousand times was to pay no attention to the tanks, just kill any soldiers that come up that particular little chunk of ground and kill them, so they don't blow up the central base with explosives and lose me the battle. It took incredible micromanagement to keep them from running down onto the road below and under the treads of the tanks.

So to the designers out there, I recommend that you start building squad-mate and unit AI that can either understand more complex orders, or has some vague sense of a survival instinct. If I tell the Light Brigade to go charging into the Valley of the Shadow of Death, I expect them to. But if I tell them to just watch the on-ramp to the Valley of the Shadow of Death, I don't want to hear them rumbling up into the cannon two minutes later because 'guard' apparently means 'charge'.


794

No comments:

Post a Comment