IA Logo

IA Information

Dave Mark's books

Post-Play'em - Observations on Game AI

Archive for the ‘Commentary’ Category

Skyrim: It’s a Free-for-All!

Sunday, January 1st, 2012

Just had a battle out on the plains west of Whiterun. It was bad enough that I got jumped by a dragon. Then, the dragon flew a ways away and started chillin’ a nearby mammoth. Lydia and I continued to take potshots at Mr. Dragon (Mrs. Dragon?) while the mammoth ineffectually stared down its assailant. Eventually, the mammoth started running (right past me and Lydia!) and the dragon seemed to give up on it.

Unfortunately, I soon realized that there were a couple of mages wandering around the area who, for some reason, apparently decided that Lydia and I were far more menacing than the circling beast. And then there was the skeleton — who may or may not have been the product of the mages who started attacking me. By the time I dispatched the skeleton, the dragon had gotten bored with whatever it was he (she?) was fighting nearby and came back to visit. This all came to a rather unfortunate end… but that’s not what I came to tell you…

“There seems to be a serious lack of proper prioritization of targets.”

The point of all of this is that there seems to be a serious lack of proper prioritization of targets. For example, despite the fact that a mammoth might look awful tasty to a dragon, said morsel is not going to be able to attack you. Better to dispatch the pair of annoyances that are pumping arrows into you and come back for the hairy buffet later.

The same can be said for the mages. If there is a dragon cruising around, it seems rather silly to attack two relatively harmless bipeds. In fact, the chances of defeating the dragon (and therefore surviving) would go up considerably if it was attacked by a group rather than by a couple of individuals. An additional bonus would be that the dragon might take such a toll on your secondary opponents that it leaves you an advantage you might not otherwise have.

Obviously the target selection algorithm doesn’t take a lot of this into account. It’s really a matter of mathematical modeling. Ironically, it is the same sort of modeling that goes into non-combat games such as The Sims. The good news is that it is relatively simple to put together and can adapt to pretty much any situation that your NPCs find themselves in. It can also be  tied into the entire combat selection system so that the possible actions could include not attacking anyone at all (even running away, if necessary).

For those that are curious as to how such utility-based systems can be built, it is pretty much the entire point of my book, Behavioral Mathematics for Game AI.

Dragon Age: Origins — Final Thoughts

Wednesday, November 16th, 2011

Well, after messing around with it for over a year, I finally got around to finishing Dragon Age: Origins. I have to admit that the game grew on me after a while. Here are some final thoughts on it. (Note that you can read my earlier posts on the game.)

Custom AI Tactics

“I kind of liked dealing with the AI tactics.”

Once I finally dedicated a little bit of time to looking into it, I kind of liked dealing with the AI tactics. It’s a simple rule-based system, of course, but one that gives you a feeling of control. The reason that I specify “feeling” in this case, is that most of the rules are pretty obvious. For example, a rule for Morrigan might read “When there are 3 or more enemies clustered together, use Fireball.” I’m sorry, but that goes in the “duh” column. Really, that should be a part of the logic for the Fireball spell in the first place. The same goes for the “dual weapons sweep” logic that I used on my main character (for when I wasn’t controlling him). “If there are 2 or more enemies surrounding you, use dual weapon sweep.” (I also found that I used it with one enemy just because it looked cool and did great damage.) Regardless, many of the usage rules just simply made logical sense.

“The solution to this is to build the logic into the abilities themselves.”

The solution to this is to build the logic into the abilities themselves. If you are wounded, use a healing poultice (if you have one). If you are low on lyrium energy and have a potion, use it. If you are strong and have a shield, do a shield bash against your enemy. There really should be no need for the player to construct these manually. Of course, I don’t know what the chicken/egg order was on this mechanism and the “tactics” abilities that were built into the character customization. That is, did they create the AI tweaking mechanism and then decide to add the character abilities that allowed you to unlock more tactics slots or did they create the notion of “has better tactics” and have to come up with a way of expressing that?

“That character has that cool new ability but never uses it!

The unfortunate by-product of this is that I can see how it would be very frustrating for people who didn’t know that the tactics screen was there or didn’t understand how to use it. I’m sure there were more than a few people who would cry, “that character has that cool new ability but never uses it! This AI is stupid!” Of course, there is always the possibility that the reason this mechanism was in place was because they were struggling with how to have the NPCs use their skills intelligently. By putting the onus on the player, they absolve themselves of a little of the responsibility. I don’t buy this line of thinking because, by creating a customizable rule-based system in the first place, the battle is almost won.

