Does True A.I. Exist in Video Games?

Column, Gaming | B.T. Robertson | December 5, 2009 at 6:05 pm

Before I delve too far into this op-ed piece, I want to make something perfectly clear: I am not a programmer, nor am I involved in any higher form of computer science, computer languages, or modern A.I. theory. But I dare to speak on these things because I am a gamer, a writer, and have experienced the results of A.I. numerous times in my 32 years at the controller.

AI_1

A.I. – Artificial Intelligence…the imitation of life, choice, and behavior. A.I. is programmed into almost every aspect of a video game, from the way non-playable characters (NPCs) act, interact, and react in the world around them to the paths birds fly across the sky. As video games become more and more complex, A.I. systems follow suit. More microprocessors and raw processing power means additional layers of computation, random patterns, and simulations of emotional responses. But does A.I. boil down to basic pre-programming, void of emotion and reasoning? Or can the video game some day give us a real emotional experience just like another human can? The short and sweet point of this article is to spark a discussion. I’m coming at it from one angle, but if there are any computer science gurus out there who have worked on A.I. algorithms and programming, I’m inviting you to speak up and add your knowledge to this discussion.

The goal of this article does not include upsetting or offending programmers, because as I stated above, I am not a programmer and can only imagine the complexities involved with such systems. Not all A.I. systems are created equal, however, and in video games it seems like there are no standards in place.

For example, there is a popular physics engine known as the Havok engine. For Uncharted: Drake’s Fortune, developer Naughty Dog admitted they used their own proprietary physics engine, but for Uncharted 2: Among Thieves, they switched to the Havok engine “standard” because it allowed them to do so much more without reinventing the wheel. Apply that to A.I. and I must ask…why isn’t there a standard A.I. toolset or system that developers can implement? Is it possible? Sure, there would still need to be customization and such, but what’s preventing a baseline system of A.I. that has proven itself to work realistically at all levels of difficulty? I will note here that Havok also has an A.I. engine product, which appears to offer the same baseline standard as their physics engine.

Valve’s Half-Life shooter game revolutionized the way A.I. opponents reacted to the player, and the engine continues to impress gamers to this day in subsequent installments. But then there’s Infinity Ward’s A.I. system in Call of Duty that receives constant criticism, even (and especially) in their latest, Modern Warfare 2, where it’s worth noting that enemies will literally turn their backs to the players out in the open, not toss grenades back, and basically pull all sorts of nonsense that comes off as cheap, cheating tricks rather than actual “intelligence.”

And I must complain a bit about the term “A.I.” as it’s used in video games versus academia. In the latter, the field of A.I., to my understanding, is much more complex than in the former. Academic A.I. in its truest definition deals with machine learning, the ability to reason and to learn, application of logic to real-world scenarios and conditions, robotics, etc. In gaming, it seems that A.I. does the lowest possible set of surface illusions to enable the game to be enjoyable and nothing more, dealing with scripted events rather than portraying true “intelligence.”

AI_2

This finally brings me to some game examples…more like genre-specific examples. I intended on calling some games out in full detail, but I decided against that for obvious reasons. Instead, I wanted to discuss the differences in A.I. systems between genres like Adventure and First Person Shooter (Action genre). FPS games are almost always more combat focused than adventure games, even though adventure games can include gun play elements. Combat A.I. systems are a different beast. I refer to this article I found as a reference, which is a fantastic read for those interested: http://ai-depot.com/GameAI/Design.html. In this piece, the author notes the following:

Combat AI’s have plenty of room for improvement before they even get closed to replacing human opponents. Even though combat AI’s can dodge incoming fire and shoot like a pro, there are four major things that human combatants offer over AI: knowledge of their environment, efficient use of teamwork, the ability to “hunt,” and survival instincts.

Is this why multiplayer modes in FPS games are wildly more popular than any single player campaign offering? I think the answer to this is most vehemently “Yes,” or even “Hell yes, B.T.!” It stands to reason that human players prefer human opponents. Honestly, with my experience with FPS, this is the biggest factor in why I don’t enjoy them as much. Multiplayer is fun, but it’s rarely a deep and lasting game experience for me. That’s personal opinion and preference, I get it, but playing through the storyline in FPS games is an exercise in frustration because of lackluster combat A.I.

