AI competance in games - How much development resources go into AI?

This is a question that’s been bugging me the older I get. It seems as focus on multiplayer has grown, the AI in games (pc and console alike) has not kept pace… and maybe… has actually diminished? I realize AI is not only the most difficult part of a game to program, but it’s also a cpu drain affecting performance, but is ironically in geaphically rich games the easiest thing to initially hide from dumb gamers. You can fake AI by putting all your monsters in closets or spawn points (DOOM 3), you can make your AI cheat like mad to make up for deficiencies, or you can script it all, you can recycle the same old AI for many years (Madden), or you can give up and just make your game multiplayer focused (almost everything else).

But I’ve been thinking…

  • How many programmers can realistically work on “AI” at the same time? If you’re writing code, it would almost seem like you’re limited to one superprgrammer for that task.

  • Whatever happened to fuzzy logic? That was such a prevalent idea with supposedly good potential, that died out with the new focus on multiplayer gaming.

  • Have resources devoted to game AI scaled with increasing game development cost? Or has AI been cannibalized for the sake of graphics?

Don’t get me wrong, there are games that do a great job of providing AI competition (to me). The quickest ones to come to mind are Civ IV, Gal Civ I, Gal Civ 2 (close - but the AI’s inability to upgrade needs a little help), Unreal Tournament, Falcon 4, No One Lives Forever 2, Rise of Nations, and my apologies to everything else that’s deserving.

There are some huge disappointments though. Roller Coaster Tycoon 3 (a mess), Gary Grigsy’s World at War - finding out how much AI cheating was scripted into map positions/time slots bummed me out - since I thought it’d be an open-ended WWII game (have to give them credit for what they did accomplish for just a 3 people though). For the amount of money poured into Madden and its marketing budget, the AI is always disappointing in that game as well. And for some reason it seems like EA’s hockey AI has gotten worse over the years instead of better - a strange paradox. In some examples it just seems like all the attention has shifted to multiplayer modes where companies “give up” and say, “If you want competition go on-line”. And the burgeoning cost of development on next-gen platforms is focused on graphics. I’ve heard almost nothing besides bogus megaflop marketing speak about next-gen AI. Plus with on-line modes becoming so integrated into next-gen platforms does that give many developers/publishers the green-light to say, “Just wow 'em with graphics and tell 'em to go online”? The very thing I like best about gaming… not having to deal with other humans is being side-lined.

With that in mind, my last 2 questions are?

  1. Is there a market in the games industry for a programmer who specifically specializes himself/herself into just AI? As in, neglects everything else, and only does AI.

  2. Has anyone done work on modulizing AI (ala Havok physics), or is it too abstract (too program specific) to take any amount of AI from one program to another (outside fps’s)?

I’ts ironic I should wonder about this now, with the wealth of great strategy games… but I think when I stumbled into some problems with the generally excellent SW:EAW and GC2, it got me wondering how realistic our expectations are. After all, stuff like this is much more complicated than Chess, yet to challenge the most intelligent humans in one game it takes Big Blue (though I can be beat by the crappiest flash-based chess game - hehe).

The team I’m working on right now for a next gen game has nearly 20 programmers dedicated to AI.

  • Whatever happened to fuzzy logic? That was such a prevalent idea with supposedly good potential, that died out with the new focus on multiplayer gaming.

It was a buzzword. The actual implementation of so called ‘fuzzy logic’ is an extremely simple thing to do, and has been used in all but name in games for a very long time.

  • Have resources devoted to game AI scaled with increasing game development cost? Or has AI been cannibalized for the sake of graphics?

Can’t speak for everywhere, but where I work, it more than definitely has. For instance, our AI team is two times the size of our graphics team. And the graphics team has to work on multiple platforms.

  1. Is there a market in the games industry for a programmer who specifically specializes himself/herself into just AI? As in, neglects everything else, and only does AI.

Holy shit yes. A simple search on gamasutra would’ve answered your question here. And that has been true for as long as I’ve been in the industry (over six and a half years).

  1. Has anyone done work on modulizing AI (ala Havok physics), or is it too abstract (too program specific) to take any amount of AI from one program to another (outside fps’s)?

The problem with this is that, as you say, it’s too program specific. Not only that, but AI is heavily dependent on what how your collision detection functions… function. And because of the CPU requirements, it means that you can’t generalize it or it would be way too slow. Maybe 5-10 years down the road, but certainly not now.

MASA made a “DirectIA” but it was pretty much abandonned when Conflict Zone bombed; they forgot it was a game and the AI was too good, the player had nothing to do.

Dunno if you can answer this Charles, but are programmers running into any problems coding AI on next gen consoles? The smaller cache, and no out of order execution would seem to make this more difficult.There were grumblings when the specs came out, and I wonder if that played out.

Charles - that’s really cool to hear.

Draikin - interesting. Sounds like the same thing that plagued Dungeon Siege I - not much left for the player to do. I was thinking more of comptetive AI however.

We have a couple of heavy optimization guys scrutinizing the code all day long to find ways to make things faster. Right now, as it stands, they aren’t dictating what AI can do, or limiting it. But they do try and let the AI guys know how to do things a faster way.

Excellent questions, and thanks for the perspective, Charles – I’ve been wondering some of the same things.

In both Civ IV and GalCiv II the AI developer was also the designer I believe.

So in some games, it’s taken very seriously.

I bet in most titles it’s easier and cheaper to add multiplayer for people who want a challanging game than to make strides above and beyond what’s already being done for AI.

