What Would You Like to See from Game AI?
jtogel asks: "As someone working in new (bio-inspired) AI research with an eye to applications in games, but within an academic setting, I often hear that game developers are not incorporating cutting-edge academic AI into their projects because it's too "risky" (they can't really predict how gamers would react), and because they don't see the point in it. As a gamer, and as someone who cares what gamers think, I am often surprised by the sorry state of current commercial game AI - it has hardly moved since the 1980s. However, maybe the problem is that no-one really knows what we want from game AI. Academics keep coming up with innovative AI technologies, but what we should we use it for? What do you think? What sort of intelligent behavior would you like to see in games, but don't at present? Which are the most obvious intelligence deficiencies of current NPCs that need to be fixed?"
The developers of Red Steel for the new nintendo wii said that they upped the AI players combat skills, because the new controller allowed faster and more accurate aiming than a traditional controller. They're point was that game AI is usually braindead to make it reasonable to the players who are slightly hindered by an unnatural interface. It's common in video games for a character to stand without any cover at the end of a long hallway. This isn't because the programmers couldn't program the AI to look for cover. Game characters aren't often built to be tactical, because they'd creme the gamer. That's my take.
The thing is, we don't always WANT to have smart/unpredictable AI. IN Goldeneye64 for example, half of the fun was learning where everyone was, and trying to beat your previous time for that level. If the NPCs are going to be in different spots everytime, then I can't be sure that my 2.20min run was any better or worse then my friend's 2.15min run, since I may have had to overcome more obsticles. Great storylines and AI make a great game. Time trials, high scores, and the ability to compete with other humans (whether comparing high scores or multiplayer) makes for an everlasting one. That being said though, AI for first person shooters NPC "grunts" should be easy to defeat. I don't want to have to do too much to escape from my jail cell in teh first level. I want to be able to defeat the guard by sidestepping his first shot and knocking him out. After that however, I want the opponent's force's higher characters to sidestep MY shots and knock ME out if I'm not careful enough. Games like Unreal Tournament have the right idea: the ability to shout orders at your NPC teammates in battle to get them to do things you want. Now, we may be a full console generation from being able to plug in a microphone and literally tell the AI that you want it to follow you around this corner and give you some cover fire, but I should be able to input a key sequence to tell it that. Likewise, the AI should be able to work out what your strengths have been throughout the last couple of deathmatchs and tell you that maybe you are better off going up top and snipering, which the AI covers you. OK, to summarise: At the start, I want predictability. Past those levels, I want the AI to play according to how I play, minimise the effects of my strengths, maximise the damage to my weaknesses.
I have to guess how AIs are implemented in current software for this answer, and perhaps these already exist in some games. But I'm sure I haven't seen many.
What I'd like to see is more AIs that are fed some concepts a priori, and then are able to manipulate those concepts in some way. Let me take a Civilization-type game as my example, since it is there I really wish I could see this.
I'd like to see an AI that has some concept of "launching an attack", beyond just massing troops and attacking in force. I'd like to see it know about "pincer", and "distraction", and other such concepts, and then use those to simplify its planning phases. Traditional AI techniques are still a long way from being fed the rules of Civ and deriving such things de novo, so I'd like to see some cheating, not with resources but by not starting almost from scratch with planning.
I'd like to see the computer have concepts of building a city vs. exploiting it, with corresponding "cheating" done in the computations, so the computer does a better job of building cities rather than just being handed resources to cheat. (Disclaimer: The last Civ game I played was Alpha Centauri, so maybe Civ 4 has addressed this, and cities actually get built; in AC it is not uncommon to take cities near the end of the game that have the AC equivalent of a Granary, and nothing else. However, I still bet human cities are still significantly better than computer-built cities. Feedback welcomed.)
I'd like extensive simulations to be run by the game author to adjust the weights of these concepts by playing tournaments. I'd like to see the AI guys have some time to actually refine the AI post-release because there's just no other way you're going to get a good, balanced AI.
While I've used Civ as an example, this generally extends to other genres reasonable well. In the FPS examples everyone is citing, I'm not sure about the exact concepts I'd choose, but what I'd like to see is the AI guys having time to load up some set of concepts and then firing a Genetic-Programming tournament at the concepts to see what happens, then iteratively refine the set of operators and concepts based on feedback from the results. (Most likely collapsing some obivously-useful trees into single nodes in some cases, breaking other concepts out, and adding new ones as needed.)
GP could be really interesting here because that is known to produce some interesting interactions with differentiated participants; you could evolve an entire squad with specialized members relatively easily, if your program nodes were rich enough.
Note: I'm not saying to run this on the client machine; GP techiniques would be inappropriate in general on a single, isolated client. On the other hand, for something like an XBox360 game played over live, that would be large enough to run a GP-based tournament against human players as "just another AI".
I'm not sure that game AI needs much more than more respect and more resources allocated to it so that you can do something other than The Simplest Thing That Could Possibly Work. The required ideas don't seem like they're that hard, it's just that they pretty much all involve having some time to work with them and not just slamming out code and shipping it.
But real AI has to involve some sort of learning, which is to say, letting game events "write" your behavior script. When would this be useful? The best example I can think of: Entirely stable environments that are "alive". Current games give you staged non-equilibrium situations that get triggered when your PC enters the scene. This sort of thing is just very obvious and unsatisfying if the goal is immersion. What good AI might do is this: before the game is released, the various separate settings might be populated with a bunch of artificial-life characters with specific motivations, needs, preferences, etc. (Maybe like the Sims, except more complex psychologically.) Then the game authors would let this initial system reach an equilibrium their big server. If they don't like the equilibrium that was produced, they tweak the initial AI and try again. Eventually, this will produce in a "natural" way something like a small, functioning village. When a PC enters the village, it will have been in an equilibrium which the actions of the PC will disrupt, almost certainly in unpredictable ways. That is how you give the player a true sense of freedom, like their actions really matter. Somebody like me might wonder: What would happen if I steathily killed the village miller, or gave him a gigantic horde of treasure, etc? That sort of scenario is impossible to play out in current games. And that sucks.
Now granted, writing Artificial Life that reaches an equilibrium similar to a real village, and still manages to react believably when a PC shows up may be a tall order, but I absolutely think it's a goal worth shooting for. For one thing, since many of the A-life interactions will happen in mutual isolation, the processing could be easily broken up into separate threads. Also, it's worth mentioning that this is not an all-or-nothing affair. If the equilibrium state produced at the end of several A-life generations is not exactly what you wanted, it's OK to slightly tweak the end result. The effect will still be much more convincing than the "village/dungeon/colony/factory eternally frozen in a moment until a PC triggers it."
One last bit: If you want to make AI characters seem realistic, maybe a good place to start is with Maslow's hierarchy of needs. Start there and build on that foundation. Everybody puts self-preservation ahead of other priorities, and so should AI. Ditto for all the other stuff on the hierarchy. So for example, if a fire I started destroys your hut, you will interrupt your routine to seek shelter, because this is your highest priority. For this, you may need to interact with other A-life, who might offer you a place to stay, financial help, or help with constructing a new hut - all for their own reasons, that depend on how much they like you, how likely they think you are to reciprocate, etc. If you saw me kill the miller, you will tell the other villagers, who may decide to ambush and capture you. How does a game produce that sort of behavior? Well, for one thing, planning requires some sort of awareness of expected consequences. But this should not be hard for a computer to do. It would guess that the PC would resist any attempt at capture, and it can (in the background) play out several "what if" scenarios compare their outcome to the goals of the villagers. This should show that a haphazard attack is a bad idea. Now it may look like I'm asking for a crazy amount of processing power. Maybe, but remember, we'll all have many CPU's to work with in the near future, so the ones that aren't running the game can be computing these "what if" scenarios. Also
"Introduce random variables. I don't care if you have to build in mechanisms to your game that are illogical so that the AI sometimes goofs up. All humans are fallible at a certain point and if you have differing levels of predictability in your AI, the user will love it."
Sure, NPCs should goof up now and again, but most of the time, they should at least be rational; they should always take steps not to die.
That means:
* No NPC should stand by idly as I charge toward it with weapons drawn.
* If I swiftly and easily kill all N-1 enemies in a group, the Nth one ought to get a clue and run away with its tail between its legs, beg for mercy or at least try a different strategy.
* No NPC should forget about me simply because I walk out of its view.
* NPCs should use teamwork.
Also, there should be variability among NPCs, even of the same type or class. For example, in "Halo," all Elites are the same, so once you figure out how to beat one, you'll be able to beat 'em all.
Let's travel back to the heady first days of Ultima Online, when they had a spawn system that approximated real world birth-life-reproduction-death cycles. Unfortunately the player population couldn't FIND any mobs to fight, the spawn was too realistic and couldn't cope with the artificial nature of players screwing up their routines. Old spawn system trashed, new spawn system based on timers goes into place, problem solved.
The way things work in the real world is not nessesarily a good basis for a game.
Jonah HEX
Horror & SciFi Erotic Nudes
It doesnt make much sense for them to learn from you since they will be dead before they can apply that knowledge
They do not necessarily need to learn from a specific set of players, but they can learn from what most players do against them. If Ragnoros is supposed to be a very powerful NPC, then it must have killed quite a few PCs along the way. That means he would know alot of the standard tactics, such as the standard Warriors aggro / Mages blast away / Healers heal.
I honestly do not understand how players in those MMORPGs can have fun doing the exact same thing over and over. If the NPCs would actually fight intelligently then PvE could actually be interesting.
--
-- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
You'll noticed that I said you will find heuristics that make it too hard (like targeting healers first or not emerging) and you have to purposely dumb it down to meet your user's needs.
Here's the trick. Balancing the encounter. You dismiss it in one sentence like it's easy, but it's by far the hardest part of the entire exercise; far harder than simply developing these ai heuristics you're suggesting.
These larger 40 player raid encounters have to be carfully balanced so that it's not too hard and not too easy and there's no silly 'ai exploits'. And it has to be fun. Trying to write a fancy ai algorithim that was properly balanced and fun would be a nightmare. There's all sorts of problems, including complaints from guilds who discover that Rag is harder for them then for some other guild because of some wierd ai learning code.
Ragnaros is the original end boss of WoW. That developers can't screw that encounter up. Scripting the fight is by far the most reliable for the developers to guarantee that the players have fun. Anything else is playing with fire.
Aw crap, ninjas!