Companion Pathfinding

“I usually was pretty pleased with their positioning.”

With Skyrim being out, one of the comments you hear about the companions is that they can do silly things like block doors or passages and be completely clueless about the fact that you want them to move. This is not something that I ever found to be a problem in DA:O. In fact, despite the fact that I usually had 3 other companions along with me, I usually was pretty pleased with their positioning. They followed at respectful distances, they didn’t get trapped behind geometry, they handled it fairly well when I would reverse direction on them, etc. Most of the time their “group” behavior was very believable.

There was only one time that I noticed anything really odd. I was in Dust Town in Orzammar and Zevran (easily my favorite NPC, by the way) managed to get up on a pedestal of some sort and was unable to get down. After some examination, I realized that it was an extension on either side of some stairs. He had somehow managed to enter it from the top of the stairs but couldn’t exit that way. Likely there was navmesh geometry on the pedestal (why, I don’t know) but no link to the rest of the mesh. For some reason, when my back was turned, he skipped a mesh boundary by being nudged off the main mesh. I’m just speculating here. Anyway, I had to actually exit the zone without him and come back.

Enemy Targeting

In an earlier missive on DA:O, I had complained about how the target selection seemed to be a bit nonsensical at times. Perhaps I got used to it or perhaps it wasn’t as bad as I initially thought… but this issue didn’t seem as bad as I had commented on earlier. There were times when I thought it was a bit odd, but it wasn’t altogether unreasonable. That, of course, has been one of my mantras for some time and, in fact, is something that I stress in my book: “Not always perfectly rational, but at least reasonable.” I don’t know if that was the goal here or if their targeting was simply sub-optimal.

Of course, with regard to my companions, some of it had to do with the tactics selection and aggressiveness settings. If I had them set wonky, they would act wonky. However, I can’t use that excuse with the enemies. On the fly, it is hard to determine what sort of logic they are using… e.g. “nearest visible” vs. “strongest”. This would be something I would have to record and slow down to decipher. However, since it doesn’t seem to be that weighty of an issue, simply “knowing” wouldn’t really change much.

Again, though, some of this is mitigated by the fact that you can control each character in turn. Is this a bandage, though? Are we at another chicken/egg moment? Did they allow you to control the character targeting because they felt people would be frustrated by the target selection? Probably not… it’s not that bad to force them to build a whole huge mechanism (character control) around it.

Scripted “Random” Conversations

I found the seemingly random chit-chat between companions as one of the most amusing parts of the game. I have to admit that it was so endearing, that it made me want to replay the entire game with different companion combinations just to see what all these conversations were. (The combination of Zevran and Morrigan was a riot!)

“You begin to get used to the fact that riiiighhhtt here someone is going to start talking.”

The initial impression is that these asides simply take place “whenever”. Conveniently, they would also take place when you really weren’t doing much else. It didn’t take long, however, to realize that there were “hot spots” in the terrain that triggered these conversations. Not to the extent that Place A triggered Exchange A; they were randomly selected from the available list. They were obviously placed in areas where you needed to do a bit of walking and, therefore, wouldn’t be interrupted with much else. The long bridge to the Proving Ground in Orzammar has one, for example.

The problem is when you have to walk the stretch more than once — especially in succession. You begin to get used to the fact that riiiighhhtt here someone is going to start talking. It’s even worse when you have to reload because it doesn’t remove the conversation from the potential list… and you may get stuck with the same one over and over. While I like the conversation as a way of both fleshing out the characters and making the scenic walks a little less boring, I have to wonder if there is another way of doing it.

Facial vs. Body Animation

“The lip-syncing is worthy of being looked into by the pop-music industry.”

While this doesn’t necessarily seem to be AI-related, I figure that it probably is. The facial animation in DA:O is great. The lip-syncing is worthy of being looked into by the pop-music industry. With how good the lip-sync is, I found myself staring obsessively at the mouth only while people were talking. Maybe because I was drawn to the only realistic part in the whole face.

