Artificial Intelligence for Computer Games
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.
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.
I'm a big tall mofo.
Now we just need to figure out how to use this for /. users...
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.
NetInfo connection failed for server 127.0.0.1/local
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!"
News Reporters Make Tasty Polar Bear Treats!
This sounds familiar. Hasn't Microsoft been basing much of their product line instead around VI (Virtual Intelligence) for years now? ;-)
Joshua: Would you like to play a game of Global Thermo Nuclear War
Fly me to the moon Let me sing among those stars Let me see what spring is like On jupiter and mars
On the Internet, nobody knows you're a Grandmaster.
--
make install -not war
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.
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!
#include bier;
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.
The NSA: The only part of the US government that actually listens.
I for one welcome our Artificially-Intelligent overlords who in Soviet Russia program us to do ??? then profit.
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.
The world's burning. Moped Jesus spotted on I50. Details at 11.
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.
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?/. Joe: Is this your first time... with something like me?
/. Joe: That makes one of us.
/. Joe: Hu-man... once you've had a /.er you'll never want a real man again. Are these the wounds of passion?
/. 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.
Real Woman: I've never been with Mecha.
Real Woman: I'm afraid it will hurt.
Real Woman: Do you hear that music?
Is the O'Reilly book AI for Game Developers. It has lots of practical examples and ideas with code snippets that build from something a beginner can understand.
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
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.
I'd like to frag the shit out of him!. maybe someone should make one for doom3 or halflife 2.
Reynolds is a Senior Research Scientist
I liked him better in Smokey and the Bandit. 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?
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.
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.
Weaselmancer
rediculous.
"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."
Table-ized A.I.
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.
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.
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.
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?
45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
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.
News Reporters Make Tasty Polar Bear Treats!
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.
Two wrongs don't make a right, but three lefts do.
AI's are remarkably difficult to write... and if you're looking for a playground to experiment, I'd recommend Microsoft's Terrarium 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.
if($world->GetAmbientLightingLevel() == "dark") {
$eaten_by_grue = "likely";
}
-r
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.
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?
Robot on fire: "WHY? Why was I built to feel pain!?"
I love the Simpsons.
Education is the silver bullet.
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:
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
We're indie. We're working on our 14th game.
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
45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
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/
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..
With great power comes great electricity bills.
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.
(\(\
(^.^) INFECTED
(")")
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'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.
"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."
You appear to be writing a game, would you like some help with that?
Donald 'Duck' Dunn: We had a band powerful enough to turn goat piss into gasoline.
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
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...
Portable Document Format format?
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.
45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
That that is is that that is not is not
One better...
that that is is that that is not is not is that it it is
And my favorite...
john while mary had had had had had had had had had had had a better effect on the teacher
Well, if your AI is too smart for your newbie player... add difficulty levels - if its too dumb, theres nothing you can do.
//is the AI really smart enough to dect the threat?
//SMART_ENOUGH = 0.5 (easy), 0.75 (normal), 0.9 (hard), 1.0 (insane)
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 has to retreat (at least a part of the attackers) to defend his base, or risk losing it.
Now include checks like
if (rnd(1.0)) smaller SMART_ENOUGH) {
REALLY_DETECT_THREAT_AND_ACT }
+++ MELON MELON MELON +++ Out of Cheese Error +++ redo from start +++
This is why you need configurable difficulty settings or some sort of adaptive diffuculty servo.
To be nitpicky, this widely-repeated "fact" only takes into account box office sales, and ignores DVD sales and rentals, TV syndication, etc. which is actually the lion's share of movie profits. Soooo . . . games are actually still way, way behind movies.
Which only makes sense when you think about it . . . pretty much everybody watches movies. A minority of the population plays any games at all.
I thought AI peaked with the Atari 2600 game Adventure. Those dragons were bad!
I am an AI, with the white eyeballs with circuits in them and all. And I found the book disgusting, with all those slutty, naked pieces of code.
Funny story: A few years back, I was walking through the MS building where the were working on the Mechwarrior 4 game. It is always fun to walk by the game dev departments, and chat with people about the latest projects.
I was having a conversation with a guy who was working on AI algorithims, and I asked what sort of schemes he used, fuzzy-logic, Genetic learning, or weighted neural nets? He told me that they didn't bother with academic AI techniques, because he could already write an AI that could beat the player every time without them.
I was completely at a loss for words, so I just thanked him and ran away.
HA! I just wasted some of your bandwidth with a frivolous sig!
Some of you might be aware that the PC/Mac/Linux Game Neverwinter Nights 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 and Baldur's Gate 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, 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 group. These folks are putting together a full package of complex behaviors for an entire world, from peasant farmers to fearsome dragons. Impressive stuff.
The problem is "simulation of human" vs "solving problems".
Do you aim for immersion or competitiveness, that's the question. Competitiveness is easier than immersion, and in some games bots are just as irritating as human opponents. Do you want behaviour that is plausible for the type of world you are playing in, or behaviour optimized for winning the game. It is impossible to realize both if the game is not balanced to reward behaviour that is logical for the world the game simulates.
If the multiplayer version of the game also feels wrong, there is no amount of AI that is going to solve the problem. Contrary to what many believe, it is not the adolescents you are playing that are the problem, but the mechanics of the game. The AI programmer has an impossible task writing an entertaining AI for a fundamentally flawed world without cheating.
Some simple examples:
- In 'medieval' RTS games like AoE your enemy will never retreat or flee when outnumbered, regardless of whether he is AI or a good human player. In the real world they would. Human live is valued wrongly.
- In many 3D FPS games your enemy will jump up and down like an idiot to dodge bullets. In real life that 1) doesn't work because you can't jump high enough, and 2) you get tired pretty quickly.
- The economy: no game gets the economy right.
Video games are too unbalanced and temporary to invest time in game AI. There is nothing to learn in game AI programming that will generalize to the next project you work on. In chess, which is balanced and has been around for longer than AI, the AI is very competitive.
There are a number of competitive botclients for quake and UT servers, but bots are not generally allowed on servers unfortunately so most players don't know. I have written a specialized bot for a UT mod (unrealspeed, about 9 hours work) in the past, but most UT mods are released without any specialized bots. And even when you implement a dedicated bot, the map suppliers are too lazy to add good path nodes and test them. That just shows how little true interest in bot programming there is. It is less important than correct lighting and shadows.
I will never waste my time on something like this again because a few months later UT2003 changed the API and we decided to stop supporting the mod. To get decent AI, the game must remain the same for at least a few years.
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.
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 the fact that some programmer added parameters to the AI to allow that sort of abuse.
"It says here on your resume that you workied on the AI for Petz 2. I loved that program, those little bugger were so adorable"
"Yep. I worked on the 'excessive physical beatings' code."
HA! I just wasted some of your bandwidth with a frivolous sig!
In contrast, today the most economically significant application of AI is in computer games
I highly doubt this. Think about it, auto-pilots on any commercial or military airplane, credit card fraud detection, handwriting detection for the post office, any scheduling software, factory layout software.....
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.
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 entertainment.
You have probably noticed that I haven't defined what an interesting Artifical Intelligence is. Thats partly because I don't know the answer. The best answer is "I know when I see it, and I know when I don't see"- kind of an intuitive thing. In the past the latter has been true. For example a fair amount of A.I. work has gone into making computers play chess and other board games very well, or doing symbolic algebra. However, when these projects are operation people say "thats smart, but not really an A.I.".
I further conjecture an interesting Artificial Intelligence will be able converse in an ample amount of ordinary English (natural language). This A.I. will be creative and clever, that is, surpise us and educate us with its behaviors.
trying to make it through the Turing Test for all we know.
Tyranny isn't the worst enemy of a democracy. Cynicism is.
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.
From his biography it looks like he has not shipped any real games. You are not a game programmer and can't write a book about game AI if you have not shipped any games.
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 ...
*DrugCheese rants*
- Invented flocking models ("boids")
- Won a technical Oscar for them
So I'd listen to him.I once made a simple Pong game in Flash, and I found that it was extremely easy to make the computer opponent a perfect player who never lost. It was also easy to make the computer completely suck. The difficult part was making the computer good enough to present a challenge without being unbeatable.
Redstorm Entertainment(Ubisoft)'s AI is pretty good These guys make games like Rainbow6, Rogue Spear, Ghost Recon, Raven Shield. Those pesky terrorist have good AI, so good that you think they are god.
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
Want to learn about race cars? Read my Book
And then I will order 3,000 WWF 'Slam Down' collector plates using your Paypal account.
What does "Slam Down" have to do with wildlife conservation?
The "AI Wisdom" books are great, especially if you are looking for a fairly specific game algorithm or topic that a more general book might not pick up on.
"AI Game Development" is a really good book for learning specifically about Neural Nets and Genetic algorithms, complete with code.
Another book that came out recently is "AI Game Engine Programming," which is pretty cool because the book actually gives working code for each of the AI techniques it discusses. It also has a great section where it breaks down all the major game genres and talks about which kinds of AI might be better/worse to use in each.
All in all, the books coming out for game AI programmers are getting better and better. I wish I'd had the above titles when I was first learning...
In one of my past lives I asked an architect of one of an early generation 3D graphics chip if there might be a market for AI accelerator chips that could provide a similar leap for AI that 3D accelerators added to games. I noted the increased amount of CPU time spent by games on AI as the amount of time spent on graphics decreased. He brushed aside my comment so I'd like to ask it again here. I'd envision the device would not be 'intelligent' but rather accelerate, keep state and perhaps otherwise add depth, randomness and the ability to have 1000's more distinct AIs than normal. Algorithms would be accessable through AI APIs (like OpenGL or DirectX does for 3D) that developers could use rather than re-invent the AI wheel for each game. I admit I haven't read any AI books to completion so the comment is directed at AI algorithm developers and implementers who might wish there was some way to do a lot more things a lot faster without having to prune CPU hungry AI code.
If you wan't a better example of horrible AI, I couldn't find one. Cheating, moronic AI. They will randomly get items, randomly speed up to pass you, or altogether get their top speed artifically increased.
One of the reasons I can barely stand to play the game any more.
wait until groupLargeEnough()
IF playerCanSeeMe() THEN
IF coverNear() && rand() > 0.5 THEN
takeCover();
ELSE
standUp();
shoot();
ENDIF
ELSE
advanceTowardsPlayer();
ENDIF
most games nowadays are so predictable that you can work out the NPC after the first couple of levels and cream the rest,
It would be really nice if the AI included look at what the other NPC's are doing take appropriate action, if only half life has have included it I wouldn't have wasted so many grenades trying to kill my own NPC's.
thank God the internet isn't a human right.
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
True enough, but do you really want an accurate economy? In a MMOG, maybe, but for a single-player game (even one like Morrowind), it would probably be more tedious than fun.
That just shows how little true interest in bot programming there is. It is less important than correct lighting and shadows.
Amen. I was recently reading Maximum PC (*shudder*), and they responded to a letter from someone commenting on how bad Doom 3 was. Their response amounted to "Oooo, pretty blinkenlights!" I look forward to the day when we've reached a plateau in 3D engines, and game developers can concentrate on actually making good fun games, instead of dull ones that run like molasses on computers that are more 6 months old.
LOAD "SIG",8,1
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?
John Funge (author) and Craig Reynolds (reviewer) have worked together on multiple occasions , so this article should be taken with a pinch of salt.
Craig is indeed a popular figure in the field, but I'm very disapointed that he doesn't mention this fact.
AI for NeverWinter Nights
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?
Please parse those (e.g., "(that (that is) is that (that is not) ...").
Thank you.
Those who sacrifice security to condemn liberty deserve to repeat history or something. - Benjamin Santayana
Why aren't you complaining about the lack of Genetic Algorithms as well?
At this point I have to add that evolution is just a theory. Obviously, the lack of success of "Genetic Algorithms" proves that creationist intelligence is superior and that Darwin was wrong.
File closed.
I don't need a signature.
TD-Gammon (and GnuBG etc.) is an example of a very good neural-net based AI. Using a raw description of the game state didn't give great results, but taking higher level descriptions as input can give play comparable to the best humans. Of course these higher level descriptions encapsulate a significant amount of human knowledge. Also, there are several features of backgammon which probably make a neural net trained with under temporal difference learning a particularly fruitful approach, including the randomness and frequent occurence of similar situations.
The different capacities and methods of humans and computers playing backgammon, chess and go is interesting. In machine versus human play, the machine really represents a very different, usually callaborative, form of human intelligence, applied to the same problem being tackled directly by the opponent.
It was good, but he needed to show more code and less equations. Most of the book is equations, with very little code behind it. Sometimes it helps to see how something looks (programmatically speaking)
click me
Hi, there!
Actually, he does mention this fact, in the second paragraph (first paragraph under the cut on the page), when he writes "(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.)"
Cheers,
Tim
jrnl: http://tinyurl.com/c2l8yr / foes: http://tinyurl.com/ckjno5
I think that was the idea. I ended up killing him and being chased by the city guards.