Keith Stuart brings us the first article in a five part series of expert round table discussions on the future of artificial intelligence in gaming…
We all know what bad AI is. That moment a soldier gets stuck behind a small piece of foliage, doomed to complete the same running animation for the rest of eternity. Or when a group of aliens just leaps at you, spurning any opportunity for cover, in order to sacrifice themselves to your whirring mini-canon. And even if they do disappear behind a clump of rocks, they’ll usually end up poking their heads up every eight seconds in exactly the same place, allowing you to pick them off like sickly elephants at an illegal safari hunt.
But what about good AI? What does that really mean? This is a trickier question. The thing is, really smart AI would be impossible to defeat – within a virtual world, with known parameters and a set of clearly defined tasks, a computer will beat most players every time. That’s why the famed game coder Chris Hecker once said that what players really want is artificial stupidity. We need to know that computer-controlled characters make mistakes too. That’s more fun than fighting against super-smart drones - and that’s why we love online multiplayer. But then, we also want NPCs to be sort of clever – because they must provide a challenge. So really, the aim is artificial unpredictability.
Or is it? “The thing is, people aren’t unpredictable,” said Adam Gascoine, co-design director on Quantum of Solace when I asked him about the game’s AI, recently. And he’s right. Last year researchers at Boston’s Northeastern University tracked 100,000 mobile owners via their call data and found that a huge percentage made essentially the same movements every day, rarely breaking more than 5-10km out of their routine patterns. Perhaps that’s why we’ve accepted enemy predictability – in the form of attack waves and patrol routes – as an entertaining gaming trope for the past thirty years.
As videogame consoles become more technologically advanced, the question about good AI gets ever more complicated. Once upon a time, AI was really all smoke and mirrors, with most behaviours rigidly scripted. Now, the processing power is there to explore concepts and techniques from academia – from the guys who are pushing back the boundaries of ‘real AI’.
Which raises a vital question: what does all this mean to games and gamers?
I’ve asked AI coders from a number of studios about four key areas of modern game AI – we’ll tackle a different one each day this week, and look at how they’re evolving. The idea is to give you something to think about the next time you come up against a bunch of computer-controlled soldiers and are disappointed – or perhaps even amazed – by how they fight back…
Part one: autonomy
To kick off, we’re looking at enemies who think for themselves. How close are we to creating truly autonomous AI characters, able to react in real-time to player actions and formulate their own responses? Some developers have been experimenting with techniques such as Goal-Orientated Action Planning (GOAP) for several years in order to create ‘thinking’ beings.
But is this desirable? And is there still a role for scripted AI, in which the baddies perform actions based on pre-programmed, pre-determined elements? We ask the makers of F.E.A.R, Prototype, Dead Space and Wheelman.
Participants:
Sergio Garces Casao, Lead AI Programmer, Prototype, Radical Entertainment
Chris Hecker: Independent game coder
Jeff Orkin: MIT Media Lab, Cognitive Machines Group. Previously Senior Software Engineer, Monolith Productions
Louis Gascoigne: Software Engineer, Dead Space, EA Redwood Shores
Nick Davies: AI Programmer, Wheelman, Midway Newcastle
Jeff Orkin: We shipped the first example of a GOAP system with F.E.A.R in 2005, and since then several other titles have adopted GOAP architectures (including STALKER, Project Offset, Ghostbusters Wii, and Mushroom Men Wii).
The basic idea behind real-time planning is that we provide the enemies with a set of goals, and a set of actions that can be combined to satisfy these goals, and let them work out the most beneficial sequence of actions at run-time. This allows the enemies to adapt their behavior to the specific situations they find themselves in.
You might think about the move from scripted to planning enemy AI as similar to the move from pre-rendered 2D graphics to real-time 3D graphics. In the case of 2D graphics, the artists are predetermining exactly what the player will see. 3D graphics take a representation of shapes and textures, and render what the player sees in real-time, depending on the player’s actual viewpoint. In a similar manner, a planning system essentially renders behaviors of enemies that depend on the playing style and approach of the player.
Sergio Garces Casao: For an open-world game, [scripted AI] is generally unfeasible. Instead, more dynamic and adaptive approaches like hierarchical state machines, behavior trees or even planning systems are becoming predominant. Players will also appreciate this, as enemies will be less predictable and handle emergent situations more robustly.
The technology is mainly there, even GOAP is generally well understood, but the main obstacle lies in translating that into a workable game design. Most players today still expect and enjoy set-pieces in games, which are the perfect match for scripting technologies. The purpose of the AI is not to use purely autonomous technology, it’s to provide players with an enjoyable opponent or peer. In Prototype we keep a balance between autonomous and scripted behavior: all characters behave autonomously most of the time, but our level designers have the ability to control them when they need, inside the context of a mission.
Chris Hecker: I think autonomous agents are interesting intellectually, but I don’t think they’re the most important factor for games that are focused on the player having a dramatic experience in the world. Likewise, “goodness” at accomplishing tasks (whether shooting the player, driving a car, or whatever) is also not a very good metric for game AI.
The truth is, it’s really easy to program an AI that is better than the player at just about any task in modern games. The trick is to write AIs that are entertaining and dramatically interesting to interact with. So, having an agent act truly autonomously is a technical accomplishment, but how it feels to play with or against that agent is the important thing. If the agent is secretly communicating under the hood with the other AIs, or with some overarching drama manager to present the player with interesting situations and compelling experiences, that’s just fine with me - as long as it doesn’t feel like it’s cheating or coddling the player.
Louis Gascoigne: Planning algorithms have yet to really find mainstream use in entertainment products with a few notable exceptions such as F.E.A.R. In Dead Space, early on there was some experimentation with machine learning, neural networks, and genetic algorithms to either augment or replace traditional decision making techniques. We are hopeful that we’ll be able to use them in the future.
Nick Davies: We are now starting to investigate more sophisticated techniques. There is a mass of research being undertaken about how AI can model and reason about its environment and surroundings, and use this information to drive action – Belief-Desire-Intention architectures so to speak. There is also a lot of work investigating learning and adaptation, and its applications. These techniques will certainly make it possible to develop some quite complex entities in future games. How this will manifest itself remains to be seen…
Interesting article, I look forward to the rest of it.. though I don’t think Sarah Connor would approve!
Comment by marvzilla — Nov 3, 2008 @ 1:09 pm
More!!!
Once you start discussing the philosophical nature of where games are going and if you would have truelly sentient characters - killing them be legal? Morale implications of killing a life to just renew it again? Could they feel and understand pain?
Comment by JohnSketch — Nov 3, 2008 @ 2:08 pm
[...] bookmarks tagged artificial Intelligent design: where is AI going? Part one - … saved by 11 others hypershadic bookmarked on 11/03/08 | [...]
Pingback by Pages tagged "artificial" — Nov 3, 2008 @ 2:16 pm
[...] good friends over at Three Speech have discussed the future of Intelligent Design and AI in gaming with part 1 of a 5 part series. [...]
Pingback by Artificial Intelligence in Gaming: Part I - Autonomy | PS3 Attitude — Nov 3, 2008 @ 5:38 pm
[...] Part one - Autonomy… [...]
Pingback by Game AI Roundup Week #45 2008: 13 Stories, 1 Video, 1 Paper — AiGameDev.com — Nov 10, 2008 @ 1:47 am
RSS feed for comments on this post. TrackBack URI
Leave a comment