With combat A.I. systems, a tougher difficulty is represented by tougher enemies, less health for the player, and impeccable accuracy for the opponents, not to mention feats of shooting no human could ever hope to achieve (using a close quarter weapon from 400 yards away while running, for example). So does a tougher difficulty setting simply mean that the A.I. system cheats? In a word: yes. Game developers, because of time and money, simply take the baseline A.I. engine that powers the normal difficulty setting, and make small tweaks and then say it’s “higher difficulty.” I don’t know about you, but I’d rather be challenged by smart A.I., not cheap A.I. Flank me, use pack tactics, toss grenades into my hiding spots if I decide to hang back and camp…but don’t shoot me from impossible angles while on the run from a distance that would rival any human potential every single time.

AI_3

But do all games exhibit this level of what passes for “intelligence”? No, they don’t. Games like Uncharted and Uncharted 2 are challenging on Crushing Difficulty, but the frustration level was 150% less (for me). Perhaps it’s the nature of the games, sure, but ultimately I think it’s because of developer prowess. Uncharted is a series solely dedicated to the single player experience, while Call of Duty is not, or at least isn’t any longer (I argue that it used to be). Some will say that my skills are in question or that I suck, and that’s fine, I will accept the fallout from this. I don’t mind a good challenge if you’re pitting my wits against yours (the developers’), but if you’re pitting me against try-fail cheat scenarios with less health and insurmountable odds, that’s when I squawk. I’m not a programmer, I’m not an A.I. algorithm creator, but I believe there must be a better way. What do you think?

Related Entries


About B.T. Robertson

B.T. Robertson is a writer, published author, and avid gamer, and has been playing video games his entire conscious life. Currently, he resides in Pittsburgh, PA with his family and is awaiting the launch of his third fantasy novel. Visit him online at www.btrobertson.com.

