My buddy Paul Tozour has been epic in some of his posts lately. Here's another one, Why "AI Accelerators" Will Never Happen, that I can't believe escaped my notice for a few days. Although I wince at his use of the word "never" in the title, he does have a lot of excellent points in the article.
In the first section he talks about how the concept of "AI" is so broad that there isn't really any silver bullet that would help everyone. He actually kind of echoes a couple of columns I wrote for AIGameDev last spring on the subject. In Why Not More Simulation in Game AI?, talk about how there is that growing division between AI programmers. We just aren't doing the same thing any more... and many of us don't have a handle on what the other types do. Likewise, in Is There a Core Building Block of AI?, I cover how we really don't have a single thing we can build on... like Chris Hecker's idea of the "texture mapped triangle of AI".
I like his comment in the third section about how bad AI rarely comes from a lack of computing power. I would add the qualification that incomplete AI often comes from a lack of computing power. If we had more ticks, we can do more stuff. However, the solution isn't offloading it onto specialized hardware. All we need is either more processor or the permission to use more processor from our bosses.
Damian Isla of Bungie spoke at the recent Develop conference in the UK. He covered a lot of the history of Halo and some of the design decisions that were made in the franchise. Here's a story from Gamasutra that covers a lot of good stuff.
Specifically, there's a couple of things I want to touch on.
Halo's designers wanted the title's gameplay to explore mankind's "primal games" such as hide and seek, tag, and king of the hill, and the game's encounters were created with them in mind.
"It's evolution that taught us these primal games," said Isla. "They're the ones that are played with our reptilian brains. The idea was for the AI [to] play them back with you."
That's kind of interesting from a design standpoint. I guarantee that no one is sitting there thinking "hey, this is like King of the Hill" but they all recognize the concept on a subconcious level.
Isla pointed out that the importance of territory in Halo's encounter design is closely connected to the recharging shield mechanic that has appeared since the original game.
"Part of that recipe demands that at some point you have a safe zone," he explained. "In a sense we needed to make the AI territorial. Once you have this idea, you have to think about the problem of encounter progression as the player expands their safe zone. That itself is a pretty fun process. It gives the player a sense of progress, and is extremely plannable.
This makes a heckuva lot more sense than the "arena + safe corridor + arena..." model. What Halo did was break it up theoretically rather than physically (i.e. with walls). However, there still was the knowledge that the dudes - while still in their territory - were still going to try to take pot shots at you. You could take cover and they weren't necessarily going to come get you, but it wasn't completely safe.
Isla made special mention of AI misperception -- "the most interesting form" of good AI mistakes. If the player moves stealthily, the AI will assume the player is still sitting where the AI last knew him to be. [snip] "Each AI has an internal model of each target, and that model can be wrong," Isla summarized. "This allows the AI to be surprised by you, and this is very fun."
Amen, brother! This is something that I love seeing. I remember reading some of Damian's papers in the AI Wisdom series on exactly this concept of unknown location and search. Good stuff, man!
Still, Isla stressed, enemies shouldn't be dumb. "It's more fun to kill an enemy that's cunning, formidable, and tactical," he said, pointing out that that goal is not just an AI problem but also related to convincing animation and game fiction.
Dude... have I told you I loved you? I'm so sick of the mantra of "AI shouldn't be smart, it should be fun!" As if those two are mutually exclusive of each other.
"In Halo 2, if an AI tips over his vehicle, he walks off and forgets completely he was ever in one," said Isla. "In Halo 3, if he tips it, he remains in its vicinity fighting until there is a point where he can right it again."
According to Isla, the latter approach is "the way things should be going" -- as he puts it, "behavior should be a very thin layer on top of a world of concepts."
I would argue that behavior is more than a thin layer. Otherwise, I agree. Which really brings the concept of knowledge representation to the forefront. Not just world representation (e.g. geometry), but a general concept of how agents perceive and conceptualize things (i.e. psychology). Again, I've read some of Damian's papers on the subject. To me, he is someone who "gets it".
My friend and colleague, Paul Tozour, has put up an excellent post at the internet blog he shares with some other big names, Game/AI. In it, he covers all sorts of stuff that is "wrong" with pathfinding and offers evidence as to why nav meshes are better than waypoint graphs. There's plenty of pretty images that he has created using real-world maps... er... maps from real-world games. Definately educational and thought-provoking.
If you are an AI programmer, here's your motivation for doing better. Whether people mention one of your games or not, these sorts of gripes certainly give you something to think about. (And me, too.)
Here's a couple of samples:
I was recently playing through Rainbow Six 3 (PC version), and i've been noticing just how fucking retarded the AI is in that game. First off, these are the same AI who sometimes don't even know that their buddy just got shot in the head with a goddamn un-silenced M4, yet when they see you, they can magically shoot through fucking railings (despite seeing as how you can't*), and can instantly nail you the moment you peek out of a corner.
Whoever designed the pathfinding and collision detection in Morrowind needs a severe beatdown- NPCs will get stuck on anything and everything they can. And sometime's they'll stand right in a doorway or hallway while you're trying to navigate through it (Though that's more a program limitation.)
I'd like to go on record as saying that I hate games where enemies run away from you.
In the original, unmodded version of Silent Hunter II, allied destroyers could hit your U-boat with gunfire on a pitch-black foggy night without using radar, could detect you on the surface using active sonar, spot your periscope from 5,000 yards away, and could drop depth charges with Laser Guided Bomb-like precision on your exact position.
At the same time, they would constantly run aground, ram each other at Flank speed while trying to attack you, and constantly blundered into your steam-powered torpedoes, which left obvious wakes on the surface.
Mafia: The City Lost Haven was an innovative GTA clone, but the AI had some amusing quirks. When you were in a car chase, the pursuing cars could always catch up with you, no matter how fast you were going. But they would always try to overtake you on the left. All you had to do was drive close to a lamppost or an oncoming car and they would crash into it. Always. It made being chased pretty easy.
I think this comment is the most poigniant reminder, however:
Okay, game programmers, you've made your point. We all know that it is in fact possible for you to make an unwinnable game. Now that the experiments in asshattery are over, would you like to get back to making real games?
Sarcasm aside, let me just make it real clear because this can not be emphasized enough. GAMES ARE NOT SUPPOSED TO BE PLAYER VS. PROGRAMMER.
I happened across this blog review of the game "Days of Ruin" for Nintendo DS the other day. I noticed it because my Google alert for "GAME AI" picked up the following sentence.
The game's AI is sneaky and -well- intelligent too.
Well, that was certainly a promising hook, so I investigated further. The paragraph continued:
It responds to the type of units you create and your strategy. If you make an army of wartanks, it'll create an army of anti-tanks to counter your offense. If you make bombers to get rid of his anti-tanks, it'll create fighters to take down your bombers. If you happen to have an artillery bombardment as a defensive strategy, it will try to keep its ground units away from your range and will cautiously try to take it down when you drop your guard.
My thought was... uh, OK. Hardly sneaky or intelligent. Actually, that type of balancing act is rather simple to accomplish. And then I read the next paragraph...
While the game is fun, it also comes with a bit of frustration. In addition to a really smart AI, your computer opponent also has an unfair advantage of extra units, money, and bigger guns. Making the game, in some chapters, nigh unbeatable until you find the perfect strategy. I swear I was stuck in 2, probably 3, chapters for weeks. And without an option to change the difficulty of the game, I almost gave up on it after a lot of my strategies have failed.
This is the price you pay for that simplicity. While it is easy to do the reaction-based AI that was alluded to at first, it is a little more important to be able to tweak it to not be a challenge all the time.