The rest of the facial animation is spotty, however. I would love to see more expression in the rest of the face, too. The eyes, eyebrows, and, in fact, the entire head, needed to be more animated. While the head wasn’t “Fallout” creepy, it needs to move more… look around a bit. Same with the eyes. Little tiny twitches are nice, but people do things like glancing at the floor, etc. You’re on the right track, but need to do more.

“People don’t just wave their hands randomly.”

The body animation during conversations was simply horrible, though. I like the whole “hand-wavey” thing that they tried to do. It’s better than standing perfectly still. On the other hand, people don’t just wave their hands randomly — they use them to augment what is being said while it is being said. They use it to punctuate words much the way I used italics in the this paragraph. If I had italicized different words that were obviously not meant to be stressed, I wouldn’t have communicated the same thing or, worse, it would have distracted or even confused the reader. That’s what I felt about the hand motions in DA:O. They seemed vaguely relevant but so imprecise and ill-timed that it made things worse rather than better.

The solution likely lies in a markup of the dialog to map to the animation selection. By tagging the stressed words with the appropriate gestures, you can match them dynamically. The trick, of course, is that you have to back-time the start of animation so that you can finish on-time. The shorter the target animation, the easier this is to pull off.  That would actually require two markers… e.g. “move to position” and “execute”.

For example, if I want to slap the table as I’m saying “now”, I would tag a point 2-3 words ahead of time with the “raise hand” animation and then the word “now” with the “slap table” animation. Imagine the impact (so to speak) of having a character be able to slap that table, point the figure, shrug the shoulders, incline a head, wave something off dismissively, etc. and have it happen right at the precise moment it needs to. Now that would be immersive! (Note that the word “that” would have been a great place for a couple of key animations, eh?) (Note that the word “eh?” in the prior sentence would have been a great place for a… OK… never mind.)

That said, the rest of the animation was spot-on.


“The companions didn’t cause me undue stress… which is a spectacular accomplishment.”

All in all, Dragon Age: Origins was a really well done game. I enjoyed a lot of it and never felt really “constrained” by a specific narrative. I know I left a lot of side-quests on the table, but that’s almost a requirement for a Bioware game these days. You aren’t going to do them all and still manage to be a productive adult.

The companions were, indeed, companionable and didn’t cause me undue stress… which, as far as companion AI goes, is a spectacular accomplishment. The enemies were reasonably intelligent and only some of the more obvious boss monsters were pattern-style scripted (which is a disappointment because pattern-style scripted AI looks less intelligent).

All things considered, I enjoyed the hell out of the game. People have told me that DA2 is well worth the time. I just wish I had more of it to dedicate! I have a feeling that it isn’t a game I can finish in a weekend!


Splinter Cell: Conviction — Last Known Position

Thursday, July 21st, 2011

I’ve been playing quite a bit more of Splinter Cell: Conviction. Thankfully, I’ve been finding the game a lot easier than I did early on. Part of it has to do with getting used to the flow of things in a more stealth-based game.

I had noted in my “First Look” post that the enemies do a decent job focusing on the “last known position” mechanic that the game is proud of. To explain, when you are sighted and then go back into cover, the game draws a black and white line art model of your position when you were last seen. This is meant to be a marker of where the enemy thinks you are. The encouraged play is to separate yourself from that point so that you can either hide elsewhere or flank and surprise them. This is a helpful reminder and is only made possible by the fact that the AI has a mental model of your position other than the old fashioned “omniscient” method that games used to use.

Again, they do a good job of searching for you—whether at your actual location or your believed one. They will use cover, approach cautiously, and when the discover you aren’t really there, start to search in what looks like a meaningful way. This is where the problem occurs, however.

The enemies will begin to search the entire area even when they should know
that you are not in those places.

In some instances, when they find that you aren’t where they thought you were, there could be many directions or places to which you could have escaped. At other times, however, there are very few options—or even only one option—that you could have selected. However, the enemies will begin to search the entire area even when they should know that you are not in those places.

One example I saw that was glaring was when I had engaged enemies from a door to their room. I never actually entered the room but rather was firing from the doorway. Eventually, outgunned as I was, it was in my best interests to retreat into the room that I had come from. As I moved away, the line art silhouette marked me as still being crouched next to the door. I watched as they came up to the door to attack where they thought I was. Upon discovering me, however, they exclaimed something or other about losing me… and began searching their own room! They had been watching the doorway the whole time and should have known that I had never crossed to their side of it. The logical conclusion should have been that I was on my side of the door. The result was that I was able to slowly re-assault their position because they were no longer wary of me in the direction of my approach. Good for my survival; bad for my suspension of disbelief.