14 Comments

  1. Damon Cap says:

    I agree about re inventing the wheel when it comes to A.I., if there was a common package being used in open source even that everyone could contribute to I think we would see something that actually tricked us into A.I. I mean with our tools true A.I. does not exist really just how complex can you get and how good can you guess.

    What is considered A.I. can often be said to being cheap with extra speed of the computer players or things like that. Open Source Package of A.I. where are you? I mean some of the best FPS games back in the day used the Unreal engine no need to reinvent something that already exists.

  2. Ai says:

    I am also not a programmer but rather a writer/gamer, like yourself. A little over two years ago (Aug 2007), I wrote a piece about a series of gauges (all interlinked): http://aiwritingfic.livejournal.com/314119.html

    I actually have a series of posts on this: http://aiwritingfic.livejournal.com/tag/public:+a.i.

  3. Good article, Ai, and I’ve also had some ideas about how an A.I. engine should work.

    For example, look at human decision making in any given stress situation, such as war. It’s a split-second decision made from a large to infinite set of possible decisions. In effect, the human brain reasons as quickly as possible, then decides on the best decision it feels appropriate. However, these decisions DON’T include the silly or unreasonable. For example, would a human being ever run backward toward an enemy combatant? I would certainly hope not, even though it is a possible choice that one could make. See? There’s the difference. The human can reason their decisions, eleminating the unreasonable at the base level. Computers can’t, unless the unreasonable choices are left OUT of the possibly scripted outcomes.

    In games, it seems that [stupid] AI engines compensate by allowing 100% accuracy versus allowing realistic poor decisions made by the opponents controlled by the AI. But then again, there are many times in games like Call of Duty where the AI behaves so unrealistically that one can’t imagine the engine doing much other than confusing itself.

    I think an AI engine is nothing more than if/then/else statements, all combined with a database table containing a list of possibly outcomes and choices.

    This is a layman’s term example:

    “IF player Alpha engages opponent Delta within 10 feet, THEN retreat to nearest cover point Zulu, ELSE (which assumes cover point Zula isn’t available or occupied) switch to weapon shotgun and engage until dead.”

    Or something like that. Again, I’m not a programmer, but I do know that the complexity is far above what I’m describing above. But to me it seems that AI engines in FPS games make the dumbest of mistakes that cause one to scratch their head in utter disbelief, which says to me that even the lowest level parts of the AI system is flawed.

    Sure, we have come a long way, but today there’s definitely a stalemate going on where laziness is outweighing the push to drive the technology forward. Make the buck, do the bare minimum, move on to the next one. Enemies duck for cover, shoot while on the run, flank, move in packs, and do a lot of things that humans would do, but I think there needs to be a lot more work done before games exhibit a true sense of AI beyond beefing up the opponents with more health, giving them impeccable accuracy even while running full tilt laterally across uneven terrain, etc. :)

    Ai, thanks for sharing your info. Excellent stuff.

  4. AiAi says:

    Always happy to help. Have you ever played Sims 3? I think the AI in that game is actually really close to what I’ve been advocating in my posts (there were two follow ups in which someone e-mailed me and I mailed back, and we hashed things out a lot).

  5. No, I’ve never played Sims 3. But there again is a big difference because the AI engine in Sims 3 is probably vastly different than the one running the combat in, say, Modern Warfare 2 or any other FPS. Combat AI requires split-second learning, where the Sims’ engine could learn slowly over time based on user inputs and such. Right, or am I off-base on that?

  6. Klay says:

    I AM a programmer, and I find it a little amusing that so many people (not just commentors here) have the idea that developers are just being lazy when they use increased accuracy or more hit points to compensate for an imperfect AI.

    First: AI–even gaming AI–is COMPLICATED. AI systems generally involve balancing an agent’s needs and goals. Goal 1 might be “Minimize the amount of damage taken”, while Goal 2 is “Protect the general”, and Goal 3 is “Don’t lose sight of the player”. It’s quite possible for an agent to find itself in a situation like the donkey between two carrots. If it can’t eventually make the arbitrary decision, it starves. If the AI gets in a situation where its goals pull in two (or more!) different directions, it might get stuck or oscillate back and forth or do something really weird like running backward toward its enemy.

    Second: solving a problem like the one I mention above means changing something in the system. And changing a system that *mostly* works almost always introduces new problems elsewhere (called regressions). Say I solve the first problem by adding in a random “decider” factor to push the agent to commit to one goal. How do I then know when to apply this factor? What if this decision then gets stuck in the same oscillation (the 50-50 point)? Do I keep adding in new factors?

    My point is, game developers (the programmers themselves, anyway) really want to make the best possible AI. It’s probably not laziness, but lack of funds that prevent the perfect AI. If developers waited until the AI was perfect to release a game, then we would rarely if ever see any games come out.

    Finally, AIs generally rely so much on specific domain knowledge in a game (knowledge about the racetrack, or the types of armor, or which guns to choose for which situation, or precious a Xenomium stone is) and the specific game mechanics that trying to write an all-purpose standard AI system multiplies the difficulty tenfold. Physics is physics, after all. We understand it well enough to have written stanard engines. But who understands intelligence?

  7. Klay, I didn’t say all developers were lazy, but if you don’t think that’s a factor, you’re dreaming. :) I say that nicely. I didn’t say “all” developers are lazy, and I cited several times that I am not a programmer and, as such, have no idea how intricate it is. That’s why I’m bringing it up. There’s been little to no change in how rich an AI system, mostly in combat, should be, and in today’s day and age, we’re still seeing the same silly stuff in some games (again, not “all”) that we saw last generation. That’s all I’m saying, but as a gamer, I have no way to gauge how much progress is being made.

    Which brings me to a question I raised in my original post that has yet to be answered: Does a standard, like Havok’s AI engine, need to be leveraged like Havok’s Physics engine? Would that help curb costs for developers and give them a standard set of tools to assist with AI development?

  8. Damon Cap says:

    Ok I was a bit general in my first comment. Klay don’t you think it would be possible to have an open source FPS AI code though? Yes I get the fact that soldier AI code is not the same as Car driving AI, but for FPS i think something could be done like the engines where they are tweakable.

  9. Klay says:

    Actually, good programmers *are* lazy: (http://blogoscoped.com/archive/2005-08-24-n14.html).

    “…but if you don’t think that’s a factor, you’re dreaming.”

    I’m not sure where the “nice” part of that comes in, (or how the smiley makes it nice), but it’s really not that important anyway.

    The point that I was trying to make is that your complaints about lack of progress in AI are complaints about the opportunity cost decisions being made at the game company. They could spend less on graphics, or artwork and assets, and spend more time on the AI. But the difficulty is such that you probably get a lot less bang for your buck. Is the developer going to choose to publish the game with 10 more playable levels, or one where the AI makes stupid mistakes 5% less of the time?

    Furthermore, LOTS of progress has been made in the past several years. But it’s mostly in making AI more stable and less error-prone, and not so much about cool new features. One significant counter-example is how the zombies move in Left4Dead. A significant amount of work went into making them climb over barriers and leap from cars. Zombies navigate in a whole new spatial dimension! In fact, you might be noticing stupid AI mistakes even more, just because they happen less often and so stand out more.

    Finally, I think it’s possible to work out some standard algorithms for discrete tasks, like seeking cover under fire, navigating from point A to point B, or sneaking up on a player. I’m sure there are already standard ways to accomplish these tasks. But as soon as you add some feature that makes your game stand out, like stealth armor, superpowers, teleportation, destructable environments, giant monsters, or what-have-you, your whole AI has to change to take these new things into account. You can no longer simply hide behind a rock with a 50-foot tall beast can see so much more of the playing field, for example.

    Plus, physics engines mesh very naturally with the way 3D graphical objects are represented in code. Points, connected by lines define faces which make up solid volumes. Apply simplified materials to those volumes, define your physical constants and rules, and you’ve got a physics engine. There’s no standard for defining agent behavior, however. You might use a set of if-thens (if you’re feeling masochistic), or you could use a heuristic system, or an expert system, or a neural network, or a Minsky-an framework setup, or some combination of these. But there’s no standard way to define “knowledge” in a game, and hence no standard way to manipulate it.

    Asking why game AI isn’t significantly better is like asking why cars don’t run on happiness and dreams: nobody knows how to do it yet.

  10. Klay says:

    Just re-read the article and noticed that you ARE aware of the opportunity cost: “Game developers, because of time and money…”

    I just don’t think you’re aware of how difficult it is to squeeze more intelligence out of the AI.

  11. I’m not aware of how difficult it is, that’s why I asked. That’s why I wrote the article. That’s why I keep saying over and over that I’m not a programmer, yet have these questions. Are we not allowed to ask questions about space if we’re not an astronomer? You seem to be taking things way out of context, but I do appreciate your additions to the discussion.

    So my question now becomes…do we want prettier-looking games, or smarter games? If it’s an issue of money, as you seem to boil your argument down to – which is exactly what I was getting at in the first place – then why spend all the money on a pretty-looking graphics engine with all these great physics and particle effects, but have enemies running backward at you, or running full tilt laterally and hitting the player with perfect accuracy, or any number of silly things that occur? That’s all I’m asking. As a gamer, I don’t care how much the game costs to develop…I get the same cost at the counter regardless of how much the game costs to make. But for that fixed cost of the game, I think it’s safe to assume I want a great experience. Some games don’t deliver, some do…I’m querying on the reasons for that, and also for some programmer perspective. Why did Infinity Ward upgrade the graphics engine from CoD4MW1, yet the AI still has the same issues it had before? Is that cost, or laziness? I’m torn, hence my questioning. I never said it’s 100% laziness, but again, I’m not the first person to question decisions made by developers in this realm.

    I wasn’t picking on anyone. This discussion has been going on for years now, so it’s obviously a sticking point with gamers, and probably programmers as well. I’m sure if you could design the next latest and greatest AI engine, you’d be heralded for your efforts.

  12. Mike Archbold says:

    I haven’t done much gaming but have been interested in AI for a long time. Check out the work that has been done on Artificial General Intelligence, Goertzel et al.

  13. Klay says:

    Ok, I know I’m coming to your article and commenting, and I appreciate being given the opportunity to do so.

    The last sentence of my previous reply was poorly-positioned in my response. It was really meant to be read as “you ARE aware of the opportunity cost, but you seem to be underestimating the difficulty, hence your cost-benefit analysis is off”. It’s my mistake that made it sound like I was trying to be contentious.

    That being said, it seems that you either aren’t reading my responses or simply aren’t convinced, because you go on to ask questions that I think I’ve already given decent answers to.

    You asked (again): “…then why spend all the money on a pretty-looking graphics engine with all these great physics and particle effects, but have enemies running backward at you…?”

    Because game companies get lots more bang for their buck this way. And because pretty graphics are more easily marketable than better AI. Mostly because hardcore gamers spend lots of money on high-end graphics cards, so they feel that they need to spend their money on prettier games so they can justify the expense. I guarantee that if some hardware manufacturer were somehow able to create a dedicated AI card, then game makers would be driven to improve AI, because gamers would want to justify buying the expensive card.

    As a gamer, you shouldn’t have to worry about what it costs the developer to make it. But it’s simply not true that all games cost the same aat the counter. You’re neglecting the hardware cost in buying new gear that can run more sophisticated games.

    As to why some games deliver while some don’t: some game companies are simpy better than others. They have a better talent pool, more investors, or better management and so are able to parlay their limited resources into better games. I’m not sure why this is an interesting question, or whether you think there’s some deeper answer than this.

    Finally, after doing a tiny bit of research about the AI in CoD4, it appears that the AI actually was pretty decent. It got “runner-up” and “finalist” status in two of the five categories in AIGameDev.com’s 2007 Awards (http://aigamedev.com/open/articles/2007-results/). I’m sure it has its flaws, but it looks like these may be things that you find a lot more disturbing than most other players.

    I still don’t understand why you’re stuck on the idea that laziness is a factor. If a developer decides to put money into an area where the return-on-investment is better, that’s not laziness, that’s good business. If it turns out that players decide to stop buying the game because the AI is so awful, then it might not be such good business. But until that happens, the AI is “good enough” which is all that counts for the decision-makers at the larger game companies.

  14. I think you’re looking at my comment about the game cost from strictly a PC gamer perspective. I should’ve clarified. I’m mostly a console gamer, so in that sense the games cost exactly the same, give or take $10 or so at most. Sure, PC gamers have hardware contentions to deal with on top of it, so they’re more prone to buying the latest and greatest graphics card (or a separate Physix card, as it were). I agree with you on that one, but I was mostly talking about console gamers who only have the basic console hardware cost to play all the games, which remains fixed throughout the hardware lifecycle.

    I’ll concede the argument at this point because what I’m saying isn’t on the same page as what you’re saying. I completely understand numbers, business, and the whole bit. If I were a 14-year-old writing a strict opinion piece on this, perhaps it’s worth explaining. But I’ve seen CoD4’s awards, I realize that some game companies are better than others (a fact I argue constantly), etc. But that doesn’t mean that, as a gamer, I don’t have the right to wonder why we still see the same cheap parlor tricks being pulled in some games, especially games that depend mostly on combat AI systems. It’s simply a fact that they’re flawed in many cases. Now whether that’s my perception, over-analyzing, or whatever, it’s still a topic that burns up forums non-stop and certainly not an opinion I share alone.

    In fact, a colleague and I were discussing Modern Warfare 2 this very morning, over a cup of Joe. He has the 360, I have a PS3, and both of us were laughing hysterically because we both had almost identical feelings when playing through the game on Veteran difficulty (I nabbed the Gold Trophy for that a few days ago, in fact). But at almost EVERY juncture where I felt the AI was just over-the-top crap, and pulled every dirty trick in the book to create the illusion of “difficulty”, we were both exactly on the same page. That’s one gamer to another, with two completely different consoles and who never talk outside of work. That’s as unbiased a test as one can have.

    I really am enjoying your thought-provoking knowledge, Klay, and you’ve really added a ton of worthy banter to this post. That’s exactly what I was going for, but don’t think you and I as polar opposites here. I also love to play Devil’s Advocate, which any article writer knows is a fun role indeed. I get your points all too well, and I will be digging into this even further for better understanding.

Leave a Reply