Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Artificial Intelligence for Computer Games

timothy posted more than 9 years ago | from the right-after-real-intelligence dept.

Programming 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.

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.

Sorry! There are no comments related to the filter you selected.

Microsoft's PaperClip is the pinnacle... (5, Funny)

bigtallmofo (695287) | more than 9 years ago | (#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.

Re:Microsoft's PaperClip is the pinnacle... (1)

aurb (674003) | more than 9 years ago | (#11483684)

Bah! PaperClip-PaperShnip! vigor [sourceforge.net] is my best friend.

Re:Microsoft's PaperClip is the pinnacle... (1)

hsmith (818216) | more than 9 years ago | (#11483685)

MS has good ideas, pooly implemented.

Atleast you can turn that off, nothing is worse them MS Offices great "history clipboard" that you CANNOT turn off, even if you edit the registry

Re:Microsoft's PaperClip is the pinnacle... (0)

Anonymous Coward | more than 9 years ago | (#11483764)

Someone should shove that paperclip in your ear :P

Re:Microsoft's PaperClip is the pinnacle... (1)

bwcarty (660606) | more than 9 years ago | (#11483949)

Indeed...as shown here [visar.com] .

In Soviet Russia (-1)

Anonymous Coward | more than 9 years ago | (#11483597)

In Soviet Russia, intelligence ARTIFICIALS YOU!!!!

Re:In Soviet Russia (-1)

hunterx11 (778171) | more than 9 years ago | (#11483712)

In America, you make stupid "In Soviet Russia..." jokes. In Soviet Russia, you get thrown into a gulag for bad jokes.

Re:In Soviet Russia (-1)

Anonymous Coward | more than 9 years ago | (#11483779)

loooooooool

Re:In Soviet Russia (-1, Redundant)

kakos (610660) | more than 9 years ago | (#11484272)

No no no. You got it all wrong.

In Soviet Russia, stupid "In Soviet Russia..." jokes make you.

Re:In Soviet Russia (-1)

Anonymous Coward | more than 9 years ago | (#11483816)

Yes, but in Korea only old people use clippy.

A.I. for ./ (0)

Anonymous Coward | more than 9 years ago | (#11483601)

Now we just need to figure out how to use this for /. users...

Pattern-based enemies... (2, Funny)

Anonymous Coward | more than 9 years ago | (#11483603)

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.

Re:Pattern-based enemies... (1, Insightful)

Anonymous Coward | more than 9 years ago | (#11483864)

Pattern-based is easier to code as well. If you want the enemies to react to the player's abilities, just set up a rank system (like just about every score-based vertical shooter from the past 5-10 years).

Complicated game AI is overrated. If I want an intelligent opponent, I can always just play a friend over LAN or internet.

Re:Pattern-based enemies... (0)

Anonymous Coward | more than 9 years ago | (#11484106)

i don't have friends and internet games suck.

No thanks. (5, Funny)

Mononoke (88668) | more than 9 years ago | (#11483609)

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.

Better AI is a must (5, Insightful)

Evil W1zard (832703) | more than 9 years ago | (#11483614)

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!"

Re:Better AI is a must (3, Insightful)

Tackhead (54550) | more than 9 years ago | (#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?")

Re: Better AI is a must (for Noober) (3, Funny)

Evil W1zard (832703) | more than 9 years ago | (#11483982)

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.

Re: Better AI is a must (for Noober) (1)

Metapsyborg (754855) | more than 9 years ago | (#11484111)

I think this is a joke, but I'll take it seriously because I'm such a stuffy, full-of-myself fool.

They used Noober as a test of your "goodness". If you killed him you failed.

The fact that he was named Noober is just icing on the cake.

Artificial Pain (2, Funny)

Viking Coder (102287) | more than 9 years ago | (#11484066)

Robot on fire: "WHY? Why was I built to feel pain!?"

I love the Simpsons.

Similar technology (1)

RickyRay (73033) | more than 9 years ago | (#11483618)

This sounds familiar. Hasn't Microsoft been basing much of their product line instead around VI (Virtual Intelligence) for years now? ;-)

Obligatory Quote (3, Funny)

Ironsides (739422) | more than 9 years ago | (#11483636)

Joshua: Would you like to play a game of Global Thermo Nuclear War

Re:Obligatory Quote (1)

dark_requiem (806308) | more than 9 years ago | (#11484298)

That's not the quote! The kid tries to play GTNW, and Joshua responds "Wouldn't you prefer a nice game of chess?" Geez, and you call yourself a geek!

Quo vadis? (1)

Doc Ruby (173196) | more than 9 years ago | (#11483642)

On the Internet, nobody knows you're a Grandmaster.

What is AI? (-1, Offtopic)

dvduval (774940) | more than 9 years ago | (#11483659)

Is Artificial Intelligence kind of like when I use to Chessmaster to beat people I play against online? check out my new Mortgage Forums [mortgageforum.net]

Re:What is AI? (2, Insightful)

Killer Instinct (851436) | more than 9 years ago | (#11483731)

A few years from now, we will hear : "Let me put it this way, Mr. Amer. The 9000 series is the most reliable computer ever made. No 9000 computer has ever made a mistake or distorted information. We are all, by any practical definition of the words, foolproof and incapable of error." And of course the paper clip will be saying it!

Re:What is AI? (1)

advocate_one (662832) | more than 9 years ago | (#11484291)

You appear to be writing a game, would you like some help with that?

Book? (2, Funny)

wpiman (739077) | more than 9 years ago | (#11483715)

Book?

As in paper??? Can't you get it in PDF format?

I took all my bookshelves down and put them in my garage to store my cans of WD40- duck tape- and dry gas.

Re:Book? (1)

BigBlackDog (692924) | more than 9 years ago | (#11484313)

...

cans of WD40- duck tape- and dry gas

Shouldn't that be duct tape? Or do you keep ducks taped up in your garage?

And why do you need more than one can of WD40? Even if you have two, in case the first gets siezed up, unless they're really big cans, they don't take up that much room. Unless you need a third, in case the second gets jammed, too...

I think I see why you need the space.

What I need... (5, Interesting)

It doesn't come easy (695416) | more than 9 years ago | (#11483733)

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... (1)

Antonymous Flower (848759) | more than 9 years ago | (#11483786)

Any game with adaptive AI already does this, if you are observant enough.

Re:What I need... (2, Insightful)

Datamonstar (845886) | more than 9 years ago | (#11483989)

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 mastery via AI.

Re:What I need... (1)

demonbug (309515) | more than 9 years ago | (#11484023)

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!

Re:What I need... (0)

Anonymous Coward | more than 9 years ago | (#11484125)

in Reality you are asking for a tough thing in my opinion. Because unless you are looking for hints on what moves best to make and what road line is best to take (as in race games) you are asking for a hack essencially.
Thats why there are good players, average players and players that are just plain no good, bcs of the attention factor + skill level and all.

To win against a team based player for instance an FPS you have to pay attention to the certain pattern of your opposition.

Re:What I need... (1)

It doesn't come easy (695416) | more than 9 years ago | (#11484223)

I can imagine for example a comment from the game like "your opponent favors the left path" or some such thing. Not foolproof, obviously (playing against real people is never entirely predictable, that's what makes it so great), but helpful.

Re:What I need... (2, Interesting)

SharpFang (651121) | more than 9 years ago | (#11484424)

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.

Artificial Intelligence for Slashdot postings (1)

Radres (776901) | more than 9 years ago | (#11483737)

I for one welcome our Artificially-Intelligent overlords who in Soviet Russia program us to do ??? then profit.

Well Alright (2, Funny)

MightyMartian (840721) | more than 9 years ago | (#11483738)

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 (3, Informative)

demon411 (827680) | more than 9 years ago | (#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 (1)

Radres (776901) | more than 9 years ago | (#11483792)

Since Starcraft requires the ability to manage many different actions all at once I can clearly see why it would be easy to program an AI for Starcraft that always wins. I can also write a program that can add two random 16 digit numbers faster than a human.

Re:starcraft yay (0)

Anonymous Coward | more than 9 years ago | (#11483801)

"i need an ai to do my laundry tho."

I think you need the I - period.

Re:starcraft yay (0)

Anonymous Coward | more than 9 years ago | (#11483919)

I think you need the I - period.

Man. Apple is expanding into every market these days aren't they?

Re:starcraft yay (4, Informative)

Vaevictis666 (680137) | more than 9 years ago | (#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 (2, Insightful)

DavidD_CA (750156) | more than 9 years ago | (#11484004)

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.

Re:starcraft yay (1)

demon411 (827680) | more than 9 years ago | (#11484158)

i dunno maybe b/c they didn't think there would be "insane" people that play the game as a profession [asiaweek.com] .

Re:starcraft yay (3, Interesting)

vadim_t (324782) | more than 9 years ago | (#11483913)

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.

Re:starcraft yay (1)

nahdude812 (88157) | more than 9 years ago | (#11484139)

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.

Re:starcraft yay (5, Interesting)

nine-times (778537) | more than 9 years ago | (#11483975)

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 (2, Interesting)

Wildclaw (15718) | more than 9 years ago | (#11484244)

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 in and destroy them one by one.

Terran was probably the most easy to do so with. Tanks with bunkers in front of them can hold of most things that come through the front door and later in the game the base should be quite heavily turreted. You can also use supply depots to completly block of the base entrance. I do consider that to be exploiting the path finding AI and it is possible to do it without them.

Protoss makes good use of a massive static defense early on. Place pylons in front of the cannons to make the AI target those first. A couple of reavers will also help out and as the game goes on you need to get air superiority (carriers) quickly. The main problem if I remember correctly is the first terran tanks. They outrange the static defense and they appear quite early.

Zerg is the most difficult. I havn't done it myself actually. I have only seen it be done by a friend. Guardians are the key. The problem is getting them in time. A few anti ground building will probably also be needed to slow the early onslaught. Once you have air superiority with zerg it becomes easier.

These tactics won't work with the AI script that blizzard added in a later patch because that script cheated (Created units out of thin air). Also, you will probably want to use lower speed settings. Even with the tactics I mentioned it is still a lot of micro managing needed to actually win.

Re:starcraft yay (4, Insightful)

ComputerSlicer23 (516509) | more than 9 years ago | (#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

What about RTS AIs? (1)

Crash24 (808326) | more than 9 years ago | (#11483761)

Perhaps game developers can imbue more variety and tactics into their strategy game AIs. I've seen way too many real-time strategy AIs take the easy way out by cheating; they frequently know where you are and they often "magically" get more money than they collect.

Does anyone know of an RTS game with AI's that don't cheat?

Re:What about RTS AIs? (0)

Anonymous Coward | more than 9 years ago | (#11483837)

From what i've seen and read, AI's cheat because they aren't that smart, and people can be intelligent and figure them out after a while. They really aren't intelligent, only as intelligent as the controls that make them up. Also, AI's can control all their units at once, a human player would be hard pressed to control many units to do different things all at once.

Re:What about RTS AIs? (1)

vadim_t (324782) | more than 9 years ago | (#11483846)

I'm not completely sure, but I think Total Annihilation doesn't cheat. Or at least you can beat it by destroying its resource collectors.

I've seen several games where you could kill the harvester or whatever, and it never seemed to make much of an effect on the computer, but in TA the strategy worked just fine for me.

Re:What about RTS AIs? (1)

NinjaFarmer (833539) | more than 9 years ago | (#11483998)

The TA AI was pretty bad and it did cheat, but you can download different AI that doesn't cheat.

Re:What about RTS AIs? (1)

Botty (715495) | more than 9 years ago | (#11483890)

Total Annihilation AIs didnt cheat. Then again the best games were played when you installed the mods that let them cheat ;)

Re:What about RTS AIs? (3, Interesting)

ThePyro (645161) | more than 9 years ago | (#11484375)

All of the Total Annihilation AIs (that I'm aware of) cheat by knowing where your units are without having to do any reconnaissance. The very first attack by the AI will always head straight for your base, even though the AI has sent no previous scouts. The AI does a similar thing when attacking your expansions.

The StarCraft AI also cheats in this fashion.

The trouble with most RTS AIs is that they're just not set up to deal with imperfect information. Exploration, one of the X's in classic 4X games, gets totally left out by the AI. Consequently, the human player loses the opportunity to try all sorts of "stealth" tactics.

As another poster already mentioned, a big step forward will be game AIs which can deal well with imperfect information. An AI which must use scouts, and can be sometimes be fooled by cleverly planted misinformation / diversions...

Re:What about RTS AIs? (1)

AceCaseOR (594637) | more than 9 years ago | (#11483932)

Turn Based strategy games like Civilization & Axis and Allies have this problem too. Often, in CivIII, My opponents not only end up with guns faster then me, but also with more Iron I have.

Re:What about RTS AIs? (1)

SharpFang (651121) | more than 9 years ago | (#11484385)

The reason may be the AI never stops. You create a lot of overhead by accessing menus, scrolling map, reading messages. It takes you time. The AI starts doing it all earlier simply because it takes less time to do, then gets the results faster.

Obligatory AI reference (0, Offtopic)

William_Lee (834197) | more than 9 years ago | (#11483784)

/. Joe: Is this your first time... with something like me?

Real Woman: I've never been with Mecha. /. Joe: That makes one of us.

Real Woman: I'm afraid it will hurt. /. Joe: Hu-man... once you've had a /.er you'll never want a real man again. Are these the wounds of passion?

Real Woman: Do you hear that music? /. Joe: You... are a goddess. You wind me up inside. But you deserve so much better in your life. You deserve... a beowulf cluster of me.

Re:Obligatory AI reference (1)

William_Lee (834197) | more than 9 years ago | (#11483935)

Wow...rough crowd...Getting modded off topic for posting a modified quote from the movie "ARTIFICIAL INTELLIGENCE."

No respect I tell ya, I get no respect...

yupo Fail It... (-1, Offtopic)

Anonymous Coward | more than 9 years ago | (#11483787)

Another good one... (2, Insightful)

aarku (151823) | more than 9 years ago | (#11483789)

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.

Stratego (Dover patrol, L'attaque etc) (4, Interesting)

hedley (8715) | more than 9 years ago | (#11483820)

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

Thanks but no thanks (4, Funny)

gearmonger (672422) | more than 9 years ago | (#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.

Re:Thanks but no thanks (1)

kid-noodle (669957) | more than 9 years ago | (#11483936)

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.

Re:Thanks but no thanks (0, Offtopic)

rgf71 (448062) | more than 9 years ago | (#11484185)

Damn, I wish I had mod points for you!

I *LIKE* it when a Black Troll gets "stuck" behind the fence (that he could easily step over), allowing me to pelt it with 100 arrows without getting a scratch.

THAT DAMN PAPERCLIP (0)

GatesGhost (850912) | more than 9 years ago | (#11483842)

I'd like to frag the shit out of him!. maybe someone should make one for doom3 or halflife 2.

yuo Fail it (-1, Offtopic)

Anonymous Coward | more than 9 years ago | (#11483850)

Juliet Are toge'ther

Reynolds (1)

Anonymous Cowherd X (850136) | more than 9 years ago | (#11483853)

Reynolds is a Senior Research Scientist

I liked him better in Smokey and the Bandit [imdb.com] . Seriously though, there seems to be no mention of neural networks in this book, so it seems to be just another guide to procedural if-then-else quasi AI. Does it even cover the alpha-beta pruning algorithm?

Re:Reynolds (1, Informative)

Anonymous Coward | more than 9 years ago | (#11484011)

Seriously though, there seems to be no mention of neural networks in this book


That's because no one uses them for games anymore. Also, that would require at least an entire book to do it any justice. Why aren't you complaining about the lack of Genetic Algorithms as well?


A good explanation of basic A.I. for real games is missing, hopefully this will fill it.

I'd rather see artificial stupidity (1)

llevity (776014) | more than 9 years ago | (#11483859)

A lot of games fake AI by making the computer controlled whatevers omniscient. They know when you're about to turn that corner, and are waiting for you. They know you're hiding in the bushes waiting for them. They never make a mistake, and they do it right every time, all day long. To me, it would be more interesting to play against things with artificial stupidity. Not of the sort where they just stare at a wall while you're beating them silly from behind, but I don't want them to be omniscient. I want to be able to sneak up on them. I want to be able to lay poised to strike for them to make some sort of mistake, and then I want to be able to capitalize on it. I want them learning from their mistakes, yes, but also learning bad habits from perceived mistakes. For example, if they hear a noise and come investigate, but find nothing since I've managed to hide quickly enough, I want the next noise to not concern them as much. Things like that would make a more beliveable opposition. To be fair, games are starting to evolve this way, I just hope the goal isn't only to make games more challenging, but more believable as well.

Re:I'd rather see artificial stupidity (1)

Tablizer (95088) | more than 9 years ago | (#11483944)

I want to be able to sneak up on them. I want to be able to lay poised to strike for them to make some sort of mistake, and then I want to be able to capitalize on it.

SCO vs. IBM, The Game

Re:I'd rather see artificial stupidity (1)

SharpFang (651121) | more than 9 years ago | (#11484292)

Actually, many games implement this. Some just have bugs like that.
Launch 2 rockets in short sequence, the bot dodges one and steps into route of the other. Remember original HL? Throw a grenade at grunts and you're safe until it explodes, as the grunts take cover instead of shooting.
Turn behind a corner sharply and the bot unloads a rocket at the wall, hurting self. Run backwards, launching rockets around the corners and see the bot keeping walking into them.

BTW, if I heard a noise, found nothing, next time I would look harder.

One thing I miss really hard.
If I don't hear a shot and see my companion fall, I run for cover and then really cautiously look for the sniper. Not stand over the corpse or go on with what I was doing.

Steve Jackson: Ogre (4, Interesting)

Weaselmancer (533834) | more than 9 years ago | (#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.

Re:Steve Jackson: Ogre (1)

ZX-3 (745525) | more than 9 years ago | (#11483950)

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

It also came with a radiation detection badge!

Scary (1)

Tablizer (95088) | more than 9 years ago | (#11483896)

"Dave, if you don't let me win, I will email all your porn to your girlfriend at work using your email address. And then I will order 3,000 WWF 'Slam Down' collector plates using your Paypal account."

Not the oppenents (1)

Das Auge (597142) | more than 9 years ago | (#11483912)

I want better AI for the non-combatants. No matter how good the graphics or sounds in a game that has large numbers of non-combatants (either people or animals), nonsensical behavior can really ruin the believability.

Intelligent FPS? (3, Interesting)

DrXym (126579) | more than 9 years ago | (#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.

Re:Intelligent FPS? (1)

SharpFang (651121) | more than 9 years ago | (#11484183)

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.

Better AI please (1)

null etc. (524767) | more than 9 years ago | (#11483921)

I hope game companies start hiring better dedicated AI programmers for their games. In Grand Theft Auto, I hate when my character runs around a fallen bike 3 times trying to figure out how to get on it, while punks with uzis unload clips of lead into my head.

Say what? (-1, Troll)

Anonymous Coward | more than 9 years ago | (#11483955)

In contrast, today the most economically significant application of AI is in computer games.

Honey, where did you put my cluebat?

Re:Say what? (1)

SharpFang (651121) | more than 9 years ago | (#11484089)

But, yes!
The problem is "simulation of human" vs "solving problems".
There are many applications where something quite but not entirely unlike AI is applied to solve some problems. Image/sound/voice recognition, fast optimization, and such. But they aren't even nearly aiming at simulating human behavior, and often take completely other methods than what human would.
On the other hand, AI in games aims to simulate human behaviour, interacting with humans. Often it's hard to tell a bot apart from a real player - seems they pass Turing test as to fight techniques quite well. It's attempt at real AI. And games produce more money than Hollywood :)

Why not bots? (1)

SharpFang (651121) | more than 9 years ago | (#11483967)

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?

Re:Why not bots? (1)

psetzer (714543) | more than 9 years ago | (#11484143)

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 of the damage I do (or I wasted more time practicing), I'd be able to go much higher.

Re:Why not bots? (0)

Anonymous Coward | more than 9 years ago | (#11484256)

The AI is comparatively more challenging in Q3 and UT mainly because the game play is oriented around death match style competition, while HL2 engages in first person story mode action.

This will never pass the Turing test (1)

G4from128k (686170) | more than 9 years ago | (#11483996)

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.

Re:This will never pass the Turing test (1)

SwimsWithTheFishes (842420) | more than 9 years ago | (#11484418)

Let's see if I understand you. You're saying that they make the AI really, really stupid because the players (like me) wouldn't be able to beat it otherwise? HEY!!!

Re:This will never pass the Turing test (0)

Anonymous Coward | more than 9 years ago | (#11484466)

Well said; making a game truly hard runs counter to the profit motive.

If you want to play a really hard game, go open source, like Nethack. The developers have no motive to make it easy.

And if you're a masochist, go Slash'EM.

algorithms vs. AI (1)

jrm228 (677242) | more than 9 years ago | (#11484001)

It's easy to write an algorithm that can optimize timing of say construction, unit production, etc. when it has a well defined goal. It's obvious that programs are better than people at doing math quickly and consistently. It's remarkably difficult to construct an AI that can sense, react, prioritize, work consistently across various hardware speeds, etc., and not resort to what seems like "cheating" to scale difficultly level up & down.

AI's are remarkably difficult to write... and if you're looking for a playground to experiment, I'd recommend Microsoft's Terrarium [gotdotnet.com] app which they released as a way to demonstrate features in the .NET framework. With that app, developers all over the world write insect DLLs in various .NET languages which then execute in your system with limited code access security and compete to dominate a distributed ecosystem. Fun stuff.

Re:algorithms vs. AI (1)

pclminion (145572) | more than 9 years ago | (#11484440)

Why are you distinguishing AI from algorithms?

"AI" is the term we generally apply to any of the most advanced algorithms. As these algorithms become more common and well understood they fall out of the "AI" category into the "advanced algorithm" category, then eventually they aren't treated as anything special anymore.

For example, alpha-beta pruning was an amazing technique when it was first invented, but these days people would hesitate to call it "AI." The complexity of the alpha-beta algorithm is about on par with quicksort, and nobody would say that quicksort is AI.

The term "AI" is really rather vague and basically just means "Stuff that's complicated enough that it borders on magical," but algorithms are eventually made transparent and the appellation of "artificial intelligence" fades.

Grue! (1, Funny)

Anonymous Coward | more than 9 years ago | (#11484013)

if($world->GetAmbientLightingLevel() == "dark") {
$eaten_by_grue = "likely";
}

-r

Artificial Intelligence in Security... (1)

Vexler (127353) | more than 9 years ago | (#11484021)

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 behind some of the most insidious attacks we've seen collectively.

In any arms race you have opponents of roughly equivalent strengths pitted against each other. I am beginning to wonder if this security "arms race" will amount to a little more than a one-sided butt-whipping. Yes, I am a natural-born pessimist.

Who Needs AI (1)

Null537 (772236) | more than 9 years ago | (#11484064)

Log onto any CS/D3/Painkiller/HL2 server and you have something way better than AI: real people.


Sometimes they're n00bs though...or hax0rz. Guess that just makes them really good and really bad AI?

Today: Physics. Tomorrow: Emergent Behaviors? (4, Insightful)

MiceHead (723398) | more than 9 years ago | (#11484074)

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 (4, Funny)

confusion (14388) | more than 9 years ago | (#11484099)

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]

The problem with Ai books.. (2, Insightful)

andr0meda (167375) | more than 9 years ago | (#11484101)

.. 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..

Monster AI Is The Next Killer App for MMOGs (4, Interesting)

EXTomar (78739) | more than 9 years ago | (#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.

How smart IS the Wizard of Yendor? (2, Funny)

Ikoma Andy (41693) | more than 9 years ago | (#11484252)

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.

Microsoft's Clippy didn't take its AI far enough (2, Funny)

sideshow Pablo (807881) | more than 9 years ago | (#11484280)

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."

Craig Reynolds is also well known in game AI field (3, Informative)

MarkWatson (189759) | more than 9 years ago | (#11484326)

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

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?