Good for my survival; bad for my
suspension of disbelief.

The solution to this problem is to leverage “occupancy maps”. The concept has been around for a while but very much came to the game dev forefront when Damián Isla gave an excellent presentation on it at the GDC AI Summit in 2009. The idea is based on the concept of influence maps where the grid space values represent the probability that a target is there. Obviously, if you can see a location, then the target is not there. You then simply spread the probabilities over the areas that he could have gone. By selecting the highest grid value at any one time, you are, by definition, going to the most likely place that the target could be. The result is a spectacular mimicry of how people (and animals for that matter) search for something that disappeared from site.

This method is slightly more memory and processor intensive than simply having a shared (x,y,z) location for the last known position of the player. I honestly don’t know if they had resources to burn in the game. However, I have to wonder if they even thought of trying the approach. I wish they had, though. An otherwise well-done stealth based game would have been that much better for their efforts.

Splinter Cell: Conviction – First Look

Sunday, July 10th, 2011

I’ve been putzing with Splinter Cell: Conviction on and off in recent weeks. As a side note, my use of it has mostly been “off” because I find it frustratingly difficult, even on “normal”. That being said, I’m impressed with the game as a whole.

Too often in games can we do stuff that is completely ridiculous and people don’t even react at all.

One of the first thing I noticed was how “by-standers” react to me. If I’m crawling around on a wall or doing something else “odd”, they will turn and look or making some snarky comment. I like that in a game. Too often in games can we do stuff that is completely ridiculous and people don’t even react at all. In order to facilitate this, I assume that actions and/or locations were simply flagged as “odd” and broadcast to the people in the area.

Similarly, I like how the “Thief-like” environmental triggers can arouse the attention of the bad guys. The voice acting in this case really sells it. They are often very subtle about it, saying things like, “hey… I’m gonna go check something over there.” It could have been done in a more heavy-handed way (e.g. “I heard something over there.”)… but the way they did it almost projects how the AI is actually questioning itself. The minor difference makes you (the player) think more “I need to be more careful” rather than jumping straight to “Oh shit!”

Anyway, that isn’t what I was wanting to write about…

No Rails Here!

Obviously, being the type of game that it is, there are more than a few opportunities to lie in way for people. Early on, there was a point where I was waiting for a guy who was unaware of me. I found myself falling back on old gaming mentalities and trying to detect his “patrol route”. That has long been a staple of games—to the point where it has been ingrained in me.

I kinda just had to mentally will him in my direction.

Needless to say, the baddie didn’t follow a pattern of any sort. I kinda just had to wait him out and mentally will him in my direction. Plenty of that time was spent watching him not move at all. I actually wondered for a while if he was a static set-piece rather than an ambulatory one. He wasn’t… he was just alternating between hanging out and wandering around. It really did a good job of selling the idea that this guard was that reasonable mixture of responsible and bored to tears.

On the other side of the coin, when the guys are actually searching for me, the game does a good job of making them look reasonable in their search for me, but also looking somewhat unpredictable. They don’t do the standard “run right toward where the player should be” gameplan once they lose track of me. That would be too silly. Once they have “lost me”, however, they don’t just go searching around willy-nilly; they keep to a reasonable area. That makes for a lot of tense moments when you are holed up in a corner!

While they are searching, the agents do a good job of looking around with that slightly spooked feeling. They will swing their flashlights around—sometimes in radical changes of direction like they are either surprised by a noise or trying to catch me by surprise. I actually found myself just watching the AI search for me to see what all they would do. (Well… the fact that I was on the outside of a windowsill with nowhere to go was a factor.)

Down in Front!

The combat AI seems solid. Their reactions are decent and they usually take cover fairly well. I don’t believe they use cover quite as well as what I have been seeing in Gears of War 2 (which I am finally almost done with). Sometimes they seem to be on the wrong side of it. Not on my side, mind you… just on perhaps the 90° side of things rather than opposite me.

A guy ran up and hid along the side of the couch that I was crouching behind.