Actually, the problem I find it that the AI can usually clobber me if I try to play at the higher levels. AI is good at min-maxing, and I find it boring. :-/

What I wish games would do, rather than just try to make the AI powerful, is improve/extend the illusion that you are playing in a living, breathing world. Graphics are part of it, but even beautiful grahpics with Morrowind-level NPCs breaks the illusion completely.

The other thing most games need is better UI design.

That’s why some friends and I say that the holy grail is not artificial intelligence – that part’s easy. It’s the artificial stupidity that’s hard.

To me, AI is not about hard, but clever. We all want clever AI that appears creative and “human”.

The problem is that a human makes mistakes, but when an AI makes mistakes, it’s considered “stupid”. The trick is to make the AI stupid in some ways, but clever in other ways. Pathfinding is pretty much solved, and humans are good at it, so there’s no excuse for a poor pathfinding AI. On the other hand, most mortals have imperfect aim, so an aimbot is just frustrating.

Anyhow, good to hear that more resources are being devoted to AI development these days; circa 1999 it was uncommon to have more than one programmer working on AI (much less as a full-time responsibility).

  • Alan

I know. I wasn’t doubting that for a second.

I still remember when I discovered HOMM’s (2 or 3) AI was 90% based on cheating on normal difficulty level. I was crushed when it dawned on me (I’d encircled the last of the AI’s castles) the AI had terribly limited capabilities without massive infusions of free resources and money. It was like, what’s the point of this game now? When I learned HOMM IV failed to fix this problem I didn’t buy it. I don’t mind higher difficulty levels getting bonus’s… but sheesh ALL of them except the super-novice-beginner level?

Clever AI? Yes… But I have to admit, I’d rather be forced to be the sole creative outlet to outsmart good solid AI, than have development time diverted on cleverness instead.

Qenan you wrote

extend the illusion that you are playing in a living, breathing world.
I thought Space Rangers 2 did that well. And as far as UI design, I really thought Gal Civ 2 and Civ IV have fantastic UI’s… while Master’s of Orion III was the anti-thesis of usable UI design. Getting good data in that game was… painful.

Brad, somehow I’m worried you may have misinterpreated my post. Civ and Gal Civ are the shining examples of what’s right. My questions were geared towards where other developers put those resources since 99% of what’s chimed about is graphics and multiplayer…
Ironically I feel like we’re in a great time in cmputer gaming with more strategy being implemented in our RTS’s, the superb quality of strategy titles we have, but in other games there seems to be a void. DOOM3, Quake? With the work Epic did with Unreal Tournament, I was surprised to have all this emphasis on graphics, physics, yet so little on AI. Even NOLF2 had seemingly better AI than DOOM3. The other question mark was graphic-intensive sports games. There’s a lot of “stuff” added to sports games (player faces seem to get the most focus with every sports game released), but the capabilites of even the off-season AI seems to have stagnated. All the added options for coaching modes have really done nothing to increase the challenge of the game. It’s just given you more “stuff to do”.

Pathfinding is pretty much solved
I have a bunch of rts’s that disagree with that statement :(

If there is one part of AI that doesn’t get enough attention, it’s pathfinding. Pathfinding itself as a problem is long solved… however, implementing it isn’t as trivial as a lot of developers mistakenly believe. Developers will hire some kid fresh out of university and assign him pathfinding because no one else wants to do it, and then it will suck.

Realistically, good companies hire PHDs to work on their pathfinding systems. And sometimes, game complexity just scales faster than the pathfinding system does. It’s really not a fire-and-forget problem.

I take it you haven’t played F.E.A.R.

Or SWAT 3 and 4.

Or Half-life 1 and 2, for that matter.

Yup, yup, yup, yup, yup - nope haven’t played FEAR yet. I wasn’t naming all fps’s with good AI, just the ones that were most memorable. Don’t ask me why NOLF2 had more memorable AI than HL2… but then again, outside of DOG (which I loved) HL2 AI was pretty unmemorable. Doesn’t mean it wasn’t great, just didn’t leave as much of an impression. I remember spending a lot of time in NOLF 2 watching people just do their routines, then pulling them away. That game had kick-ass character.

Because the NPCs in NOLF2 had personality. Even the grunts you killed.

I agree with you. HL2’s AI wasn’t much better than HL1’s–if at all–but then HL1’s was no slouch.

I remember spending a lot of time in NOLF 2 watching people just do their routines, then pulling them away. That game had kick-ass character.

Yeah, if by “character” you mean cleverly written random NPC exclamations. Since NOLF2 was tongue-in-cheek, it could get away with a lot of things in that area that would have seemed way out of place in HL2. But I don’t really consider the dialogue as being that closely tied to the AI. Sure, the dialogue has to be appropriate to the situation and all, but really, when we’re talking about AI in an FPS, aren’t we talking more about the AI’s physical behavior–how it dodges, or flanks you, or whatever? (And don’t get me wrong; NOLF2’s AI was good in that department.)

if you ever got a “posse” (get three ais to follow you) in hl-1, they would “talk” to each other with their stock phrases. the conversations were close enough to making sense that it was probably programmed in. my faves were 2 barneys with a scientist. you were most likely able to get a group this big in the area where that headcrab zombie walks through an upstairs glass catwalk and falls to your level.

some of my fave ai moments in swat three was when a suspect ran in and would pick up a dropped weapon, either theirs or another suspects.