Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Programming Books Media Book Reviews Entertainment Games Technology

Artificial Intelligence for Computer Games 250

Craig Reynolds writes "In his recent book Artificial Intelligence for Computer Games: An Introduction , author John Funge takes us on a whirlwind tour of techniques from the literature of academic AI research and discusses their application to the nuts and bolts of game AI programming. While some of these topics are quite advanced, the text remains easily readable and grounded in what the techniques mean to real game programmers developing real game AI." Read on for Reynolds' review.
Artificial Intelligence for Computer Games: An Introduction
author John David Funge
pages 160
publisher A K Peters
rating 8
reviewer Craig Reynolds
ISBN 1568812086
summary Written for game AI programmers, this book provides a practical introduction to advanced AI techniques and practices for constructing sophisticated non-player characters.

Funge's background includes both academic AI research and commercial development of game AI technology. This has allowed him to write a refreshingly practical book for the game AI programmer which will also expand the reader's knowledge of AI. He presents advanced AI research in a way that is meaningful to the working game AI programmer. Non-player characters (NPCs) are the focus of this book, although it touches upon techniques applicable to other kinds of AI. Funge begins with a simple NPC architecture, then goes on to consider how they act in their world, perceive and react to their surroundings, remember their past experiences, plan their actions, and learn from the past to improve their future behavior. In addition, Funge hopes his book will contribute to a "common framework and terminology" to promote better communication between practitioners interested in game AI, leading to better interoperability for their software. (Please note that John Funge is a friend and former coworker of mine. I was pleased to accept John's invitation to review his book.)

The field of Artificial Intelligence has been actively studied since the 1950s. In that half century many useful techniques have been developed and applied to a broad range of scholarly and commercial applications -- most quite serious and sometimes a bit dry. In contrast, today the most economically significant application of AI is in computer games. This commercial application motivates today's students to study AI and drives a good deal of academic AI research. Modern games have incredible graphics and their animation technology is becoming very sophisticated. As graphic animation increasingly becomes a solved problem, more and more attention is being paid to game AI. It seems likely that the next few years will see a tremendous investment in game AI technology leading to significant improvements in the state of the art.

As I read Funge's book I was struck by how oriented it was to the interests of AI programmers working on commercial games. Certainly the discussion focused on the practical rather than the theoretical. (There are many asides, footnotes and citations of the academic literature for those with an interest in pursuing the theory.) More concretely, the text is peppered with fragments of C++ code. A working programmer who visits the academic literature is often faced with the daunting task of converting prose, equations or breezy pseudo-code into something suitable for compilation. If a reader of this book does not follow a bit of the discussion, a glance at the nearby C++ code listing will usually set things straight. I have it on good authority that functioning source code for the examples in the book will appear on the www.ai4games.org website "soon."

The book is divided into seven chapters (Introduction, Acting, Perceiving, Reacting, Remembering, Searching, and Learning) plus a Preface, two appendices, an extensive Bibliography and an Index. The chapter on "Acting" introduces the simple game of tag used as an example throughout the book. It further sets the stage by describing the principal components of the game engine and the AI system. The third chapter, "Perceiving," introduces percepts -- the formal framework used to encapsulate and manipulate an NPC's awareness of its world. In many games a key concept is filtering out information which is available in the game state but should not be "known" by the NPC. Chapter 4 describes reactive controllers. Funge uses a very strict definition of reactive -- informally, it means a non-deliberative controller, but in this book the term is used to mean strictly stateless. This distinction has a practical consequence since a stateless controller can be shared among multiple NPCs. (Yet I wondered how important this was in practice. That point was not explored in any depth, and a "slightly stateful" reactive controller can be very useful.) The chapter on "Remembering" introduces memory percepts, mental state, beliefs and communication between NPCs. The sixth chapter covers "Searching" -- through trees of possible future actions, often referred to as planning. The extensive treatment of search includes both examining the host of options that are available to an NPC at each juncture, as well as reasoning about the interaction of one NPC's behavior with another, known as adversarial search. The final chapter covers "Learning." It looks at both offline learning (which happens before the game is shipped) and online learning (happening during gameplay). The first is merely an aid to game development, the latter promises NPC that can adjust to the player's skill and style of play. Online learning present many more technical challenges. In fact, my first impression on reading this section that it was less practical than the rest of the book because of the difficulties of online learning. However, from the description of this GDC 2005 lecture, it appears that Funge and his colleagues have made significant progress in this area.

I recommend Artificial Intelligence for Computer Games: An Introduction to commercial game AI programmers, as well as other game programmers and designers who wish to learn more about this area. Because of its sound academic underpinning, the book will also be of interest to students of artificial intelligence and to professionals in related areas such as agent-based simulation and training.


Reynolds is a Senior Research Scientist in the R&D group of Sony Computer Entertainment America. His interests center on modeling behavior of autonomous characters, particularly steering behaviors for agile life-like motion through their worlds. See his page on Game Research and Technology. You can purchase Artificial Intelligence for Computer Games: An Introduction from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived. No new comments can be posted.

Artificial Intelligence for Computer Games

Comments Filter:
  • by bigtallmofo ( 695287 ) on Wednesday January 26, 2005 @03:27PM (#11483595)
    As far as I'm concerned, the state of artificial intelligence could advance no more after the development of Microsoft Office's PaperClip helper.

    That bendy little guy always knows exactly what I'm trying to do and provides timely, topical help on the subject. I mean, every time I type:

    Dear :

    That little artificial lifeform knows I'm getting ready to type a letter and offers to give me a hand. What a wondrous age we live in.
  • by Anonymous Coward
    In video games...I've always preferred fighting and learning pattern-based enemies - like the oldskool shooters and platformers, over AI. I dunno, maybe I'm too oldskool or something.
  • No thanks. (Score:5, Funny)

    by Mononoke ( 88668 ) on Wednesday January 26, 2005 @03:29PM (#11483609) Homepage Journal
    I've already been eaten by the Grue. I'd rather he not be smart enough to invite his friends to watch, point, and laugh the next time.

    • I've already been eaten by the Grue.

      Indeed.

      I hear Grues are taking lessons from Ravenous Bugblatter Beasts, and have learned that if they wrap a towel around their head, it's pitch black for you, too.

  • by Evil W1zard ( 832703 ) on Wednesday January 26, 2005 @03:29PM (#11483614) Journal
    Because I want those crushbone orcs to think about how I might feel emotionally before they fire some magic lightning at me or club me. Or they can say "Well he's level 65 and I'm level 10, so maybe I will not chase after him today!"
    • by Tackhead ( 54550 ) on Wednesday January 26, 2005 @03:36PM (#11483710)
      > Because I want those crushbone orcs to think about how I might feel emotionally before they fire some magic lightning at me or club me. Or they can say "Well he's level 65 and I'm level 10, so maybe I will not chase after him today!"

      Look on the bright side: in your typical MMORPG, NPC AI is probably ten times sparter than the typical PC AI.

      (All you have to do to turn a single-player game like Morrowind into a MMORPG, for instance, would be to give the Cliff Racers the personality of Crassius Curio, and to replace most of the dialog trees with strings like "u got ne gld 4 me" and "asl? u wanna s3x0r?")

      • I think "sparter" is an excellent way to describe the current state of NPC AI in MMORPGs.

        AI or not, seemingly-intelligent pre-scripted events thhat many games have put a lot of effort in (ie. Halflife, World of Warcraft, and presumably Half-life 2...) are more than worth it in terms of forming atmosphere.

        Could use a little work in adapting to different situations though... Like, pre-scripted semi-flexible events. Mmmm.

        - shazow
    • Remember Noober from the original Baldurs Gate game who used to follow you around and keep asking questions like "Hey whats that big weapon for?" They should have definitely implemented some better AI there so he could figure out that he is ultra annoying and likely to get bludgeoned to death by you.
    • Robot on fire: "WHY? Why was I built to feel pain!?"

      I love the Simpsons.
    • by Pausanias ( 681077 ) <pausaniasx@ g m a il.com> on Wednesday January 26, 2005 @05:12PM (#11484824)
      Some of you might be aware that the PC/Mac/Linux Game Neverwinter Nights [bioware.com] includes a toolset with a C-like scripting language that allows users to code the behavior of characters in a game---not just for combat, but generic interactions as well.

      BioWare, the developers of the game, are known for the imaginative story lines in their Star Wars: Knights of the Old Republic [bioware.com] and Baldur's Gate [bioware.com] series. However, by their own admission, they never have as much time as they want to work on creature AI. In Neverwinter Nights, this shortage of time resulted in a number of unfortunate situations during game play. For example, friendly characters would waste powerful spells on pitifully weak enemies; or they would continually attempt to cast spells in close hand-to-hand combat, not realizing that this gives the close-by enemy countless opportunities to tear them into pieces, and that pulling out that dagger in their backpack might be a better idea. Especially sad were near-death enemies who would try to heal themselves with woefully inadequate healing spells (in RPG talk, down 80 hit points and casting cure minor wounds).

      Luckily, the toolset allowed a number of us to code improvements to NPC behavior. I was one of them, starting the Henchman Inventory and Battle AI project [ign.com], now lead by Tony K. The focus of our project was immediate improvement of game play. An even more impressive community is the Memetic AI [memeticai.org] group. These folks are putting together a full package of complex behaviors for an entire world, from peasant farmers to fearsome dragons. Impressive stuff.
  • by Ironsides ( 739422 ) on Wednesday January 26, 2005 @03:31PM (#11483636) Homepage Journal
    Joshua: Would you like to play a game of Global Thermo Nuclear War
  • On the Internet, nobody knows you're a Grandmaster.
  • What I need... (Score:5, Interesting)

    by It doesn't come easy ( 695416 ) * on Wednesday January 26, 2005 @03:38PM (#11483733) Journal
    What I need is a game with AI that can evaluate my game play and tell me how to play better against my opponents, kind of like where you view your opposing team's old games to learn their patterns and weaknesses, only give me feedback in real time while I'm playing.
    • Re:What I need... (Score:2, Insightful)

      by Datamonstar ( 845886 )
      Such a thing would be great for fighting games. But A good fighting game AI would be rather difficult to simulate high level play because there are so many tiny mind games going on that aren't immedietly apparant. Being random, but being random in a logical, stratigic manner is hard enough for a human to learn to do. Having a computer teach you how to do it would likely be a harder thing to do, but it would be cool and quite possible to have a computer highlight the basics and start players down the path of
    • That is what the internet is for, so you can learn from the constructive criticism of your fellow gamers in well-thought-out critiques of your talents and weaknesses. That has been my experience, anyway. I swear!
      • "Nice work with that airstrike, took out our whole team!"
        "Heh, nearly got me there, old chum, but this time I was the better dueller."
        "Please try to avoid the mines I have planted. Also, I don't think your complaints are legitimate since you yourselves ran into my mines."
        "Wow, you killed 3 people in a row with your Thompson, you must be very skilled."
    • Re:What I need... (Score:3, Interesting)

      by SharpFang ( 651121 )
      Actually, that's a neat idea that could be realized in a simple way: Get an "adaptative AI" that learns your habits. Play for a hour or so, "teaching". Then switch to "learning mode" when the AI doesn't try to EXPLOIT your habits but to EMULATE them. The result is you fight "against yourself" and can learn your own strengths and weaknesses. Wash, rinse, repeat.
      • Oh, I like that Idea.

        What I really want is a game AI that plays like humans. Or at least watch how people play and learn from that.

        Playing against the computer is great for getting those 10 button combos perfected, but useless for seeing if they work against someone with less than perfect reflexes and a penchant to attack endlessly. Consiously I know the holes, but because I can't practice the split second timing, I'm left trying to close my own.

        --Cam
  • Just as long as the game doesn't suffer a psychological break, kill my cryrogenically-sleeping crewmates and flush me out the airlock, I guess that'll be okay.
  • starcraft yay (Score:3, Informative)

    by demon411 ( 827680 ) on Wednesday January 26, 2005 @03:39PM (#11483750)
    i had friend that worked for blizzard and he sed the ai on starcraft was way too good for human to beat so they had to gimp it make it possible to win. i need an ai to do my laundry tho.
    • Re:starcraft yay (Score:5, Informative)

      by Vaevictis666 ( 680137 ) on Wednesday January 26, 2005 @03:49PM (#11483867)
      I call bull. In the later patches, blizzard introduced an "Insane" AI level, which was the same as the hardest setting except that it started with 500 gas and 500 minerals, and received batches of cash on a timer (you can tell by making a custom map that has a "Cash" leaderboard set up, and play it against insane AI)

      If they already had an AI that was "way too good for [a] human to beat" then why didn't they just put that in instead? All their AI was script-based so it shouldn't have been that hard...

      • Re:starcraft yay (Score:2, Insightful)

        by DavidD_CA ( 750156 )
        Yes, I'd like to play against this "insane" AI script. I play SC pretty regularly against the computer (actually, 5-6 of them at once) and tend to win about 75% of the time.

        But let's get one thing straight... giving the computer a free "cash flow" is not advanced AI.

        I'd prefer it if the AI didn't act so predictably, that's all.
      • I call bull. ... If they already had an AI that was "way too good for [a] human to beat" then why didn't they just put that in instead?

        For the simple reason that the goal of "insanse" was not to produce something that was unbeatable. Insanely difficult should still be beatable.

        All their AI was script-based so it shouldn't have been that hard

        No, portions were script based.
    • Re:starcraft yay (Score:4, Interesting)

      by vadim_t ( 324782 ) on Wednesday January 26, 2005 @03:53PM (#11483913) Homepage
      Not very surprising, really.

      Starcraft is a RTS, and in a RTS omniscience and omnipresence would be a quite nice advantage. Put simply: The AI is never distracted, knows the position of every unit, and the progress of every operation and every resource.

      Now, combine that with a decent AI implementation that can use elements of the game to its advantage, and it shouldn't be that hard to code something that would crush newbies without much trouble.

      I'd be more impressed if it was turn based, since that would make competition on equal terms perfectly possible. I remember the AI in X-Com used to give me quite a lot of trouble.
      • And further, reacts instantly. The computer is capable of more powerful maneuvers simply because it can command more than 1 group of troops at once.
      • Starcraft is a RTS, and in a RTS omniscience and omnipresence would be a quite nice advantage. Put simply: The AI is never distracted, knows the position of every unit, and the progress of every operation and every resource.

        Which is what is wrong with most AIs in RTS games. It actually takes more code to introduce a 'double blind' confuguration to the AIs, as opposed to just let the AI peek at the game state. The developers are either too stupid to realize this (unlikely), too lazy to bother with it (pos
        • Completely agreed about that. That's why I'm quite annoyed with the lack of new turn based games. At least in those games could be played on equal terms.

          I actually considered trying to code a fair RTS by giving the computer a "virtual mouse". This way it would have to play a lot more like a player, and could have a chance of missing with it. Never got to do it, unfortunately.
    • Re:starcraft yay (Score:5, Interesting)

      by nine-times ( 778537 ) <nine.times@gmail.com> on Wednesday January 26, 2005 @03:57PM (#11483975) Homepage
      Well, in a certain sense, "good" AI for games doesn't necessarily mean "harder to beat". Take a fighting game like Tekken as an example. Technically, you could just program the AI opponent to block every time you press the "attack" button, and to attack whenever you can't block. Suddenly you have "unbeatable AI", but it's not really *good* AI.

      And I don't just mean "it's not technically impressive". I mean, considering the purpose of in-game AI, it's *bad* AI. Good AI generally simulates more complicated human interactions. Good AI can be tricked or distracted, and can learn so it's not so easily tricked the next time. I really like the idea of AI that will adjust to the player's skill level to always provide gameplay that is exciting and challenging, yet beatable.

      In other words, I believe "good" AI in a game is not defined by being hard to beat, but by being fun to play against.

      • Re:starcraft yay (Score:2, Interesting)

        I don't want a game to let me win any more than I want it to cheat. Adjustable AI takes all of the meaning out of structured difficulty levels. I don't want an AI to take pity on me and make me think I'm better than I am--if I should lose, I should lose. The example that comes to mind is Warcraft II: Beyond the Dark Portal--the AI was intensely difficult, but if you destroyed your own towers at the beginning of many levels the AI would think you were weak and take a fall. Some levels were pitifully easy if
        • Re:starcraft yay (Score:4, Interesting)

          by nine-times ( 778537 ) <nine.times@gmail.com> on Wednesday January 26, 2005 @06:19PM (#11485597) Homepage
          Adjustable AI takes all of the meaning out of structured difficulty levels.

          I'd say something more like, self-adjusting AI and structured difficulty levels are oppositional methods. Which is to say, if you had good self-adjusting AI, you wouldn't need "difficulty levels". It would adjust.

          Or another possibility: you could have different difficulty levels, the easy levels being self-adjusting, and harder levels that amount to telling the AI, "Eh, do your worst, even if I stink."

          Adjustable AI takes all of the meaning out of structured difficulty levels.

          But that's more an issue of poor implementation than the idea itself being bad. Any time there's some trick like that, one that *always* fools the AI, it's a problem of poor implementation. In other words: a bug.

          There are two reasons why I like the idea of AI that calibrates itself to the skill level you're playing on. First, there is a certain level of realism to it. In real life, if it seems like you stink at something, your competition will underestimate you. They won't try as hard, because they're not expecting a real challenge. If you constantly pull this, though, against the same opponents, they'll eventually catch on. Good AI should mimic this.

          Second, there are games where, when I'm playing it, it's like an interactive movie. Sometimes, when I play a game, I'm not that interested in "rising to the challenge". I just want to take control of the main character while he does something cool, and then get on with the story. When playing games like this, "getting stuck" on some stupid boss just isn't fun. It's annoying.

          So this is often where people do cheat. They like the game, but they want to get past some stupidly-difficult part. Cheating, however, breaks the illusion. If the game were capable of "helping you out" a little, it would maintain the experience and let you past.

          I'm not saying the idea is easy to do well. However, ultimately, when I play a game, I'm not looking to prove myself by being "733t". I just don't care, as long as it's fun. Good AI (in relation to games) is AI that makes playing fun. Whatever that entails.

    • Re:starcraft yay (Score:2, Interesting)

      by Wildclaw ( 15718 )
      That is completly incorrect. The starcraft AI could be beaten playing 1 vs 7 if you knew what you were doing and played on the correct maps and exploited the flaws in the AI.

      The map is best determined by the distance from the AI homebase to yours. Farther distance gives a few extra seconds that determines life or death.

      By getting a good enough defense (especially at the front door) you can hold of the computer AIs with minimal expenditures until they are out of resources. That is your cue to slowly move i
    • Re:starcraft yay (Score:5, Insightful)

      by ComputerSlicer23 ( 516509 ) on Wednesday January 26, 2005 @04:26PM (#11484295)
      Curious. I wish they would have shipped it, or made it available thru some type of option.

      I got pretty good at StarCraft: BroodWar. I could play 2 on 1 against the computer and win nearly every time. Playing three on one was pretty tough. However, a buddy and I could play 2 on 6 with regularity.

      It wasn't until the last set of patches, that we couldn't beat several of our favorite maps on 2 on 6. Big Game Hunter was a great map to play, if you did it properly, you could play 2 on 6 as protos, which normally we couldn't do. Playing 2 on 6 on just about any other map was easy if you were patient and played as Terran and the primary base was at all defensible. The last set of patches made the AI very good about early pressure, and often pressure. It also improved it's ability to wave as one huge group, rather then having them with two or three of them in your base at one time. Two or three opponents in your base in the early game is doable. Five or Six was just a complete impossibility for us to deal with.

      Especially if the computer wouldn't cheat (just give it extra money, or use skewed stats not available to the player). I don't mind of the computer has "infinite mice", although, anything that simulated the limitation of the number of commands that could be issued would be cool.

      The other interesting thing, is that the AI got better with a faster machine. At various points, just upgrading machines without changing the game version would make things more challenging. Finally, on Big Game Hunter we pretty much proved to ourselves that Blizzard wasn't having the AI cheat in terms of picking the proper counter units. The trick to beating Big Game hunter as Protos was to build as many "Carriers" as you could. Put down as many of the Photon cannons as you could. Put down two sets of Upgrade buildings so you can do all of the upgrades in parallel. Defend your main base with proton cannons and other foot troops. When each of you has a dozen fully upgraded carriers, each of you hits a different opponent (Build shield rechargers on the edge of your base towards the side you are going to attack). You should be able to crush your opponent with relative ease. Both teams then pick a third opponent to attack crush them. Then it's just time to clean up. You should have pretty much destroyed everyones forces, go clean up the bases. However, if you used a Carrier to defend your base before you had a dozen of them, the computer would build the perfect counter unit (normally those really cheap small zerg fliers). As long as you hide the carriers in the back of your base, you'd just crush the computer. If not, they had a tendency to build too little anti-air units until it was too late. This basic strategy was figured out while we played it 3 on 5, until everyone got tired of me just essentially doing nothing for the first half of the game while they defended, followed by me beating 4 of the 5 opponents. The last patch we applied (either the 1.09 patch or the one after it if there was one), the computer waved so badly that couldn't keep enough proton cannons on the ground to defend your base.

      The other thing I really wish that games makers allowed was the ability to script AI so you could essentially build your own AI scripts, so that the AI was exentisible without writting a DLL.

      Kirby

  • by aarku ( 151823 ) on Wednesday January 26, 2005 @03:43PM (#11483789) Journal
    Is the O'Reilly book AI for Game Developers [oreilly.com]. It has lots of practical examples and ideas with code snippets that build from something a beginner can understand.
  • by hedley ( 8715 ) <hedley@pacbell.net> on Wednesday January 26, 2005 @03:45PM (#11483820) Homepage Journal
    I have yet to find suitable AI for that game. To me that type of AI (dealing with imperfect information) is the holy grail of game AI. This includes a vast family of such games (poker comes to mind), where over time, information about the game state is disclosed. I once found a small Stratego game on the net that played an unbelievably good game. After saving and restoring a game a few times and losing (whereup it shows you its pieces) it had actually cheated real-time and would move its pieces to match yours. Thus the small executable! :)

    Hedley
  • by gearmonger ( 672422 ) on Wednesday January 26, 2005 @03:45PM (#11483823)
    Look, if I want my ass kicked in a game, all I have to do is go online and some random 13-year-old will do that quite handily.

    I do not need every baddie to be imbued with Big Blue-like intelligence, because then games would be just like reality and, well, that's far too hard.

    • Warren Spector agrees with you. There are.. significant benefits to 'smoke and mirrors' AI. Games, after all are meant to be fun.

      It may help if you think of advancing AI opponents, not as just being 'better', because that really is much too easy - there is zero technical challenge in creating an AI that always knows where you are, can run faster, and never misses. The challenge comes in making the AI 'dumb' in more interesting ways.
  • Steve Jackson: Ogre (Score:5, Interesting)

    by Weaselmancer ( 533834 ) on Wednesday January 26, 2005 @03:48PM (#11483861)

    Buy an old C64 or Amiga copy still in the box if you can. Seriously, I mean it. It comes with 2 manuals.

    Book 1 has a short story and some player info, and Book 2 describes step-by-step exactly how they developed the AI for the game. Going to cons and watching successful players play, getting them to give out their strategies, and then translating those ideas into code. As a bonus, they describe the exact formulas the Ogre uses to determine its move, targeting sequence and deployment of arms.

    It's brilliant, informative, and well worth the price of the game alone. Highly recommended reading if you're into game AI.

  • Intelligent FPS? (Score:4, Interesting)

    by DrXym ( 126579 ) on Wednesday January 26, 2005 @03:53PM (#11483914)
    Most NPCs or 'bots in FPS games I've played have had an AI that can be encapsulated by these few lines of pseudo-code:

    IF playerCanSeeMe() THEN
    IF coverNear() && rand() > 0.5 THEN
    takeCover();
    ELSE
    standUp();
    shoot();
    ENDIF
    ELSE
    advanceTowardsPlayer();
    ENDIF

    I wish the likes of Doom 3, HL2 et al would pay half as much attention to making the enemies smart and resourceful as they do to making the scenery pretty. Sometimes I wonder if zombies are such a staple of FPS games to explain why the game AI is so retarded.

    Even multi-player games could benefit (e.g. the Battlefield series) if the single player training mode bots had an ounce of sense or tactics.

    The only FPS I would consider containing remotely convincing AI is Far Cry and even the NPCs in that are fairly predictable and easy to fool - just swim to an island and pick them off one by one as they swim to you or drown trying. But at least they seem to have a spoonful of brains in their heads - crouching, taking cover, encircling, giving orders and other tactics that other games haven't even bothered to implement.
    • Still stuff like coverNear(), advanceTowardsPlayer() are tricky.
      Add to that dodge(), shoot.withAdvance(), shoot.grenade.withBounce(), teleportTo(), test.wouldFragSelf(), run(likeHell), jumpAcross(), layInWait()...
      and you get a nice set of features that seem trivial but are hard like the hell to code them right.
      • I'd agree they might be difficult in an open terrain, but in Doom 3? I seriously doubt it. There is no layInWait() since zombies spawn only when you walk on the trigger to spawn them. You can ignore wouldFragSelf() by making the zombie immune to its own fire. The teleportTo() is trivial. The dodge() is just a variation on takeCover(). The run() is just a variation on walk(). The only remotely challenging thing is jumpAcross() and even that could be accomplished by pairing spots that jumping can happen betwe
        • I'd agree they might be difficult in an open terrain, ...which is so rare, few good games implement it.

          but in Doom 3? I seriously doubt it.

          Who talks about crappy AI in the graphics technology demo D3 was? It's not for playing, it's for show to developers. Seen the ads? "Huge technological improvement".
          Think Q3A, UT bots.

          There is no layInWait() since zombies spawn only when you walk on the trigger to spawn them.
          Learn the location of spawn points and triggers and you own them. AI is dead.

          You can igno
    • After playing "Condition Zero" for a while (The single player Counterstrike that comes with Halflife 2), I've become convinced that its counterterrorist AI works more like this:

      IF TerroristInView == 0
      ThrowGrenade(target=random())
      ELSE if PlayerHasSniperRifle()
      StepInFrontofPlayer()
      IF BlockingDoorway
      StandStill()
      ELSE if PlayerMessage == "KeepTogetherTeam"
      RunAway()
      IF StandingNextToTickingBomb() && PlayerDistanceFromBomb > 1000
      AskPlayerToDefuseBomb()
      DieInExplosion()
      IF Terroris
    • Half-Life actually had quite advanced AI that could smell and hear and stuff, but you can't really tell. What you see on your screen is "guy standing there" or "guy running away" or "guy running toward me" or "guy shooting" and that's about it. You can't express very much with only those actions. All the great AI in the world is no use if your characters can't express their complexity to the player. As a player you can't tell if the AI saw you or heard you or smelled you or just magically "knows" where
  • In one hand, the AI of bots in "duel FPS" (QIIIA, UT series) is sometimes amazing and they are really challenging. A new player doesn't stand a chance against a bot at highest setting. On the other hand, in many RPG games, or "adventure" FPS (think HL2) the AI lacks a lot, often plainly sucks.

    Why can't they just port the "duel bots" as the NPC?
    • The duelist bots are optimised to fight in a way that's patently unrealistic for someone playing some game like Doom. In fact, many times games have to make enemies use lousy tactics just to make the game practical. You know how many of those stealth games would be beatable if the enemies even used a buddy system?

      Much of the issue is also the amount of damage the player takes compared to the enemy. I'm an even match for an Adept enemy in UT2004 because they have equal HP to me. If they fell to a tenth

      • That at least would be challenging.
        Like in Morrowind. It was a great story, but the fight AI sucked. There were maybe 2 or 3 enemies whom I enjoyed fighting, but in most cases your character was just overpowered and the enemies were mostly helpless. When you see the opponent levitate and take out a bow, and you have only sword, RUN FOR COVER, don't walk in circles! If you see 3 of your friends fell on the same walkway, killed by arrows, don't be the fourth! If you know the guy you meet killed some local god
        • I love Hitman series for stealth and actively encouraging to kill as few as possible, though still there are levels where killing 30-50 enemies is easier than psaaing the level in stealth manner.

          Same thing goes for the Thief series. They encourage stealth, obviously, but oftentimes it's too easy and tempting to just pull out your bow and blackjack rather than outwitting the guards.

  • Game AI will never pass the Turing test (by much margin) because it would spoil the game for newbies. Too smart an opponent or an opponent that learns the game faster than the average player would be too depressing.

    Commercial game players will carefully limit the smarts of the AI to make it fun without letting the AI win all the time. Its better to have AI opponents that permit a high kill ratio for the player than to have opponents that kill the player multiple times per opponent killed.
    • Well, if your AI is too smart for your newbie player... add difficulty levels - if its too dumb, theres nothing you can do.
      And I don't mean easy = AI - 50% resources.
      Imagine your AI is able to discover when the player is concentrating an army at a certain point, and then is able to launch a pre-emtive strike (with the optimum mixture of units for this task) to disarm the threat - or if the army is too big, prepeare for its attack, and prepeare an counter-attack at a poorly defended position, so the player
    • difficulty (Score:2, Interesting)

      by Khashishi ( 775369 )
      This is why you need configurable difficulty settings or some sort of adaptive diffuculty servo.

    • Oh, I don't know... I know plenty of humans that could ace a Turing test but lose pathetically to me in games.

      And I suck at online games..
  • Just as the gaming industry has traditionally driven research and development of advanced hardware and software, I'd like to see fruits of AI research in this area bring some benefits into computer security.

    As much as we have come a long way in computer security, we still have a long way to go. We are still using signature-based software to detect attacks from viruses and malicious packets alike. Behavior-based products are beginning to look somewhat decent; but the level of sophistication still lags far
  • by MiceHead ( 723398 ) * on Wednesday January 26, 2005 @04:06PM (#11484074) Homepage
    Just as physics simulation is the "big thing" in games today, I think emergent behaviors [google.com] will... well... emerge as the "next big thing" within a few years. Corrolary to that, emergent gameplay [google.com], wherein the actions players decide to take are based on rules not explicitly stated by the designers, will also become a popular staple of games.

    As a simple example, you might play a modern-day RPG, where your character is at a Tennis match with an NPC. You might decide to throw that match, in order to have that NPC put in a good word with your boss. Traditionally, this has been scripted, like this:

    You're playing tennis with Billy, when a pair of attractive women walk onto the court. What do you want to do?

    1. Go all out and win to impress the women.
    2. Throw the game to make Billy feel better.

    ] 2. You throw the game. You end up looking like a chump, but Billy ends up looking like a champ! He puts a good word in with your boss, and you earn a promotion! Meanwhile, the women laugh at you.
    In these cases, the designer explicitly considers which actions the player can take, and what their outcomes will be. What I think will happen more in the near future, will be that designers will set rules up, let the players know how their actions have affected the system, and then leave him to "game the game," as it were. The designer of the above scenario might, instead, give the player the chance to "play well" or "play poorly," independent of why the player would want to do that. The player knows the game's state, and therefore has an idea as to what he can do to alter that state.

    This takes place to some extent in existing games, such as Deus Ex: IW and, especially, in The Sims 2. In the latter case, for example, a wedding party will go well if the guests are happy. The guests will be happy if their needs are met. Their needs will be met if they have X, Y, and Z. The designers did not implement a direct corrolation between X, Y, and Z and the wedding party; changes in the game's state occur because of the third or fourth-order consequences of a player's actions. In comparison, most interaction in a first-person shooter is first-order: kill the critter to get past the critter. (I love first-person shooters, but judging from the way some Slashdot posts received Doom 3, I think that an FPS that adds complexity in this manner may do well.)

    My prediction here isn't a divine revelation that we'll have this newfangled style of "emergent gameplay" -- we already have it. However, I think that, come 2006, we'll have a sexy buzzword for it, and that it'll be sprawled over the covers of CGW and PCG.
    __________________________________________________ ___________
    Inago Rage - Fight, Fly, and Create your own 3D arenas in our first-person shooter [dejobaan.com]
  • The future (Score:5, Funny)

    by confusion ( 14388 ) on Wednesday January 26, 2005 @04:07PM (#11484099) Homepage
    In the future, People for the Ethical Treatment of Artificial Intelligence (PETAI) will be decrying the horrific violence that millions (maybe billions) of people inflict on AI's every night whilest gaming.

    At some point, you know this is going to be an issue.

    Jerry
    http://www.syslog.org/ [syslog.org]
    • This is some funny shit.
    • Comment removed based on user account deletion
    • In the future, People for the Ethical Treatment of Artificial Intelligence (PETAI) will be decrying the horrific violence that millions (maybe billions) of people inflict on AI's every night whilest gaming.

      Remember the Screensaver/virtual pet program that was out several years ago, called 'Petz 2'? You could actually beat your pet kitten or puppy so much that they would cower in a corner and tremble all the time. Twisted, huh?

      I don't know what was more warped, beating a virtual pet into submission, or
    • Yeah, it's funny right now because it's far out - but it really will be an issue someday.

      If you create a conscious machine that recognizes pain, will it be legal to torture it? At first it seems like an easy question, until you realize that humans are themselves conscious machines that feel pain.

      It'll be a tricky one.

  • by andr0meda ( 167375 ) on Wednesday January 26, 2005 @04:08PM (#11484101) Journal
    .. is that many AI people can write great books on generally well known and accepted AI topics. Pathfinding, fuzzy logic, FSM`s, scripting languages.. They can even illustrate them with fine, simple and easy to understand examples.

    However, I have still to find the first good book on AI that deals with complex tasks for agent behavior. Many books cover the first few notions that are just abstractions of how we would probably be doing things, but none of them go deeper where the complexity becomes hairy, the lines become fuzzy and the amount of bookkeeping necessary to solve the problem grows exponentionally. I`m talking about dialogue models, strong and week constraint planning engines, emotion simulation, symbolic reasoning, etc.. Each of them separately in it`s simplest form has been described 100s of times, but never has one book touched on the complexity when everything should come together. Not even the commercially available API`s like Ai Implant or Spirops come close.

    Well. Maybe that`s not such a bad thing. I can always start writing myself..

  • by EXTomar ( 78739 ) on Wednesday January 26, 2005 @04:13PM (#11484165)
    The next "killer app" for MMOGs is advanced, learning AI. Right now games are trying to cover up the simplistic behavior of NPCs by creating complex scripts around them.

    Example:
    - Between 100%-75% health, Dragon will fight as normal.
    - At 75% health, the dragon will breath fire in attempt to kill as many players nearby, fly over to the west part of the chamber.
    - Between 75%-50% health, Dragon will fight as normal and start using its tail.
    - At 50% health, Dragon will fly to the east part of the chamber, breath fire onto the players as they run from the west part of the room to the east.

    So on and so forth. The problem is that humans easily can see paterns like this. This "event driven" behavior only works when players are "surprised" and becomes a serious liability when players discover the pattern. If the pattern is "discovered", players will scatter around 75% to avoid the fire. At 50% they will run to the eastern part of the room before the dragon gets there to avoid it breathing fire onto the western half.

    To avoid some of this predictability, some monsters appear to have "randomized behavior". A monster has 5 different "actions" where a programer weights the choices and generates a random number. This makes the monster appear to have some tactics trying different attacks but just as much as it succeeds in throwing the player off they will often randomly chose the poor action.

    I believe advanced AI techniques like nueral nets will be the next "killer app" for MMOGs. Learning AI is not impractical for a single player stand alone game but it is not as "exciting" nor do single player system have enough computing power and "experience" to really put a nueral net through its paces.

    The Dragon in the example starts out like the players in that neither side knows exactly how to win. Reguardless of the outcome both the sever/Dragon and the players should learn something from the encounter. Have enough players run against The Dragon and it might start to learn things like "fire seems to be more effective against melee". When it sees a raid comprised of mostly melee and very few casters it choses its fire attack far more than its melee. This is a far better option than "randomizing attacks" or scripting their behavior. The Dragon is now actually using tactics and reacting to the players in a psuedo-intelegent manner.

    If we really want to go far fetched, it would be great if each server instance of The Dragon "learned" on its own and developed personality and behavior unique unto itself. One server's Dragon might like to fly around compared to another that likes to walk when moving around. Of course one of the tricks is keeping the game engaging. No one wants to fight The Dragon if they know it will beat them 9/10 times.

    Some NPCs should be designed simplistically because that is their nature. Some NPCs are highly intelegent and should act occordingly. I await the day when you can do true tactical attacks against the computer instead of having to resort to a scirpted monster or just filling the other side with other human players.
    • I believe advanced AI techniques like nueral nets will be the next "killer app" for MMOGs. Learning AI is not impractical for a single player stand alone game but it is not as "exciting" nor do single player system have enough computing power and "experience" to really put a nueral net through its paces.

      --> Neural nets are less efective than expert systems based on inference rules. Nowdays the most intelligent engines are driven by real-time programmable expert systems, as flexible inference rules (pr
      • this is not Informative in the least, its absurd. Neural Network methods have outperformed explicit techniques in many areas for a long time, same goes for GAs. In fact, a combination of the two methds has also been very effective. See NEAT [utexas.edu] for an example.
    • I'd personally thought that Doom 3 was supposed to have such advanced AI. It didn't, unfortunately. Instead, it simply had monsters spawning behind you and in predictable locations.

      I mean, you'd think that "imps" would be a bit more crafty.
    • by DG ( 989 ) on Wednesday January 26, 2005 @06:42PM (#11485834) Homepage Journal
      I'm totally with you on the ability of people to recognise patterned behaviour, typically far faster than a game designer might suspect.

      But people can also discover "emergant" patterns that aren't necessarily explicitly programmed in.

      I remember playing Sargon III Chess on my C-64. I accidentally discovered that the AI couldn't see - I'm no chess geek, so I'm sure there's an official term - "indirect" attacks. Rather than move piece A to sqaure Q ro threaten enemy piece X, I'd move some other piece B onto the line of attack that I wanted to make A->X, blocking the attack. Then piece A would be moved into attack position on Q, and piece B moved out of the way, unblocking the A->X attack.

      The AI seemed to be able to predict that a straight move to Q by A would threaten X, and it would be very good at countering those moves. But attacks from a third piece by moving some other piece out of the attack line were invisible to it.

      Once discovered, this lead to strategies that involved setting up elabourate attacks that hinged upon "reveals". It'd drive the AI nuts. Sadly, actual humans do not suffer from this blind spot and ol' Sargon did not improve my RL chess playing ability one bit.

      Here's another example of a different kind:

      One summer, a group of my friends played a TON of the original Battletech board game aginst each other. We'd start after supper and go to the wee hours of the morning, day after day after day.

      In so doing, we developed a particularly effective strategy. We'd have a 4-lance company. The first lance was composed of stripped-down lightweights equipped with maximum jump jet capacity and a single weapon - a flamer. The second lance was of superheavy, very low-mobility, weakly-armoured, long-range rocket artillery units. The third was ultra-heavy, low mobility, heavily armoured massive close-in-damage units, and the fourth was the reserve unit of heavy cannon equipped hovercraft.

      As is typical for wargames, the faster you move, the harder you are to hit. There was a further negative modifier if the 'mech was jumping. Our lightweights, if they jumped full distance every turn, accumulated so many negative to-hit modifiers that they were unhittable. They would fan out over the game board, spotting the enemy and setting fire to terrain - which in the game rules, happened 100% with the use of the flamer - and which caused vision blocking due to smoke, plus there was a chance for the fire to spread to adjacent hexes.

      The lightweights could also spot for the indirect fire lance with minimal penalties. The indirect fire lance would never move; it would just fire salvo after salvo of long range missiles. The hit rate wasn't great and the distribution of LRM fire tends to spread damage easily, but enough would hit as to ablate off some enemy armour - and the psychological effect of taking damage from an unseen source without the ability to retaliate... it was maddening.

      Meanwhile, the heavy, close-in units would slowly advance up to intercept positions. Thanks to the madly-hopping lightweights and the smoke, we'd know where the enemy was but the enemy wouldn't know where we were.

      The enemy would thus blunder up against the close-in units, which did monster amounts of damage with a high hit probability (the enemy unit was often moven slowly, due to the smoke, and the close-in unit would be stationary). It was not unusual to destroy an enemy unit in a single turn.

      If things got sticky for whatever reason, the hovercraft would race in from the flank/rear and could disrupt the most cleverly planned counterattacks.

      With all the practice we got, these tactics became drills - they could very easily have been scripted.

      We put this to the test at a wargame convention, and we slaughtered everybody, without losing a single 'mech in any battle. Towards the end, the organizers were matching us upwards of 3 to 1; we just could not be beat.

      Needless to say, we were not invited back. :)

      DG
    • Learning AI is not impractical for a single player stand alone game but it is not as "exciting" nor do single player system have enough computing power and "experience" to really put a nueral net through its paces.

      That's why we need evolving neural nets that can take advantage of the fact that several copies of the game run on distributed computers. Some process like NEAT [utexas.edu] (NeuroEvolution of Augmenting Topologies) could evolve neural networks, with each game instance being a test bed for a particular "rev
  • I've neven even seen the Wizard of Yendor in 14 years. Does it really matter how smart his AI is? My own I seems pretty low...

    You choke on a sewer rat--
    You die... Pakka Pakka comes and takes all your possessions.
  • Clippy should've been intergrated at the Kernal level so that the user would have had to ask/beg Clippy permission to run an application.

    "It appears you are websurfing without Internet Explorer. Let me fix that right up for you."

    "I have detected an open source application on your computer. Since I know your not a commie I'll just go ahead and get rid of it for you."

  • by MarkWatson ( 189759 ) on Wednesday January 26, 2005 @04:28PM (#11484326) Homepage
    The author of the review, Craig Reynolds, is also very well known in the field of game AI. His Game AI web page [red3d.com] is a fun resource.

    BTW, definitely the most fun job I ever had was doing game/VR AI for Nintendo and Disney while at Angel Studios. I *really* recommend trying to work in the field for a while because it pulls together so many things: creativity, working with non-computer science team members, lots of interesting CS problems to be solved, etc.

    -Mark

  • by David Leppik ( 158017 ) on Wednesday January 26, 2005 @04:42PM (#11484473) Homepage
    slightly OT, but when Asimov wrote his three laws of robotics, he assumed that humanoid AI would be developed with robots in mind.

    Right now, there's a lot of cutting-edge AI research going into video game opponents. Knowing how popular code re-use is these days, we might be lucky if we get robots which don't default to KILL THE HUMANS.

    Hmmm... Roomba does make me nervous, as does the old Microsoft Barney plush robot...
    • The laws are a science fiction plot device. At first glance they sound reasonably comprehensive, but are fuzzy enough to give inspire dozens of interesting science fiction stories. Its sort of like the Ten Commandments compared to the nooks and crannies of the Talmud.
  • Really Smart? (Score:4, Insightful)

    by SharpFang ( 651121 ) on Wednesday January 26, 2005 @04:47PM (#11484525) Homepage Journal
    What I didn't like about Half-Life:

    "Easy - enemies are weak and stupid"
    "Normal - enemies are strong and stupid"
    "Hard - enemies are strong and smart"

    What I regret, that there wasn't a setting for "enemies are weak and smart".
    I hardly enjoy unloading 30 bullets from my clip into hardly moving enemy's head instead of 10. But I vastly more enjoy unloading 30 bullets at the walls around a smart, dodging enemy trying to get it and finally killing with 1-2, than shooting 10 bullets right in head and have it still live.
    • I've had similar issues with every NFL game I've ever played. The coaching doesn't get any better until you're playing an opponent that is twice as talented as they should be. Most games do not accurately differenciate between Intellegence (smarts) and Ability (relative strength). I would love to see a Madden game where I can keep the opponent's ability even with my own, but play a really smart AI coach. Even better would be a Madden game where there are patterns of playing strategy based on actual NFL
  • by dghcasp ( 459766 ) on Wednesday January 26, 2005 @05:33PM (#11485072)
    Remember, the objective of Game AI is not to beat the player... Unless, of course, you're trying to program the world's best chess program or something.

    The objective of consumer-focussed game AI is to make it fun for the player. It's actually fairly trivial to make AI that wins all the time (think: cheat.) The hard part is to make an AI that makes it difficult enough for the player to keep them interested without being so easy that it gets boring.

    Another good goal is to try and surprise the player. An AI that always behaves in simple stimulus-response is no fun after a while; you learn the patterns. It's much more fun (and much more replayable) if the AI does things you don't expect, and occasionally wins doing them.

    What I would like to see is ANY AI for RTS games that neither makes use of, nor loses to, the "make as many units as possible and swarm the opponent" strategy.

  • Its been my feeling for some time that the first interesting Artificial Intelligence will be a character in a game or movie. The scientists in academia are working on narrow problems in A.I. and are unlikely to build a full Artificial Intelligence. People in business and military have been working on A.I. applications for a long time, but again these may be for targeted uses like making money or killing enemies. Nothing motivates a craftsman as competative "play", so thats why I am betting on entertainm
    • I'f like to add taht another entertainment A.I. might be a "playbot" like those in Spielberg's movie. These include both the childhood toys and adult varieties :-) Possibly a pet or companion substitute. The Japanese seem fascinated with this direction in A.I.
  • What ALL computer game AI needs is more randomness. Most games I play after a day or two playing them I figure out what the AI is doing. Things become so predictable and that's when the games get boring. If AI just had some random events, randomly retreat sometime, randomly change the direcion of attack, even randomly wait so many seconds before the next command is executed .. I don't know ...

  • Not a nested set of IF-THEN-ELSE statement.
    I want to know if all the theories of Artificial Inteligence are actually implemented in ANY modern game.

    * Do the characters in the game learn from their enviroment?
    * Do the characters adjust their tactics to deal with different players.
    * Do the characters have persistent memory?
    * Is the "brain" of the characters actually programmed using an AI language? (Lisp, Prolog)

    But most importantly - does any game pass the Turing Test? ;)
  • The computer language Prolog is very clever at figuring out solutions from complex data. It can learn new rules and information and include those in its solutions.

    Has it even been used for game AI? If not, why not? If so, how did that go?

Get hold of portable property. -- Charles Dickens, "Great Expectations"

Working...