On the other hand, the enemies don’t seem to do as much pointless running around as they did in Gears. They might want to consider more than simply cover points, though. There was one moment where a guy ran up and hid along the side of the couch that I was crouching behind. I was so startled that he would run up to get within point-blank range of me that I was very taken aback.

They don’t seem to use their environment in as dynamic a way as F.E.A.R. did, but it doesn’t set them back. In fact, if they were flipping couches and knocking over bookshelves, it might have looked a little contrived.

You Really Get Around!

The pathfinding is decent (thanks, I’m sure, to the excellent navmesh work of my buddy Martin Walsh). I believe there was one moment early on where I saw someone backtrack 2 steps before doing a turn the other way as if he was on a grid. That may have been something else, however. I just remember noticing it because I knew ahead of time that the game was on a navmesh.

While the local avoidance on the streets seems OK, I think that the “personal space” buffer could have been increased slightly. People coming the other direction weren’t steering to go around me soon enough. That’s minor, though.

When I make Sam stop and reverse direction quickly while running, the animation reminds me a lot of the same action in Assassin’s Creed. I have to wonder if that is a coincidence or not.

All in all, I’m quite pleased with it so far. I do need to pay a bit more attention to the AI in the combat situations. On the other hand, the fact that I’m so distracted with staying alive means that the enemies are certainly doing their job well!

Dragon Age: Origins: Why pick on me?

Wednesday, May 26th, 2010

Another moderate gripe about the AI in Dragon Age: Origins. In the encounters I have had so far, I’ve noticed a peculiar behavior with aggro and targeting.

…the enemy would rush right past my guys and straight toward me.

When I would approach to within aggro range of a target, I was generally in the front of my party (since everyone follows the player). The enemy would aggro, target me, and then rush forward toward us. The problem was, as I stood still—say with a bow, a spell, or because I’m lazy—the initial enemy would continue to rush right at me… in the process running right past my party-members who had moved forward to engage them. That is, the enemy would rush right past my guys and straight toward me. Often this was furthered by the fact that my guys may have selected other targets in the group… meaning that my party-members and the enemy were running right past each other as if they weren’t there. Put another way, it looked like a joust. It even put my pals in the odd-looking situation of having to back-track to get to the fight.

While this wasn’t horribly tragic, it did look silly. It would have been worse had I been a “squishy” like a spell-caster. The expectation that my brutes would rush forward to protect me would have clashed with the idea that they weren’t doing any such thing—really, because they weren’t allowed to do so in time.

While I haven’t played too much with the customizable party AI settings, it really makes me wary of the “charge into battle” selection in that the battle might run right past them.

Suggested Solution?

…the idea should be “I’m attacking those guys over there.”

To me, it would seem that an extra calculation is in order after the initial positioning of the participants. For example, after my guys start to move forward (and likewise for the enemy), re-process who each person is targeting. After all, it is unreasonable for them to initially say “I’m attacking enemy XYZ” when the idea should be more along the lines of “I’m attacking those guys over there.”

This calculation can be repeated at intervals so that targets of opportunity are selected. Instead, it seems that a target is selected and fought “to the death” regardless of whatever else is happening nearby. This doesn’t need to be run terribly often. Perhaps every second or two and then event-based as well (e.g. “my opponent is dead“).

Again, this is a minor issue, but it does break that suspension of disbelief because it just looks wrong. As I mentioned, given the expectations of behavior, in some circumstances it can be frustrating as well. Thankfully, this is something that is fairly easy to fix.

Brütal Legend’s RTS elements

Tuesday, February 16th, 2010

Ok… now I get what Tara Teich is going to be talking about in her AI Summit lecture on Brütal Legend. She is going to be focusing on the challenges that they faced when they introduced RTS elements into a brawler-style game. When I did my first look, I hadn’t really seen evidence of how the RTS/brawler cross-over was happening. I just now played the first major battle (after you set up the stage for the first time), and I really see the mechanism at work.

Trying to manage all the different types of “units” you can summon makes for an interesting gameplay element. What’s more, as a player, you have to switch between solo brawling and teaming up with the other units. For example, you can get together with a group of headbangers and form a moving moshpit. At times, however, you have to make the decision to disband the group and go back to mashing solo, or team up with another group. Oh yeah, and you can still just issue general orders to units you aren’t teamed up with — orders like “come to me”, “stay and defend” or “attack that”. This can be done in addition to the local control as a team.
If it is difficult for me to manage what is supposed to be happening in the grand melee of units, I can imagine that trying to organize it properly from an AI standpoint must have been challenging as well. Because the units need to be nearby in order to be ordered or paired up with, I wonder if the units try to stay close to the player?

