Game Devs Discuss Creating Truly Autonomous AI Characters
Sony's semi-official blog ThreeSpeech has posted an article that asks AI coders from a number of studios "how close are we to creating truly autonomous AI characters" in games. To quote:
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.
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... More PlayStation 3 News...