But what happens if there are legitimate people to kill that I’m not near? I can see frustration developing if the units were to just go off and attack on their own. Sure, it’s the right thing to do from a tactical standpoint, but the whole point is to give the player the sense of command. In a way it combines the autonomy of RTS units with a little bit of companion AI from the likes of Left 4 Dead or Mass Effect.
The other question is if they are doing combined tactics when they are on their own. I don’t mean advanced stuff like flanking, etc. Rather, are they just picking the nearest enemy or are they spreading out for maximum coverage?
On both of these points, I will have to do some more observation of what’s going on — and that usually means watching one of my kids play instead of doing it myself. They usually don’t argue much when I tell them it’s their turn.

Portal: Sometimes No AI Is Just Fine

Saturday, June 28th, 2008

As much as I hate to admit it, there are times when no AI is perfectly OK. I finally got around to playing Portal last week. I figured I would find out what all the fuss was about. Like many people, I thought it was very amusing and disturbingly addicting. It held my attention. It challenged me. It made me mad at times. It made me feel triumphant at others. I was captivated by the characters (such as they are). And then it hit me.

The AI in the game was pretty much minimialistic. The computer AI was entirely scripted, of course. (But the commentary was more than entertaining.) About the only true “AI” in the game sense was the cute little turrets… and even those had about as much AI as could be found 15 to 20 years ago: an obvious state machine (idle, scan, fire, scan, idle), and some ray casting. And yet the cute little buggers were a perfect match for the game in which they were placed. (A first-person version of Peggle? *shrug*)

And that is my observation of the AI of Portal. Almost non-existant… yet perfectly matched to the game. Anything more would have been distracting away from the main charm of the title.

Well done, folks.

First Encounter with F.E.A.R.

Monday, January 21st, 2008

Ok… this isn’t necessarily going to be a full-fledged review of all of the AI in F.E.A.R. (Monolith studios) Actually, to do that justice may take an entire book anyway. However, I have been playing it for a few days. One of the reasons that I had to get a hold of it anyway (I bought the Platinum Collection) is that I also got my hands on the SDK. It is a special treat to be able to see the actual code that went into making this ground-breaking gem of a game.

Anyway, I had a taste of the game a few months back via the downloadable demo from Gamespot. Even with that brief glimpse I was impressed. Now that I have been able to “dork with it” (research term) a little more, I have found myself saying a few things that surprise me.

“Son of a bitch! Where did he come from?”

This usually occurs when I fall into old patterns of thinking that the enemies are going to generally either stay put or move toward me in something resembling a direct assault. The first time this happened was on one of the more open, but box-laden arenas (which I am realizing was a design decision to show off this exact effect). I was slowly closing on a group of enemies… or at least where I thought they were (more on that later) when I get pegged from behind.

Now this isn’t a “Doom 3″ sort of assault (see my post on the subject) where the game either spawns a monster directly behind me or pops open a completely illogical hidden panel in order to literally kick me in the ass. As I thought about where this dude could have come from, I realized that it was one of the enemies that had been in front of me… but off to one side. He actually had circled around some obstacles and come up behind me. Sure, he probably didn’t realize that I had moved until he reached the spot where he had last seen me – but then rather than stand there, he continued on the only logical way I could have gone until he did discover me – and proceeded to politely pop a proverbial cap in my ass. Score one for the bad guys.

“Get your butt back here, wimp!”

Again, unlike shooters that I have played in the past, I encountered something that was actually almost frustrating in the novelty of it. It was realistic… which actually took some getting used to. When I would engage an enemy, they were just as likely to fall back as they were to move forward. I may take a shot or two at them only to see them walk, run, or dive around corners. They weren’t just going to cover, they were pulling back. This left me in the uncomfortable spot of having to move into a hostile environment where I knew dudes were camping for me… a position that I have always tried to put the enemy AI in. Now I know how effective it is – since I don’t really relish having to be the one doing the hunting.

“I don’t have all freakin’ day!”

Rather the opposite of above, I have tried to fall back to patterns of “agro-ing” the enemy and then dropping back to wait. As often as not, they don’t fall for it. If they know I’m there, they may very well not come for me – especially if I have nowhere to go. I’m used to being quite comfortable simply waiting around a corner with a shotgun to my shoulder ready to multi-perforate the first moving object that shows itself. I wait… and I wait… until I hear “Flush him out!” followed by that delightful ping of a grenade rattling around at my feet. Crap! But do they just come running dumbly around a corner like my cat hearing the food in his bowl? Nope… I gotta come to them.

“Would you show yourself, damnit?!?”

Somewhat related to the above is their stubborn insistence on using cover. Yeah, using cover is cool. We’ve been talking about it at GDC roundtables and message boards for years. For a while, AI programmers were all happy to use preset “cover points”. In a general sense, they looked good… but they were easy to exploit by just being in a place where that specific cover point was not truly a cover point at all. I get a feeling that these assholes would be perfectly comfortable playing hide-and-seek in a round room with a round pillar in the center of it. They seem to process cover the same way that a human does… “can this specific spot be seen by that dude over there?”

It gets really frustrating when I get into peek-a-boo mode with a guy. The enemy may position itself in the shadow zone of a strip of wall, a column or something to take cover. If I peek around one side, he will move a little to keep the cover between us. If I move to look around the other side, he moves also. There isn’t any invisible pre-defined spot that he’s on, he’s simply trying to not be seen. It pisses me off! Game AI is not supposed to act this way!!

“Quit acting like you guys like each other!”

[Cascade this from above...] If Ol’ Chuck there is running to cover like the little bitch that he is (my language gets salty when I’m pwning), do me a favor and let me gun him down like an arcade ducky. Do NOT annoy me with suppressing fire and all that military squad nonsense. He’s got his back turned and I want to blast him before he gets to that box because, once he gets there, we have already determined that he’s not going to show me anything more than the barrel of his gun for the next 20 minutes. You really are not helping me out by scattering an endless cornucopia of metal alloy in my general direction. It really is distracting and makes it awfully hard for me to jump out here in the middle of the doorway and calmly aim down the sight at his weenie little ass. You act as if he’s on the same team as you or something! What the hell is wrong with you, anyway? Sheesh!

“OK… that’s not funny anymore!”

This was my latest little adventure. I finally met up with one of these “Watchers”. They are like freakin’ Spiderman The Rabbit Puncher. The first time I saw one, I thought it was one of the hallucinations again so I didn’t think to actually shoot it until it walked up and bitch-slapped me… and then disappeared into the damn ceiling before I could blink. Uh. Ok… that was odd. Until, from the corner of my eye, I saw him (or his buddy) swing down from the ceiling, off the wall, over the desk, smack me on the butt again, and then perform a similarly frenetic egress.

For the next 3 minutes, I was twitching around all over the place like I was going through the DTs while on LSD. These two dudes were zipping up, down, “over, under, around and through” so as to keep striking me from behind. If I turned and saw them in time, they were just as likely to about face and retreat and replan. I began to realize that “replan” is exactly what they were doing. This wasn’t a pre-set script to whack me when I got to a certain location… they were making this up on the fly (crawl, leap, cling, whatever)! I finally managed to pop one with the shotgun but the other got me. I was too shaken by the fact that they were actually being clever that I had to quit… and start writing.


I’m not sure what I want to do now. Crawl through a billion lines of AI code spread across 100 different AI classes so I know what they are doing… or keep playing so I can experience it more and maybe put myself into a position where I can actually understand some of the more esoteric stuff that I encounter in the code. Right now I’m too shaken up by my encounter with real AI to do either one.

Maybe I’ll go play Doom 3 instead. For some reason, creepy lighting and environments and stupid enemies is not as daunting as generically bland lighting and environments and monsters that actually act like they have a brain for a change.

Congrats to Jeff Orkin and company – I’ll see you next month at GDC. I will be honored and excited to meet you and “talk shop” such as it is. But don’t be surprised if I have a PTSD reaction and slug you before you get a chance flip over that damn table and hide behind it.

(More on F.E.A.R. AI at AIGameDev.com)

Add to Google Reader or Homepage

Content 2002-2015 by Intrinsic Algorithm L.L.C.